Class: shaka.polyfill.MediaSource

A polyfill to patch MSE bugs.

Constructor

new MediaSource()

A polyfill to patch MSE bugs.

Source:

Methods

blacklist_()

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

install()

Install the polyfill if needed.
Source:

patchRemovalRange_()

Patch remove(). On Safari 11, if you call remove() to remove the content up to a keyframe, Safari will also remove the keyframe and all of the data up to the next one. For example, if the keyframes are at 0s, 5s, and 10s, and you tried to remove 0s-5s, it would instead remove 0s-10s. Offsetting the end of the range seems to be a usable workaround.
Source:

patchVp09_()

Patch isTypeSupported() to translate vp09 codec strings into vp9, to allow such content to play on older smart TVs.
Source:

rejectCodec_(codec)

Patch |MediaSource.isTypeSupported| to always reject |codec|. This is used when we know that we are on a platform that does not work well with a given codec.
Parameters:
Name Type Description
codec string
Source:

rejectContainer_(container)

Patch |MediaSource.isTypeSupported| to always reject |container|. This is used when we know that we are on a platform that does not work well with a given container.
Parameters:
Name Type Description
container string
Source:

stubAbort_()

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