Skip to content
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

Avoid repeated license requests when seeking between DASH periods #6725

Closed
sergiomartinez4 opened this issue Dec 4, 2019 · 5 comments
Closed
Assignees

Comments

@sergiomartinez4
Copy link

Hi ExoPlayer team,

I'm currently playing a Multi-Period Live DASH with Widevine, and I'm noticing that when seeking across periods, a license request is made every time. When letting the stream play and cross period by normal playback, it does not request the license. It also does not request a license when seeking within the same period.
Are multiple requests expected when seeking across periods?

I tested it on the ExoPlayer Demo version 2.10.8.
The bug report and the media information will be sent to dev.exoplayer@gmail.com.
Thanks

@sergiomartinez4
Copy link
Author

Hello team,
is there an update about this question?
Any info will be much appreciated
Thanks

@KelvinJin
Copy link

Hey guys, instead of creating a new issue I just want to mention that we're having the same issue here. Please indicate if this is necessary and if there's a way to stop the extra requests. This actually increases the cost of our DRM server so it would be good to figure out a solution. Thanks in advance.

@tonihei tonihei assigned icbaker and unassigned AquilesCanta Jun 3, 2020
@icbaker
Copy link
Collaborator

icbaker commented Jun 5, 2020

This is currently working as expected (unfortunately) - when seeking from one period to another we release the previous period & renderer (which in turn causes the DrmSession to be released) before starting playback in the new period (which triggers acquiring the DrmSession).

This means that we're not able to re-use the DrmSession instance, even though the keys are identical, because it's been fully released. So we initialize a new one and that causes another key request.

When we transition from one period to the next during normal playback (not seeking) we keep the old renderer around just long enough to keep the DrmSession alive until starting to play the new period, so when we acquire the session from the new period we're able to re-use the existing one and avoid another key request.

I'm looking into some different approaches to solve this, but can't promise a timeline I'm afraid.

@icbaker icbaker changed the title Multiple license request for Multi Period Live DASH Avoid repeated license requests when seeking between DASH periods Jun 5, 2020
ojw28 pushed a commit that referenced this issue Jul 3, 2020
Issue: #7011
Issue: #6725
Issue: #7066

This also mitigates (but doesn't fix) Issue: #4133 because it
prevents a second key load after a short clear section.

PiperOrigin-RevId: 319184325
@icbaker
Copy link
Collaborator

icbaker commented Jul 3, 2020

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 (more than!) enough to bridge the gap when seeking between DASH periods - so the session should now be re-used after the seek.

This is available on the dev-v2 branch - please try it out and let us know if you spot any problems!

@icbaker icbaker closed this as completed Jul 3, 2020
@KelvinJin
Copy link

Just want to report back that the patch does fix the issue. And look forward to the release! Thanks again!

@google google locked and limited conversation to collaborators Sep 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants