MediaCapabilities

The MediaCapabilities interface of the Media Capabilities API provides information about the decoding abilities of the device, system and browser. The API can be used to query the browser about the decoding abilities of the device based on codecs, profile, resolution, and bitrates. The information can be used to serve optimal media streams to the user and determine if playback should be smooth and power efficient.

The information is accessed through the mediaCapabilities property of the Navigator interface.

Methods

MediaCapabilities.encodingInfo()
When passed a valid media configuration, it returns a promise with information as to whether the media type is supported, and whether encoding such media would be smooth and power efficient.
MediaCapabilities.decodingInfo()
When passed a valid media configuration, it returns a promise with information as to whether the media type is supported, and whether decoding such media would be smooth and power efficient.

Specifications

Specification Status Comment
Media Capabilities
The definition of 'MediaCapabilities' in that specification.
Draft Initial definition

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
MediaCapabilities
Experimental
Chrome Full support 66Edge Full support ≤79Firefox Full support 63IE ? Opera Full support 55Safari ? WebView Android Full support 66Chrome Android Full support 66Firefox Android Full support 63Opera Android Full support 48Safari iOS ? Samsung Internet Android Full support 9.0
decodingInfo
Experimental
Chrome Full support 66Edge Full support ≤79Firefox Full support 63IE ? Opera Full support 55Safari ? WebView Android Full support 66Chrome Android Full support 66Firefox Android Full support 63Opera Android Full support 48Safari iOS ? Samsung Internet Android Full support 9.0
encodingInfo
Experimental
Chrome Full support 67
Disabled
Full support 67
Disabled
Disabled From version 67: this feature is behind the chrome://flags/#enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in Chrome, visit chrome://flags.
Edge Full support ≤79
Disabled
Full support ≤79
Disabled
Disabled From version ≤79: this feature is behind the chrome://flags/#enable-experimental-web-platform-features preference (needs to be set to enabled).
Firefox Full support 63IE ? Opera ? Safari ? WebView Android No support NoChrome Android Full support 67
Disabled
Full support 67
Disabled
Disabled From version 67: this feature is behind the chrome://flags/#enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in Chrome, visit chrome://flags.
Firefox Android Full support 63Opera Android ? Safari iOS ? Samsung Internet Android No support No

Legend

Full support
Full support
No support
No support
Compatibility unknown
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
User must explicitly enable this feature.
User must explicitly enable this feature.

See also