Class: shaka.polyfill.PatchedMediaKeysWebkit.MediaKeySession

Constructor

new MediaKeySession(medianon-null, keySystem, sessionType)

Parameters:
Name Type Description
media HTMLMediaElement
keySystem string
sessionType string
Implements:
  • MediaKeySession
Source:

Members

expiration :number

Type:
  • number
Source:

initialized_ :boolean

Type:
  • boolean
Source:

keySystem_ :string

Type:
  • string
Source:

sessionId :string

Type:
  • string
Source:

type_ :string

Type:
  • string
Source:

Methods

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>
Source:
Returns:
Type
Promise

generated()

Signals that the license request has been generated. This resolves the 'generateRequest' promise.
Source:

handleError(eventnon-null)

Either rejects a promise, or dispatches an error event, as appropriate.
Parameters:
Name Type Description
event MediaKeyEvent
Source:

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.
Source:

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
Source:

updateKeyStatus_(status)

Update key status and dispatch a 'keystatuseschange' event.
Parameters:
Name Type Description
status string
Source: