You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I apologize if this question has been asked before. I searched for similar issues but couldn’t find an exact answer or may not have fully understood previous discussions.
I am trying to support multi-key HLS linear content with key rotation while ensuring seamless track switching.
As per the, Digital rights management - Key rotation
To play streams with rotating keys, pass true to MediaItem.DrmConfiguration.Builder.setMultiSession when building the media item.
I enabled DRM MultiSession mode to support key rotation, with my license server configured according to Case 2: License server responds with requested key only. However, because ExoPlayer only requests a license for the key associated with the currently selected track, I observed that playback freezes or experiences rebuffering during track switching while fetching the key for the selected track.
To avoid this issue, I reconfigured my license server following Case 1: License server responds with all keys for the content. While this prevents freezing during track switching, key rotation no longer works since all keys are provided upfront.
I have a few ideas to customize ExoPlayer to handle both scenarios, but before implementing any workarounds, I wanted to check if there is an official simple solution for this use case.
Any guidance would be greatly appreciated. Thank you!
The text was updated successfully, but these errors were encountered:
I would be interested to see your ideas... ExoPlayer would need to know all the tracks were not covered by a single license request. I think, in practice, this would be very difficult as all the init segments from all the tracks would need to be read in order to resolve the final DrmInitData and issue multiple license requests.
The docs make this pretty clear:
Where possible, we recommend configuring your license server to behave in this way. It's the most efficient and robust way to support playback of multikey content, because it doesn't require the client to make multiple license requests to access the different streams.
I'm curious why you say this:
While this prevents freezing during track switching, key rotation no longer works since all keys are provided upfront.
I'm confused how this matters? All the keys for each track are provided up front, but not for all time ranges?
See my question (which I answered myself) as to the difference between key and license rotation: #1048
Hi @stevemayhew I am facing the similar issue, where DRM server is responding with all keys, but stream is not playing and Player is throwing crypto key not available, While the thrown key is available when I check on entitlement_message used to generate license token on DRM server. and the same stream is playable on https://vtb.axinom.com/dash.html.
Can you please advice. below is the log and exoplayer DRM code:
if (isDRMEnabled) {
val drmUuid = C.WIDEVINE_UUID //Util.getDrmUuid("widevine");
if (drmUuid != null) {
val requestHeaders =
mapOf(context.getString(R.string.drm_token_key_axinom) to licenseToken.toString())
val drmConfiguration = DrmConfiguration.Builder(drmUuid)
.setLicenseRequestHeaders(requestHeaders)
.setLicenseUri(licenseUrl)
.setMultiSession(true)
.setForceDefaultLicenseUri(false) // Ensure it fetches new keys
.setPlayClearContentWithoutKey(true) // Prevent crashes during rotation
.build()
mediaItemBuilder.setDrmConfiguration(drmConfiguration)
}
}
I apologize if this question has been asked before. I searched for similar issues but couldn’t find an exact answer or may not have fully understood previous discussions.
I am trying to support multi-key HLS linear content with key rotation while ensuring seamless track switching.
As per the, Digital rights management - Key rotation
I enabled DRM MultiSession mode to support key rotation, with my license server configured according to Case 2: License server responds with requested key only. However, because ExoPlayer only requests a license for the key associated with the currently selected track, I observed that playback freezes or experiences rebuffering during track switching while fetching the key for the selected track.
To avoid this issue, I reconfigured my license server following Case 1: License server responds with all keys for the content. While this prevents freezing during track switching, key rotation no longer works since all keys are provided upfront.
I have a few ideas to customize ExoPlayer to handle both scenarios, but before implementing any workarounds, I wanted to check if there is an official simple solution for this use case.
Any guidance would be greatly appreciated. Thank you!
The text was updated successfully, but these errors were encountered: