Constructor
new MCapEncryptionScheme()
Members
originalDecodingInfo_ :function(this:MediaCapabilities, !MediaDecodingConfiguration): !Promise<!MediaCapabilitiesDecodingInfo>
The original decodingInfo, before we patched it.
Type:
- function(this:MediaCapabilities, !MediaDecodingConfiguration): !Promise<!MediaCapabilitiesDecodingInfo>
Methods
convertToMediaKeySystemConfig_(decodingConfignon-null) → {MediaKeySystemConfiguration}
Convert the MediaDecodingConfiguration object to a
MediaKeySystemConfiguration object.
Parameters:
Name | Type | Description |
---|---|---|
decodingConfig |
MediaDecodingConfiguration | The decoding configuration. |
Returns:
The converted MediaKeys
configuration.
- Type
- MediaKeySystemConfiguration
getMediaKeySystemAccess_(requestedConfigurationnon-null) → {Promise<!MediaKeySystemAccess>}
Call navigator.requestMediaKeySystemAccess to get the MediaKeySystemAccess
information.
Parameters:
Name | Type | Description |
---|---|---|
requestedConfiguration |
MediaDecodingConfiguration | The requested decoding configuration. |
Returns:
A Promise to a
MediaKeySystemAccess instance.
- Type
- Promise<!MediaKeySystemAccess>
install()
Installs the polyfill. To avoid the possibility of extra user prompts,
this will shim MC so long as it exists, without checking support for
encryptionScheme upfront. The support check will happen on-demand the
first time MC is used.
polyfillDecodingInfo_(requestedConfigurationnon-null) → {Promise<!MediaCapabilitiesDecodingInfo>}
A polyfill for mediaCapabilities.decodingInfo to handle the
encryptionScheme field in browsers that don't support it. It uses the
user-agent string to guess what encryption schemes are supported, then
those guesses are used to reject unsupported schemes.
This:
- MediaCapabilities
Parameters:
Name | Type | Description |
---|---|---|
requestedConfiguration |
MediaDecodingConfiguration | The requested decoding configuration. |
Returns:
A Promise to a result
describing the capabilities of the browser in the request configuration.
- Type
- Promise<!MediaCapabilitiesDecodingInfo>
probeDecodingInfo_(requestedConfigurationnon-null) → {Promise<!MediaCapabilitiesDecodingInfo>}
A shim for mediaCapabilities.decodingInfo to check for encryptionScheme
support. Only used until we know if the browser has native support for the
encryptionScheme field.
This:
- MediaCapabilities
Parameters:
Name | Type | Description |
---|---|---|
requestedConfiguration |
MediaDecodingConfiguration | The requested decoding configuration. |
Returns:
A Promise to a result
describing the capabilities of the browser in the request configuration.
- Type
- Promise<!MediaCapabilitiesDecodingInfo>