Class: shaka.polyfill.PatchedMediaKeysMs

A polyfill to implement EME draft 12 March 2015 on top of ms-prefixed EME v20140218.

Classes

MediaKeys
MediaKeySession
MediaKeyStatusMap
MediaKeySystemAccess

Methods

(private, static) compareInitDatas_(initDataAnon-null, initDataBnon-null) → {boolean}

Parameters:
Name Type Description
initDataA Uint8Array
initDataB Uint8Array
Source:
Returns:
Type
boolean

(static) install()

Installs the polyfill if needed.
Source:

(private, static) NormaliseInitData_(initDatanullable) → (nullable) {Uint8Array}

Normalise the initData array. This is to apply browser specific work-arounds, e.g. removing duplicates which appears to occur intermittently when the native msneedkey event fires (i.e. event.initData contains dupes).
Parameters:
Name Type Attributes Description
initData Uint8Array <nullable>
Source:
Returns:
Type
Uint8Array

(private, static) onMsNeedKey_(eventnon-null)

Handler for the native media elements msNeedKey event.
This:
Parameters:
Name Type Description
event MediaKeyEvent
Source:

(static) requestMediaKeySystemAccess(keySystem, supportedConfigurationsnon-null) → (non-null) {Promise.<!MediaKeySystemAccess>}

An implementation of navigator.requestMediaKeySystemAccess. Retrieves a MediaKeySystemAccess object.
This:
  • Navigator
Parameters:
Name Type Description
keySystem string
supportedConfigurations Array.<!MediaKeySystemConfiguration>
Source:
Returns:
Type
Promise.<!MediaKeySystemAccess>

(static) setMediaKeys(mediaKeys) → (non-null) {Promise}

An implementation of HTMLMediaElement.prototype.setMediaKeys. Attaches a MediaKeys object to the media element.
This:
Parameters:
Name Type Description
mediaKeys MediaKeys
Source:
Returns:
Type
Promise