Navigator.mediaCapabilities

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The Navigator.mediaCapabilities read-only property returns a MediaCapabilities object that can expose information about the decoding and encoding capabilities for a given format and output capabilities as defined by the Media Capabilities API.

Syntax

mediaCapabilitiesObj = globalObj.navigator.mediaCapabilities

Value

A MediaCapabilities object.

Examples

navigator.mediaCapabilities.decodingInfo({
    type : 'file',
    audio : {
        contentType : "audio/mp3",
        channels : 2,
        bitrate : 132700,
        samplerate : 5200
    } 
}).then(function(result) {
  console.log('This configuration is ' +
        (result.supported ? '' : 'not ') + 'supported, ' +
        (result.smooth ? '' : 'not ') + 'smooth, and ' +
        (result.powerEfficient ? '' : 'not ') + 'power efficient.')
});

Specifications

Specification Status Comment
Media Capabilities Draft Initial definition

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support66 No63 No55 No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support6666 No6355 No ?

See also

Document Tags and Contributors

Contributors to this page: mfuji09, estelle
Last updated by: mfuji09,