Skip to Content
Platform.Ontology

Codec support probing

canPlayType and isTypeSupported answers across dozens of codecs.

Gets silentlyDevice detailsMediaWeb browsersWhen the page loadsWhile you use it

In one line

Can test which video and audio formats your browser can play

canPlayType and isTypeSupported answers across dozens of codecs.

Pattern of supported codecs (H.264, HEVC, AV1, VP9, AC-3, Opus, FLAC) separates browser build and OS. Chrome without proprietary codecs and Chromium builds stand out.

What it can and can't do

What the user does: Nothing. It happens when a page checks for video or audio support

It can

  • Ask whether your browser plays formats like H.264, AV1, VP9, or Opus
  • Choose a stream that plays without trouble
  • Tell browser builds and operating systems apart by the pattern
  • Spot Chromium builds that lack some codecs

It cannot

  • See your media files
  • See what you watched before
  • Learn your device model from this alone
  • Ask for formats the browser does not know about

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported32009-09-15None
EdgeSupported122015-07-29None
FirefoxSupported3.52009-06-30None
SafariSupported42009-06-08None
Safari on iPhoneSupported32009-06-17None
Chrome on AndroidSupported182012-06-27None
Samsung InternetSupported1.02013-04-27None

How a site asks for it

APIHTMLMediaElement.canPlayType(), MediaSource.isTypeSupported(), MediaRecorder.isTypeSupported()
Browser compat keysapi.HTMLMediaElement.canPlayType
How access is grantednone
What the user seesNone
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsread fresh on every page load; nothing stored
How to take it backnone needed (no grant)
Inside an iframeReadable from cross-origin iframes too (same values)

Typical flow

  1. Page script reads the value
  2. No prompt is shown

Data you get

Shape: object
How often: static per session

FieldTypeUnitRangePrecision
canPlayType resultenumNoneempty, maybe, probablyper MIME string

Technical limits

  • Does not say hardware acceleration

The story

What it is

Asks the browser which video and audio formats it can play, which paints a picture of your setup.

For you

You never see the question. What you get is a video that plays in the right format and does not stall. The same checks also show a site your browser build and operating system.

For makers

Streaming and calling sites must pick one of many codecs, since the wrong one fails or wastes battery. The pattern of answers also helps separate real browsers from fakes. Fingerprinters use it as a free signal.

Where you see it

TypeExampleApps
videoA streaming site picks AV1 on a new laptop and H.264 on an old one, so you get smooth playback.Netflix, YouTube
gamesA cloud gaming page picks the video format your browser can decode quickest to lower input lag.Xbox Cloud Gaming, GeForce NOW
videoA video call tool chooses VP9 or H.264 depending on what the browser supports and how hot the laptop is.Google Meet, Jitsi
musicA web music player picks the best audio format your browser handles.None named
creativeA browser video editor checks which export formats will work on your device.Clipchamp
adsA video ad server selects the file format that your player can show without a glitch.None named
securityA fraud tool compares the codec list with the browser it claims to be.None named

Risks

  • Identifies browser build
  • Used as a fingerprint input

What the platform says

Good uses and abuse

Legitimate uses

  • Fallback selection

Known abuse

  • Browser build fingerprint

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits2.5Rough identifying entropy, when known

Sources

How well checked: Based on official documentation.

On this page