Skip to content

Persistent key session and CDM "message type" support

Created by: greg80303

In order to fully support persistent key sessions, we need to handle other types of CDM messages besides just "request-license". When key sessions are closed, the CDM may generate a "license-release" message so that the license server knows that the keys associated with the license are no longer usable by the client. In the case of a "check-out/check-in" use case where a piece of content may be played on no more than X clients simultaneously, it is the responsibility of the client to inform the license server when licenses are requested and released. There are other license server messages defined by EME as well.

_Note: the only platform that currently supports persistent sessions is Chrome OS, so you will need a Chromebook (or similar device) to test the functionality._

This PR improves support for persistent key sessions and all current EME message types.

  • Updated the eme.html application to display persistence information about each session (persistence state will be either Not Persistent, Loaded, or Not Loaded.
  • In several places throughout the code, we were using the term "laURL" to describe the license server URL. This is misleading since the license server is used for more than just "license acquisition". Renamed these variables and properties to "serverURL". _Note: The "laURL" property in ProtectionData is deprecated and support will be removed in a future release. Users who are specifying license server URLs in ProtectionData (in sources.json or programmatically) should begin migrating their code to the new property name._
    • The newly renamed "serverURL" property of ProtectionData can now be either a string or an object. This allows you to specify a single URL for all message types (string) or different URLs for each message type (object, where property names are message types and property values are URLs)
  • ProtectionExtensions.requestLicense() renamed to ProtectionExtensions.sendLicenseServerRequest() to once again avoid misleading name
  • LICENSE_REQUEST_COMPLETE event data modified to be an object containing the session token and the message type to allow applications more visibility into the types of messages being passed to the server
  • Older EME implementations do not allow anything but creating "temporary" (non-persistent) sessions
  • SessionTokens now contain the associated session type

Merge request reports