Constructor
new MediaKeySession(medianon-null, keySystem, sessionType)
Parameters:
Name | Type | Description |
---|---|---|
media |
HTMLMediaElement | |
keySystem |
string | |
sessionType |
string |
- Implements:
- MediaKeySession
- Source:
Members
closed :shaka.util.PublicPromise
Type:
generatePromise_ :shaka.util.PublicPromise
Type:
keyStatuses :shaka.polyfill.PatchedMediaKeysWebkit.MediaKeyStatusMap
Type:
media_ :HTMLMediaElement
Type:
updatePromise_ :shaka.util.PublicPromise
Type:
Methods
close()
generate_(initDatanullable, offlineSessionIdnullable) → {Promise}
Logic which is shared between generateRequest() and load(), both of which
are ultimately implemented with webkitGenerateKeyRequest in prefixed EME.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
initData |
BufferSource |
<nullable> |
|
offlineSessionId |
string |
<nullable> |
Returns:
- Type
- Promise
generated()
Signals that the license request has been generated. This resolves the
'generateRequest' promise.
generateRequest()
handleError(eventnon-null)
Either rejects a promise, or dispatches an error event, as appropriate.
Parameters:
Name | Type | Description |
---|---|---|
event |
MediaKeyEvent |
load()
ready()
Signals that the session is 'ready', which is the terminology used in older
versions of EME. The new signal is to resolve the 'update' promise. This
translates between the two.
remove()
update()
update_(promisenon-null, response)
An internal version of update which defers new calls while old ones are in
progress.
Parameters:
Name | Type | Description |
---|---|---|
promise |
shaka.util.PublicPromise | The promise associated with this call. |
response |
BufferSource |
updateKeyStatus_(status)
Update key status and dispatch a 'keystatuseschange' event.
Parameters:
Name | Type | Description |
---|---|---|
status |
string |