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: 155Edge
12–100Not supported
101+Supportedsince Apr 28, 2022
Current: 154Firefox
1–62Not supported
63+Supportedsince Oct 23, 2018
Current: 157Safari
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27MobileChrome Android
18–100Not supported
101+Supportedsince Apr 26, 2022
Current: 155Firefox Android
4–62Not supported
63+Supportedsince Oct 23, 2018
Current: 157Safari iOS
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27How 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
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (5). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| MediaCapabilities | 66 | 79 | 63 | 13 | 66 | 63 | 13 |
| MediaCapabilities.decodingInfo | 66 | 79 | 63 | 13 | 66 | 63 | 13 |
| MediaCapabilities.encodingInfo | 101 | 101 | 63 | 15.4 | 101 | 63 | 15.4 |
| Navigator.mediaCapabilities | 66 | 79 | 63 | 13 | 66 | 63 | 13 |
| WorkerNavigator.mediaCapabilities | 76 | 79 | 63 | 15.4 | 76 | 63 | 15.4 |