enumerateDevices (camera, mic, speakers count)
Lists the kinds and counts of cameras, microphones and speakers (labels only after permission).
In one line
Can count your cameras, microphones and speakers, but names stay hidden until you allow
Lists the kinds and counts of cameras, microphones and speakers (labels only after permission).
Counts of cameras and microphones separate laptops from desktops and show headset use. Without permission labels and IDs are empty.
What it can and can't do
What the user does: Nothing. It happens when the page loads, like a video call lobby.
It can
- Count how many cameras, microphones and speakers you have
- Tell which kinds of devices are plugged in
- Show device names once you allow camera or microphone access
It cannot
- See device names before you allow camera or microphone access
- Turn on your camera or microphone by itself
- See other gadgets such as printers or USB devices
- Record anything
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() |
| Browser compat keys | api.MediaDevices.enumerateDevices |
| How access is granted | none |
| What the user sees | None (no browser prompt) |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | Not listed |
| How to take it back | Not listed |
| Inside an iframe | Not listed |
Typical flow
- Script reads the value
- Value joins the fingerprint payload
Data you get
What comes back: enumerateDevices (camera, mic, speakers count)
Shape: list
How often: on device change
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
kind | enum | None | audioinput, audiooutput, videoinput | Not listed |
deviceId | string | None | empty without permission | Not listed |
Technical limits
- No labels without a media permission
- IDs reset when site data is cleared
The story
What it is
A page can list how many cameras, mics and speakers you have.
For you
You never see it. A call app uses it to show a list of your mics and cameras. A page can also see how many you have without asking.
For makers
Makers need it to offer 'pick your camera' menus. Fraud and tracking tools use the count as one more detail that sets your device apart.
Where you see it
| Type | Example | Apps |
|---|---|---|
| video | A call app shows a menu of your microphones and cameras. | Google Meet, Zoom web, Microsoft Teams |
| games | A browser game checks if you have a mic before offering voice chat. | Discord web |
| live | A streaming site lists your webcams so you pick one. | Twitch |
| security | A fraud tool sees that a visitor has no camera or mic, typical of a bot server. | None named |
| education | An online exam tool checks that a camera and mic exist. | None named |
| ads | An ad system adds device counts to its fingerprint of you. | None named |
Risks
- Fingerprinting
- Names after permission
What the platform says
- Mozilla: MediaDevices.enumerateDevices(). MDN says it returns a list of connected media inputs and outputs, with names hidden until permission.
Good uses and abuse
Legitimate uses
- Show device pickers
Known abuse
- Fingerprint input
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 3 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 | 4 | Rough identifying entropy, when known |
A real example: LinkedIn
Collector key(s): enumerateDevices. dataLimit 22.
Related capabilities
Related
- APFC / DNA device fingerprint (abuse prevention features). Can collect about 48 device traits and send them in secret with later requests
Sources
How well checked: Based on official documentation.