-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Load persistent sessions #2451
Load persistent sessions #2451
Conversation
…persistent session id from protectionData or contentProtection
- create session token before loading the session - provide initData associated with sessionId to enable checking if initData has already been seen before loading the same session ID
…along with associated session ID
… create new session
…euse them when reloading the streaml
…already loaded or loading session ID (to avoid QuotaExceededError)
Please note that in this PR, the dash-if-reference sample provides a new button 'Stop' in order to properly stop and reset the protection module (i.e. close the MediaKeySessions), before loading the same stream and same persistent session. Maybe we should modify dash.js to wait for MediaKeySession to be closed before loading a new stream. This can be subject to another PR. |
@bbert, would it make sense moving the new stop button to the DRM options section? Other than that PR looks nice. |
@epiclabsDASH the new stop button can be useful for other needs. |
This PR adds support for persistent MediaKeySession loading.
This can be operated on chrome since chrome and Widevine CDM now support persistent sessions.
With this PR, if your license server can deliver persistent licences, you can configure the stream protection data to setup key system access with support of persistent licenses:
Once such kind of stream is loaded and a persistent license is obtained, the session ID can be reused, when playing the same stream, to load a MediaKeySession with the persistent session ID, instead of creating a new MediaKeySession and request again the license.
The dash-if-reference sample provides functionnality to playback a session with a persistent session ID.
Once a protected stream has been playback with a persistent license, the application stores the persistent session ID for the stream. Then, in the same browser tab instance, if the same stream is loaded, the persistent session ID will be reused and loaded, avoiding requesting a new license.
A sample test stream is provided: "Other samples / Unified Streaming (Widevine, persistent)"