Media Capabilities
Which video and audio formats decode smoothly and power-efficiently on this device.
In one line
Can ask how well your device plays each video and audio format
Which video and audio formats decode smoothly and power-efficiently on this device.
Reveals hardware decoder generation, HDR support and codecs (AV1, HEVC, VP9, Dolby) and so GPU and OS tier. Sites use it to pick streams; it also fingerprints the device.
What it can and can't do
What the user does: Nothing. It happens when a video page or player loads
It can
- Check which formats play smoothly and save battery
- Check for HDR and codec support such as AV1, HEVC, or Dolby
- Pick the best stream for your screen
- Guess your graphics tier from the answers
It cannot
- See your videos or watch history
- See your exact graphics card
- Ask about formats the browser does not know
- Change how your device plays video
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 66 | 2018-04-17 | None |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Supported | 63 | 2018-10-23 | None |
| Safari | Supported | 13 | 2019-09-19 | None |
| Safari on iPhone | Supported | 13 | 2019-09-19 | None |
| Chrome on Android | Supported | 66 | 2018-04-17 | None |
| Samsung Internet | Supported | 9.0 | 2018-09-15 | None |
How a site asks for it
| API | navigator.mediaCapabilities.decodingInfo(), encodingInfo() |
| Browser compat keys | api.MediaCapabilities.decodingInfo |
| How access is granted | none |
| What the user sees | None |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | read fresh on every page load; nothing stored |
| How to take it back | none needed (no grant) |
| Inside an iframe | Readable from cross-origin iframes too (same values) |
Typical flow
- Page script reads the value
- No prompt is shown
Data you get
Shape: object
How often: static per session
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
supported | boolean | None | true or false | Not listed |
smooth | boolean | None | true or false | Not listed |
powerEfficient | boolean | None | true or false | Not listed |
Technical limits
- Answers per queried configuration; nothing listed upfront
- Cannot enumerate all codecs at once
The story
What it is
Tells a page which video and sound formats play smoothly and use little battery on your device.
For you
You never see it. It helps your video start in the best quality your device can really play, without stutter or a hot laptop. The cost is that the answers also say a lot about your hardware.
For makers
Streaming sites use it to choose between formats like AV1, HEVC and VP9 and to avoid choppy video. It reveals decoder generation, HDR and GPU tier. That makes it useful to measure users and to fingerprint them.
Where you see it
| Type | Example | Apps |
|---|---|---|
| video | A streaming site picks 4K HDR for a TV-class display and 1080p for a basic laptop. | Netflix, Disney+ |
| video | A video site chooses AV1 only on devices with a hardware decoder, to save battery. | YouTube |
| games | A cloud gaming site picks the stream format that your device decodes smoothly for low delay. | Xbox Cloud Gaming, GeForce NOW |
| live | A live sports stream drops to a simpler format on a phone that cannot decode the best one smoothly. | None named |
| video | A video call app selects an encoder that will not overheat your device. | Zoom |
| ads | A video ad server picks a creative format your device decodes without lag. | None named |
| security | A fingerprint vendor reads the decoder answers to tell GPU generations apart. | None named |
Risks
- Shows hardware tier
- Useful for fingerprinting
What the platform says
- MDN: Media Capabilities API. Docs describe it as a way for sites to choose smooth, power-friendly streams.
- Google: Media Capabilities on web.dev. Chrome teams say it helps sites pick the best video quality for each device.
Good uses and abuse
Legitimate uses
- Adaptive streaming
- Pick HDR stream
Known abuse
- Hardware generation inference
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 3 | Rough identifying entropy, when known |
Related capabilities
Related
- Codec support probing. Can test which video and audio formats your browser can play
Sources
How well checked: Based on official documentation.