Skip to content

Support for EME/DRM operations outside the player

Created by: greg80303

Moves almost all EME functionality from Stream into ProtectionController. This allows apps to perform "pre-fetching" of DRM licenses and to monitor all aspects of EME outside of the player.

Any DRM data associated with a particular piece of content is now contained with a single ProtectionModel. You can access and control this ProtectionModel via the ProtectionController. If you have performed EME operations on a ProtectionModel via the ProtectionController pair, you can now assign that ProtetionController to the MediaPlayer. The MediaPlayer will associate the protection data with the player's HTMLMediaElement and any pre-fetched licenses will automatically be available without further EME interaction.

Apps are responsible for the lifecycle of ProtectionController/ProtectionModel objects that they create. When the MediaPlayer is reset(), is will not release CDM resources (e.g. keys, sessions)for that content.

Apps are free to register for ProtectionModel events (really, EME events) on the ProtectionController that they created. They will continue to receive those events when the ProtectionController is attached to a the MediaPlayer so that they can stay informed regarding EME operations that are taking place.

If an application does not attach a ProtectionController, the MediaPlayer will create one automatically. In this case, the MediaPlayer is responsible for the lifecycle of the protection data. A reset() of the player will result in releasing of CDM resources.

Finally, a new demo application (samples/drm/index.html) will showcase the EME features of the player and the browser

Merge request reports