Skip to content

Commit

Permalink
fix(iOS): fix iOS DRM header parser (#3609)
Browse files Browse the repository at this point in the history
  • Loading branch information
YangJonghun committed Mar 26, 2024
1 parent 0983580 commit c9a75f3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ios/Video/DataStructures/DRMParams.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ struct DRMParams {
self.contentId = json["contentId"] as? String
self.certificateUrl = json["certificateUrl"] as? String
self.base64Certificate = json["base64Certificate"] as? Bool
self.headers = json["headers"] as? [String: Any]
if let headers = json["headers"] as? [[String: Any]] {
var _headers: [String: Any] = [:]
for header in headers {
if let key = header["key"] as? String, let value = header["value"] {
_headers[key] = value
}
}
self.headers = _headers
} else {
self.headers = nil
}
}
}

0 comments on commit c9a75f3

Please sign in to comment.