enumerateDevices label gating
Lists camera, microphone and speaker counts; names only after permission.
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
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 47 | 2015-12-01 | None |
| Edge | Supported | 12 | 2015-07-29 | None |
| Firefox | Supported | 116 | 2023-08-01 | None |
| Safari | Supported | 11 | 2017-09-19 | None |
| Safari on iPhone | Supported | 11 | 2017-09-19 | None |
| Chrome on Android | Supported | 47 | 2015-12-02 | None |
| Samsung Internet | Supported | 5.0 | 2016-12-15 | None |
How a site asks for it
| API | navigator.mediaDevices.enumerateDevices(); devicechange event |
| Permission name | camera or microphone (for labels) |
| Browser compat keys | api.MediaDevices.enumerateDevices |
| How access is granted | none |
| What the user sees | No 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 gesture | No |
| How long it lasts | Per origin once permitted |
| How to take it back | Revoke camera or microphone |
| Inside an iframe | Not delegated; follows the frame's own grants |
Typical flow
- Call enumerateDevices()
- Receive list with kind and deviceId
- Labels empty until getUserMedia has been granted
- 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
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
kind | enum | none | audioinput, audiooutput, videoinput | 3 kinds |
deviceId | string | opaque id | per-origin | 32 hex |
groupId | string | opaque id | shared by a physical device's inputs and outputs | 32 hex |
label | string | text | empty without grant | device 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
| Type | Example | Apps |
|---|---|---|
| video | A 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 |
| games | A browser game with voice chat lists your microphones, so you can pick your headset and not the laptop mic. | Discord web |
| security | A 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 |
| ads | An 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 |
| live | A 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 |
| developer | A 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
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 3 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 |
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
Related capabilities
Related
- Camera (video capture). Can see and record live video from your camera while the tab is open
- Microphone (audio capture). Can hear and record live audio from your microphone while the tab is open
Sources
How well checked: Based on official documentation.