Class: shaka.polyfill

A one-stop installer for all polyfills.

Classes

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.
IndexedDB
A polyfill to patch IndexedDB bugs.
InputEvent
A polyfill to patch 'input' event support in IE11.
MathRound
A polyfill to patch math round bug on some browsers.
MediaSource
A polyfill to patch MSE bugs.
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.
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: