Media devices
Cameras, Microphones, and Codecs
Device counts from enumerateDevices() plus the codec matrix from canPlayType(). Small individually, meaningful together.
Media devices & codecs
Reading signal in your browser...
The codec cross-check
Codec support tells anti-bot systems whether your browser is really what its UA claims. Every Chrome + OS + version combination has a well-known answer to canPlayType() for AV1, H.265, VP9, and FLAC. Any deviation is either a mis-spoofed UA or an unusual build (Chromium fork, Cobalt on TV, etc).
enumerateDevices, in practice
- Zero devices total on a desktop Chrome UA is highly suspicious.
- 0 audiooutputs is normal on Firefox / Safari, suspicious on Chrome.
- Non-zero labeledCount without a permission prompt on this origin is a leak; some stealth plugin is over-populating.
Frequently asked questions
→How does enumerateDevices work without a permission prompt?
It's supposed to return device counts (not labels) even without permission, so pages can decide whether to bother prompting. Chromium follows that. Firefox and Safari are stricter and often return zero for audio outputs. The count itself is the fingerprint signal.
→Why do labels matter?
Once the user grants camera or mic access, the browser starts returning device labels ('FaceTime HD Camera', 'USB Audio CODEC'). A page that sees labeled devices without having asked has a strong signal that the user recently granted permission to another origin, or that you're a scraper with a misconfigured stealth plugin.
→What does canPlayType() reveal?
Whether your browser can decode a given codec, and how confidently (returns 'probably', 'maybe', or ''). Codec support depends on OS-level hardware decoders, browser version, and feature flags. H.265/HEVC is a good separator: Safari on Apple silicon says 'probably', Chrome on Windows without hardware HEVC says ''.
→Which codec answers give scrapers away?
A UA claiming Chrome on macOS but reporting no VP9 support is impossible. A UA claiming Safari but supporting AV1 (which no Safari version does yet at time of writing) is impossible. Anti-bot detectors keep a table of the expected codec matrix per browser+OS+version.
→Can I fake enumerateDevices output?
Yes, by patching navigator.mediaDevices.enumerateDevices via evaluateOnNewDocument. Just return a plausible set: 1-2 audio inputs, 0-1 video inputs, 1-2 audio outputs on desktop; 0 outputs on Firefox/Safari.