Skip to content

Load persistent sessions

Created by: bbert

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:

  protData = {
    "com.widevine.alpha": {
      "sessionType": "persistent-license"
    }
  }

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)"

Merge request reports