fix(iOS): fix iOS DRM header parser (#3609)
This commit is contained in:
parent
098358076d
commit
c9a75f3cde
@ -25,6 +25,16 @@ struct DRMParams {
|
|||||||
self.contentId = json["contentId"] as? String
|
self.contentId = json["contentId"] as? String
|
||||||
self.certificateUrl = json["certificateUrl"] as? String
|
self.certificateUrl = json["certificateUrl"] as? String
|
||||||
self.base64Certificate = json["base64Certificate"] as? Bool
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user