Class: shaka.polyfill

A one-stop installer for all polyfills.

Classes

EncryptionScheme
A polyfill to add support for EncryptionScheme queries in EME.
Fullscreen
A polyfill to unify fullscreen APIs across browsers. Many browsers have prefixed fullscreen methods on Element and document. See Using fullscreen mode on MDN for more information.
InputEvent
A polyfill to patch 'input' event support in IE11.
Languages
A polyfill to provide navigator.languages on all browsers. This is necessary for IE and possibly others we have yet to discover.
MathRound
A polyfill to patch math round bug on some browsers.
MediaSource
A polyfill to patch MSE bugs.
PatchedMediaKeysApple
A polyfill to implement modern, standardized EME on top of Apple's prefixed EME in Safari.
PatchedMediaKeysMs
A polyfill to implement EME draft 12 March 2015 on top of ms-prefixed EME v20140218
PatchedMediaKeysNop
A polyfill to stub out EME draft 12 March 2015 on browsers without EME. All methods will fail.
PatchedMediaKeysWebkit
A polyfill to implement EME draft 12 March 2015 on top of webkit-prefixed EME v0.1b.
PiPWebkit
A polyfill to provide PiP support in Safari. Note that Safari only supports PiP on video elements, not audio.
VideoPlaybackQuality
A polyfill to provide MSE VideoPlaybackQuality metrics. Many browsers do not yet provide this API, and Chrome currently provides similar data through individual prefixed attributes on HTMLVideoElement.
VideoPlayPromise
A polyfill to silence the play() Promise in HTML5 video.
VTTCue
A polyfill to provide VTTCue.

Members

(private, static, non-null) polyfills_ :Array.<{priority: number, callback: function()}>

Contains the polyfills that will be installed.
Type:
  • Array.<{priority: number, callback: function()}>
Source:

Methods

(export, static) installAll()

Install all polyfills.
Source:

(export, static) register(polyfill, priorityopt)

Registers a new polyfill to be installed.
Parameters:
Name Type Attributes Description
polyfill function()
priority number <optional>
An optional number priority. Higher priorities will be executed before lower priority ones. Default is 0.
Source: