Class: shaka.polyfill.PatchedMediaKeysWebkit

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

Classes

MediaKeys
MediaKeySession
MediaKeyStatusMap
MediaKeySystemAccess

Members

(private, static) prefix_ :string

Store api prefix.
Type:
  • string
Source:

Methods

(private, static) getVideoElement_() → (non-null) {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

(static) install()

Installs the polyfill if needed.
Source:

(private, static) prefixApi_(api) → {string}

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

(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