Class: shaka.polyfill

A one-stop installer for all polyfills.

Constructor

new polyfill()

A one-stop installer for all polyfills.

Source:
See:

Classes

Aria
A polyfill to add support for the ARIAMixin interface mixin, for browsers that do not implement it (e.g. Firefox). Note that IE also does not support ARIAMixin, but this polyfill does not work for that platform, as it relies on getters and setters.
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.
MathRound
A polyfill to patch math round bug on some browsers.
MediaCapabilities
A polyfill to provide navigator.mediaCapabilities on all browsers. This is necessary for Tizen 3, Xbox One and possibly others we have yet to discover.
MediaSource
A polyfill to patch MSE bugs.
Orientation
A polyfill for systems that do not implement screen.orientation. For now, this only handles systems that implement the deprecated window.orientation feature... e.g. iPad.
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.
RandomUUID
A polyfill to provide window.crypto.randomUUID in all browsers.
StorageEstimate
A polyfill to provide navigator.storage.estimate in old webkit browsers. See: https://developers.google.com/web/updates/2017/08/estimating-available-storage-space#the-present
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

polyfills_ :Array.<{priority: number, callback: function()}>

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

Methods

installAll()

Install all polyfills.
Source:

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: