Class: shaka.polyfill.PatchedMediaKeysWebkit

A polyfill to implement EME draft 12 March 2015 on top of webkit-prefixed EME v0.1b.

Constructor

new PatchedMediaKeysWebkit()

A polyfill to implement EME draft 12 March 2015 on top of webkit-prefixed EME v0.1b.

Source:

Classes

MediaKeys
MediaKeySession
MediaKeyStatusMap
MediaKeySystemAccess

Members

prefix_ :string

Store api prefix.
Type:
  • string
Source:

Methods

getVideoElement_() → {HTMLVideoElement}

For some of this polyfill's implementation, we need to query a video element. But for some embedded systems, it is memory-expensive to create multiple video elements. Therefore, we check the document to see if we can borrow one to query before we fall back to creating one temporarily.
Source:
Returns:
Type
HTMLVideoElement

install()

Installs the polyfill if needed.
Source:

prefixApi_(api) → {string}

Prefix the api with the stored prefix.
Parameters:
Name Type Description
api string
Source:
Returns:
Type
string

requestMediaKeySystemAccess(keySystem, supportedConfigurationsnon-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>

setMediaKeys(mediaKeys) → {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