-
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
DRM - Fetch keys ahead of the playback position #4133
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Useful background: https://exoplayer.dev/drm.html This issue can occur where key rotation is present in the media, where the media consists of different quality streams with different keys, and when playing playlists containing DRM protected content. The problem is that DRM keys are only requested at the point of playback. The solution will be to request them earlier (e.g. one option is to request them at the point of buffering). |
@AquilesCanta - This seems affecting our playback experience too. Please let me know if you need any help with test streams. Thanks. |
@AquilesCanta Do you consider the key rotation stream which the pssh is only in segment? some encoder/packager won't put the pssh in mpd for live key rotation stream so you can't fetch license in the MediaSource. To be able to retrieve license earlier maybe trigger the license request after demuxing before rendering? |
We are working on other DRM improvements at the moment, please be patient. A commit will appear below once we push something to the dev-branch. |
@AchibanaUkyo That's what we intend to do. |
Hello! Time is of the essence here and I'm wondering how I could fix that by myself. Could you give me possible solutions or point me into right direction? |
Hello, Do you have a date estimate of when the update will be committed? Thank you. |
We haven't implemented key pre-fetching, but 316f8a8 implements session keepalive inside the DefaultDrmSessionManager. By default sessions are kept for 5 minutes after the last 'release' - this can be customised with DefaultDrmSessionManager.Builder#setSessionKeepaliveMs(long). This is enough to bridge a clear ad-break, so if the content before and after the ad is encrypted with the same keys then the session should now be re-used after the ad (e.g #4133 (comment)). This doesn't help for content with key rotation - so I'll keep the issue open to track implementing proper key-prefetching. This is available on the dev-v2 branch - please try it out and let us know if you spot any problems! |
This adds an optional DrmSessionManager#preacquireSession() method and implements it on DefaultDrmSessionManager. The manager doesn't promise to keep the preacquired sessions alive, and will proactively release them if a ResourceBusyException suggests the device is running out of available sessions in the underlying framework. In a future change, SampleQueue will preacquire sessions on the loading thread and keep track of preacquired 'references', releasing them when seeking or clearing the queue. Issue: #4133 PiperOrigin-RevId: 358381616
Issue: #4133 PiperOrigin-RevId: 362478801
This is now implemented on the dev-v2 branch - it will be included in the next major release. I'd appreciate it if people could try it out and report any issues they observe. |
Spun out from #3780. The issue is as described in the title.
The text was updated successfully, but these errors were encountered: