fix(iOS): fix iOS DRM header parser (#3609)

This commit is contained in:
YangJH 2024-03-26 21:56:22 +09:00 committed by GitHub
parent 098358076d
commit c9a75f3cde
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
}
}
}