w3c / encrypted-media

Encrypted Media Extensions
https://w3c.github.io/encrypted-media/
Other
180 stars 80 forks source link

Question about enabling offline playback #443

Open re-jim opened 6 years ago

re-jim commented 6 years ago

Assuming I'm using this asset and license server, respectively: http://wvm.ezdrm.com/demo/stream.mpd http://widevine-dash.ezdrm.com/proxy?pX=BF9CEB

Once I have what is needed to get playback, would there be any way to store pieces of information locally so that I can reuse this when offline, as long as the license hasn't yet expired, or would this be impossible by design? For example, if I were to capture the response from the license server, and use it a second time, would that work?

If this should theoretically work, what pieces of information would I need to store in order to enable this?

tanalam commented 6 years ago

Hi, W3C EME spec does support persistence license. When you create session the type of the session should be of this type and it should work (given the underlying DRM/System has implemented this specification)


https://www.w3.org/TR/encrypted-media/#idl-def-MediaKeySessionType.persistent-license persistent-license- Sessions of this type can only be created if the configuration associated with the MediaKeySystemAccess object that created this object has a persistentState value of "required". The session must be loadable via its Session ID once update() is called successfully. A message of type "license-release" containing the record of license destruction will be generated when remove() is called until the record is acknowledged by a response passed to update().