coderef

Media capabilitiesBaseline · Widely available

The navigator.mediaCapabilities API queries the encoding and decoding abilities of the device, such as supported codecs, resolutions, and bitrates.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Apr 28, 2022. Widely available since Oct 28, 2024.

Browser support

DesktopChrome
1–100Not supported
101+Supportedsince Apr 26, 2022
Current: 155
Edge
12–100Not supported
101+Supportedsince Apr 28, 2022
Current: 154
Firefox
1–62Not supported
63+Supportedsince Oct 23, 2018
Current: 157
Safari
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27
MobileChrome Android
18–100Not supported
101+Supportedsince Apr 26, 2022
Current: 155
Firefox Android
4–62Not supported
63+Supportedsince Oct 23, 2018
Current: 157
Safari iOS
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: MediaCapabilities.

Feature detection

JS · check before using
if ("MediaCapabilities" in globalThis) {
  // MediaCapabilities is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

Support for each part of the feature (5). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
MediaCapabilities66796313666313
MediaCapabilities.decodingInfo66796313666313
MediaCapabilities.encodingInfo1011016315.41016315.4
Navigator.mediaCapabilities66796313666313
WorkerNavigator.mediaCapabilities76796315.4766315.4