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

keepProtectionMediaKeys should not keep unsuccessful license requests #4238

Closed
4 tasks done
squapp opened this issue Jul 21, 2023 · 2 comments
Closed
4 tasks done

keepProtectionMediaKeys should not keep unsuccessful license requests #4238

squapp opened this issue Jul 21, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@squapp
Copy link
Contributor

squapp commented Jul 21, 2023

Environment
  • Link to playable MPD file: any DRM-protected stream
  • Dash.js version: 4.7.1
  • Browser name/version: any browser
  • OS name/version: any OS
Steps to reproduce

Enable keepProtectionMediaKeys, then attachSource with wrong LA-URL (video does not play back), then attachSource with correct LA-URL (video still does not play back)

Observed behavior

It seems as if keepProtectionMediaKeys also "remembers" unsuccessful license requests (e.g. 404, 503) and does not trigger new license requests for the same KID. For unsuccessful license requests dash.js fires error code 114.

Expected behavior

Check for unsuccessful license requests (e.g. with HTTP response code 404 or 503) or watch for Dashjs error code 114. If this is the case, do not "keepProtectionMediaKeys"

@squapp squapp added the Bug label Jul 21, 2023
@dsilhavy dsilhavy added this to the 4.7.2 milestone Jul 21, 2023
@dsilhavy dsilhavy self-assigned this Jul 21, 2023
@bbert
Copy link
Contributor

bbert commented Jul 21, 2023

If keepProtectionMediaKeys is enabled, then only "usable" sessions are retained.
I've done some tests on chrome and it seems there is an issue when closing a MediaKeySession that is not usable, the promise seems not to resolved. That explains why the session is not removed.

@dsilhavy I suggest not waiting for close()'s promise to be resolved/catched in ProtectionModel_21Jan2015.stop() and ProtectionModel_21Jan2015.reset().

BTW in ProtectionModel_21Jan2015.reset(), videoElement has previously been set to null, thus code is done() callback is not more useful. Don't remember if it has always beed tne case

@dsilhavy
Copy link
Collaborator

Addressed in #4239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants