Class: shaka.polyfill.PatchedMediaKeysApple

A polyfill to implement modern, standardized EME on top of Apple's prefixed EME in Safari.

Classes

MediaKeys
MediaKeySession
MediaKeyStatusMap
MediaKeySystemAccess

Methods

(static) install()

Installs the polyfill if needed.
Source:

(private, static) onWebkitNeedKey_(eventnon-null)

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

(static) rebuildInitData_(initData, certificate) → {BufferSource}

Rebuild FairPlay init data according to Apple's docs. It's unclear why this is not done by the browser, or if the unprefixed version will do it for us.
Parameters:
Name Type Description
initData BufferSource
certificate BufferSource
Source:
Returns:
Type
BufferSource

(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