Class: shaka.polyfill.MediaSource

A polyfill to patch MSE bugs.

Source:

Methods

(private, static) blacklist_()

Blacklist the current browser by making MediaSourceEngine.isBrowserSupported fail later.
Source:

(private, static) cleanUpListeners_(event)

An event listener for 'sourceclose' which cleans up listeners for 'updateend' to avoid memory leaks.
Parameters:
Name Type Description
event Event
Source:
See:

(private, static) ignoreUpdateEnd_(event)

An event listener for 'updateend' which selectively suppresses the events.
Parameters:
Name Type Description
event Event
Source:
See:

(static) install()

Install the polyfill if needed.
Source:

(private, static) patchCastIsTypeSupported_()

Patch isTypeSupported() to parse for HDR-related clues and chain to a private API on the Chromecast which can query for support.
Source:

(private, static) patchEndOfStreamEvents_()

Patch endOfStream() to get rid of 'updateend' events that should not fire. These extra events confuse MediaSourceEngine, which relies on correct events to manage SourceBuffer state.
Source:

(private, static) stubAbort_()

Stub out abort(). On some buggy MSE implementations, calling abort() causes various problems.
Source: