Class: shaka.polyfill.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.

Constructor

new 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.

Source:

Members

memoizedMediaKeySystemAccessRequests_ :Object.<(!string), (!MediaKeySystemAccess)>

A cache that stores the MediaKeySystemAccess result of calling `navigator.requestMediaKeySystemAccess` by a key combination of video/audio codec and key system string.
Type:
  • Object.<(!string), (!MediaKeySystemAccess)>
Source:

originalMcap :MediaCapabilities

A copy of the MediaCapabilities instance, to prevent Safari from garbage-collecting the polyfilled method on it. We make it public and export it to ensure that it is not stripped out by the compiler.
Type:
  • MediaCapabilities
Source:

Methods

canCastDisplayType_(videoConfignon-null) → {boolean}

Checks if the given media parameters of the video or audio streams are supported by the Cast platform.
Parameters:
Name Type Description
videoConfig VideoConfiguration The 'video' field of the MediaDecodingConfiguration.
Source:
Returns:
`true` when the stream can be displayed on a Cast device.
Type
boolean

decodingInfo_(mediaDecodingConfignon-null) → {Promise.<!MediaCapabilitiesDecodingInfo>}

Parameters:
Name Type Description
mediaDecodingConfig MediaDecodingConfiguration
Source:
Returns:
Type
Promise.<!MediaCapabilitiesDecodingInfo>

generateKeySystemCacheKey_(videoCodecnon-null, audioCodecnon-null, keySystemnon-null) → {string}

A method for generating a key for the MediaKeySystemAccessRequests cache.
Parameters:
Name Type Description
videoCodec string
audioCodec string
keySystem string
Source:
Returns:
Type
string

install()

Install the polyfill if needed.
Source: