Product
Player
Question
Hi! We’re integrating Bitmovin Player with Axinom DRM and have had success with online playback and single-key offline playback. However, we’re facing issues with offline multikey HLS streams.
While online multikey playback works smoothly, our offline multikey streams will only play either the video or the audio (never both). We’ve reviewed the samples and have implemented parts successfully for internal testing, but this particular multikey scenario is blocking us.
When hardcoding the contentId inside the fpsConfig.prepareContentId
closure we can get either the audio or video depending on which contentID was used. We investigated using our own streams but the result is the same when using Axinom sample multi key hls stream.
Here is the sample stream implemented in the offline playback demo which will play online but only download either audio or video.
let fpsConfig = FairplayConfig(
license: URL(string: "https://drm-fairplay-licensing.axtest.net/AcquireLicense"),
certificateURL: URL(string: "https://vtb.axinom.com/FPScert/fairplay.cer")!
)
fpsConfig.licenseRequestHeaders = [
"content-type": "application/octet-stream",
"X-AxDRM-Message" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXJzaW9uIjoxLCJjb21fa2V5X2lkIjoiNjllNTQwODgtZTllMC00NTMwLThjMWEtMWViNmRjZDBkMTRlIiwibWVzc2FnZSI6eyJ2ZXJzaW9uIjoyLCJ0eXBlIjoiZW50aXRsZW1lbnRfbWVzc2FnZSIsImxpY2Vuc2UiOnsiYWxsb3dfcGVyc2lzdGVuY2UiOnRydWV9LCJjb250ZW50X2tleXNfc291cmNlIjp7ImlubGluZSI6W3siaWQiOiJmM2Q1ODhjNy1jMTdhLTQwMzMtOTAzNS04ZGIzMTczOTBiZTYiLCJ1c2FnZV9wb2xpY3kiOiJUaGVPbmVQb2xpY3kifSx7ImlkIjoiNDRiMThhMzItNmQzNi00OTlkLThiOTMtYTIwZjk0OGFjNWYyIiwidXNhZ2VfcG9saWN5IjoiVGhlT25lUG9saWN5In0seyJpZCI6ImFlNmU4N2UyLTNjM2MtNDZkMS04ZTlkLWVmNGM0NjFkNDY4MSIsInVzYWdlX3BvbGljeSI6IlRoZU9uZVBvbGljeSJ9XX0sImNvbnRlbnRfa2V5X3VzYWdlX3BvbGljaWVzIjpbeyJuYW1lIjoiVGhlT25lUG9saWN5IiwicGxheXJlYWR5Ijp7InBsYXlfZW5hYmxlcnMiOlsiNzg2NjI3RDgtQzJBNi00NEJFLThGODgtMDhBRTI1NUIwMUE3Il19fV19fQ.DpwBd1ax4Z7P0cCOZ7ZJMotqVWfLFCj2DYdH37xjGxM"
]
fpsConfig.prepareContentId = { (contentId: String) -> String in
contentId.replacingOccurrences(of: "skd://", with: "")
}
fpsConfig.prepareMessage = { spcData, _ in
spcData
}
fpsConfig.prepareCertificate = { (data: Data) -> Data in
data
}
let sourceConfig = SourceConfig(url: URL(string: "https://media.axprod.net/VTB/DrmQuickStart/AxinomDemoVideo-MultiKey/Encrypted_Cbcs/Manifest.m3u8")!, type: .hls)
sourceConfig.drmConfig = fpsConfig
sourceConfig.title = "Axinom demo video - multikey (HLS; cbcs)"
sourceConfig.sourceDescription = "Description of the stream to be played"
return sourceConfig
}
Thanks for any help!