(以下內容均翻譯自英文版文件,最新資訊及內容敬請切換至英文語系參考原文)
要整合 BlendVision One DRM,請在源選項中新增相關選項,如下所示。
可在 此處 找到 drmUrl
,以及 playbackToken
是 啟動播放工作階段的相同令牌 。
if let licenseString = "https://drm.platform-qa.kkstream.io/api/v3/drm/license", let fairplayCertString = "https://drm.platform-qa.kkstream.io/api/v3/drm/license/fairplay_cert", let licenseUrl = URL(string: licenseString), let certUrl = URL(string: fairplayCertString) { // Create drm configuration let fpsConfig = UniFairPlayConfig(licenseUrl: licenseUrl, certificateUrl: certUrl) // Example of how message request data can be prepared if custom modifications are needed fpsConfig.prepareMessage = { spcData, assetId in spcData } // Example of how certificate data can be prepared if custom modifications are needed fpsConfig.prepareCertificate = { (data: Data) -> Data in // Do something with the loaded certificate return data } fpsConfig.certificateRequestHeaders = "certificate header" fpsConfig.licenseRequestHeaders = "license header" sourceConfig.drmConfig = fpsConfig }