Skip to Content
Platform.Ontology

enumerateDevices label gating

Lists camera, microphone and speaker counts; names only after permission.

Gets silentlyCamera, mic and screenCaptureWeb browsersWhile you use it

In one line

Can count your cameras, mics and speakers, but names stay hidden until you allow access

Lists camera, microphone and speaker counts; names only after permission.

Reveals how many cameras, mics and speakers exist (before consent, labels empty), and device names after consent. Counts and kinds are a mild fingerprint and show setup type.

What it can and can't do

What the user does: Nothing. It happens when a call or recording page loads

It can

  • Tell how many cameras, microphones and speakers you have
  • Find out which kinds of devices exist before asking for access
  • Show device names after you have allowed the camera or microphone

It cannot

  • See device names before the site has camera or microphone access
  • Turn any device on or capture anything by itself
  • Show a prompt, so you only know it happened if the site tells you
  • List devices that are unplugged

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported472015-12-01None
EdgeSupported122015-07-29None
FirefoxSupported1162023-08-01None
SafariSupported112017-09-19None
Safari on iPhoneSupported112017-09-19None
Chrome on AndroidSupported472015-12-02None
Samsung InternetSupported5.02016-12-15None

How a site asks for it

APInavigator.mediaDevices.enumerateDevices(); devicechange event
Permission namecamera or microphone (for labels)
Browser compat keysapi.MediaDevices.enumerateDevices
How access is grantednone
What the user seesNo prompt for the counts; labels appear once the origin has an active camera or microphone grant.
Needs a secure context (HTTPS)Yes
Needs a user gestureNo
How long it lastsPer origin once permitted
How to take it backRevoke camera or microphone
Inside an iframeNot delegated; follows the frame's own grants

Typical flow

  1. Call enumerateDevices()
  2. Receive list with kind and deviceId
  3. Labels empty until getUserMedia has been granted
  4. Listen to devicechange for plug events

Data you get

What comes back: Devices with kind, deviceId, groupId and label
Shape: list
How often: on call and on devicechange

FieldTypeUnitRangePrecision
kindenumnoneaudioinput, audiooutput, videoinput3 kinds
deviceIdstringopaque idper-origin32 hex
groupIdstringopaque idshared by a physical device's inputs and outputs32 hex
labelstringtextempty without grantdevice name

Technical limits

  • Labels need a grant
  • Device ids reset when site data is cleared
  • No serial numbers or vendor ids

The story

What it is

Lets a site count your cameras, mics and speakers, and see their names only after you allow access.

For you

You never see this one run. It happens in the background as a call page loads, so the site can show you a camera picker. Before you allow access, it only learns how many devices you have, not their names.

For makers

Call sites need a list of devices to build the camera and mic picker, and to pick a sensible default. Fraud and ad scripts can also use the device counts as one small clue in a device fingerprint. The maker gets setup data without asking you a thing.

Where you see it

TypeExampleApps
videoA web call opens a settings panel with a drop down of your headset, built in laptop mic and webcam, so you can choose the right one.Google Meet, Zoom web
gamesA browser game with voice chat lists your microphones, so you can pick your headset and not the laptop mic.Discord web
securityA fraud check notices a visitor has no cameras or mics at all, which is common for bots in a cloud server, and adds a risk point.HUMAN Security, Arkose Labs
adsAn ad script quietly counts your audio and video devices, and combines them with your screen size and fonts to build a device ID.None named
liveA streaming page checks whether a webcam is present before showing a Go live button, so it does not offer the feature when it cannot work.StreamYard, Twitch
developerA support tool logs device counts when a call fails, so engineers can see that a customer with no mic was stuck.Daily, Twilio Video

Risks

  • Counts add to a device fingerprint
  • Reveals what gear you own

What the platform says

  • Mozilla: enumerateDevices. Developer docs say it lists media input and output devices, with labels hidden until the person grants access.

Good uses and abuse

Legitimate uses

  • Audio and video device pickers

Known abuse

  • Counting devices to tell setup type
  • Persistent ids once granted

Scores

ScoreValueMeaning
Sensitivity2 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 bits3Rough identifying entropy, when known

A real example: LinkedIn

LinkedIn script enumerates devices and records kinds and counts without labels

History

  • 2025-09, Safari 26: Safari returns no devices when permission is denied and stops checking permission in enumerateDevices

Sources

How well checked: Based on official documentation.

On this page