System / 02

Codec matrix.

Probes HTMLMediaElement.canPlayType for every common video and audio codec. Tells you which streams your browser can decode natively.

Notes

'maybe' means the container is recognised but codec specifics aren't guaranteed. Cross-check with an actual playback test for production confidence.

How it works

We create temporary <video> and <audio> elements and call .canPlayType(mimeString) for each codec under test. The browser returns 'probably', 'maybe', or empty.

For finer-grained checks the modern alternative is MediaCapabilities.decodingInfo() — it returns decode performance hints (smooth, power-efficient) per resolution. Worth using in production picker logic; this page reports the simpler boolean check.

Frequently asked

What do 'probably', 'maybe', and empty mean?

These come straight from HTMLMediaElement.canPlayType. 'probably' = browser is confident the file will play. 'maybe' = the container is supported but the codec might not be (or vice versa). Empty string = definitely cannot play. The HTML5 spec deliberately avoids 'yes' because actual playability depends on file specifics.

Why doesn't my browser support HEVC?

HEVC is patent-encumbered. Apple licenses it (Safari plays HEVC). Chrome / Edge play it only when the OS has hardware HEVC decode (most Windows 11 systems). Firefox does not support HEVC at all due to licensing costs. For cross-platform: use H.264 or AV1.

Should I serve AV1?

Increasingly yes — Chrome 70+, Firefox 67+, Edge 75+, Safari 17+ all support it. Hardware decode is shipping on most laptops sold after 2022. AV1 is 30-50% smaller than H.264 at equal quality, so the bandwidth win is significant once your audience's browsers catch up.

What about codecs for Live streaming?

Live needs hardware encode, which is rarer than decode. H.264 is universal for live (every browser, OBS, every CDN). VP9 / AV1 live encode requires beefier hardware and is mostly limited to YouTube / Twitch on the producer side.