feat(iOS): rewrite DRM Module (#4136)
* minimal api * add suport for `getLicense` * update logic for obtaining `assetId` * add support for localSourceEncryptionKeyScheme * fix typo * fix pendingLicenses key bug * lint code * code clean * code clean * remove old files * fix tvOS build * fix errors loop * move `localSourceEncryptionKeyScheme` into drm params * add check for drm type * use DebugLog * lint * update docs * lint code * fix bad rebase * update docs * fix crashes on simulators * show error on simulator when using DRM * fix typos * code clean
This commit is contained in:
@@ -5,6 +5,7 @@ struct DRMParams {
|
||||
let contentId: String?
|
||||
let certificateUrl: String?
|
||||
let base64Certificate: Bool?
|
||||
let localSourceEncryptionKeyScheme: String?
|
||||
|
||||
let json: NSDictionary?
|
||||
|
||||
@@ -17,6 +18,7 @@ struct DRMParams {
|
||||
self.certificateUrl = nil
|
||||
self.base64Certificate = nil
|
||||
self.headers = nil
|
||||
self.localSourceEncryptionKeyScheme = nil
|
||||
return
|
||||
}
|
||||
self.json = json
|
||||
@@ -36,5 +38,6 @@ struct DRMParams {
|
||||
} else {
|
||||
self.headers = nil
|
||||
}
|
||||
localSourceEncryptionKeyScheme = json["localSourceEncryptionKeyScheme"] as? String
|
||||
}
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ struct VideoSource {
|
||||
let cropEnd: Int64?
|
||||
let customMetadata: CustomMetadata?
|
||||
/* DRM */
|
||||
let drm: DRMParams?
|
||||
let drm: DRMParams
|
||||
var textTracks: [TextTrack] = []
|
||||
|
||||
let json: NSDictionary?
|
||||
@@ -28,7 +28,7 @@ struct VideoSource {
|
||||
self.cropStart = nil
|
||||
self.cropEnd = nil
|
||||
self.customMetadata = nil
|
||||
self.drm = nil
|
||||
self.drm = DRMParams(nil)
|
||||
return
|
||||
}
|
||||
self.json = json
|
||||
|
Reference in New Issue
Block a user