-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HLS Widevine key rotation does not work in case media playlist has multiple init segments (EXT-X-MAP HLS tags) #9004
Comments
Have you configured multi-session DRM support as described here? https://exoplayer.dev/drm.html#key-rotation You shouldn't need a whole new If that's not the problem and something else is going on, please provide content we can use to reproduce the problem. Please either upload it here or send to dev.exoplayer@gmail.com using a subject in the format "Issue #1234" (where "#1234" should be replaced with this issue number.) Please also update this issue to indicate you’ve done this. |
Yes, multi-session DRM support was enabled when reproducing the issue. I can see that on key rotation (when subsequent EXT-X-KEY HLS tag gets handled) new DRM session is created with new KID as a result of adjusting upstream format in
Decrypting sample triggers I will look into providing access / corresponding DRM info for an asset to reproduce the issue. |
The asset info to reproduce the problem has been sent to dev.exoplayer@gmail.com |
Thanks for the link to the media, I was able to reproduce the problem. I will investigate further. |
Thanks for confirming. |
Folks, please let me know if you need more info or there is any update you would like to share. |
There are a few things happening at the point of key rotation:
The fix here will be to ensure that the initialization segment is always loaded if changed, as alluded to in the original issue description. Thanks! |
We'll get a fixed merged for this shortly. @ipichkov - The way this media is setup seems sub-optimal, and possibly (although I'm not certain) in violation of the CMAF specification. In particular, I don't think you're supposed to put PSSH boxes in initialization segments (this document relates to DASH, but heavily implies that this is required by the CMAF specification). I'm pretty sure you can indicate default key IDs somewhere in the |
Thank you @ojw28 for the update. Unfortunately the asset packaging is outside of our control. I'm going to discuss this with Origin software vendor though to see if this is something the can address in the nearest future. |
Issue: #9004 #minor-release PiperOrigin-RevId: 379516815
Issue: #9004 PiperOrigin-RevId: 379516815
In case HLS media playlist contains multiple init segments (when Widevine key rotation is enabled), keyId from the first segment is being used for all segments, even for those coming after subsequent EXT-X-KEY/EXT-X-MAP HLS tags:
This triggers Widevine CDM decrypt error after a new init segment gets fetched and attempted to be used as player continues reusing FragmentedMp4Extractor instance:
The issue was originally observed in 2.11.4 code base. It appears that
HlsMediaChunk.createInstance
API would need to check if initDataSpec is changed (e.g. different URI) when making a decision to reuse Extractor instance.Hopefully the following diff makes the issue clear:
Note, the same issue is reproducible in release-v2 as well. It can be addressed with a similar change:
The issue was reproduced on Android TV device SEI500TV, Pyxis, SEI Robotics, API level 28.
The text was updated successfully, but these errors were encountered: