Media devices fingerprinting sees a permission-filtered list. Learn what enumerateDevices reveals, how site permissions work, and when device IDs reset.
Key Takeaways
- Media devices fingerprinting sees a filtered view.
enumerateDevices()does not guarantee an exact inventory of your cameras, microphones or speakers before permission. - Access belongs to the calling origin and context. A grant for one site does not unlock device labels for every other site.
- Identifiers are resettable.
deviceIdis origin-scoped, resets when cookies are cleared, and uses different, nonpersistent values in private browsing. - Hardware clues can still contribute to a fingerprint. Available labels, kinds and grouping may reveal a setup, but they do not establish a unique person or a measured amount of entropy.
Here, an origin is the combination of scheme, host and port. It defines the scope of access discussed below.
A conferencing page needs a device picker so you can choose a webcam or headset. The same information can contribute to tracking. The privacy boundary is what the browser lets that particular page see at that moment, rather than every device attached to the computer.
What enumerateDevices() actually returns
MDN’s enumerateDevices documentation describes a permission-filtered list. Permissions Policy can exclude devices; non-default devices require permission. The method needs a secure context (normally HTTPS) and a fully active, visible document. Enumeration itself does not request capture access or start recording.
Each returned entry has a kind: audioinput, audiooutput or videoinput. Its other fields are deviceId, an opaque device identifier; label, a display name when exposed; and groupId, which relates entries belonging to the same physical device. An empty field means information was not exposed, not that the hardware lacks a name or identity.
Before permission and during permitted capture
The W3C Media Capture and Streams draft limits camera and microphone lists to at most one entry per kind when the corresponding information cannot be exposed, with empty identifying fields. Active capture and, where supported, persistent permission can enable richer information. Camera and microphone exposure are evaluated separately; output devices have their own filtering rules.
This makes “no prompt appeared” a poor description of the exposure state. The origin might already have a stored grant or an active stream. Conversely, a fresh origin may see only restricted entries. A previous grant to an unrelated conferencing site is not blanket authorization for the page you are visiting now. Embedded frames also have to satisfy applicable policy restrictions. See Permissions API fingerprinting for the difference between checking permission state and actually using a feature.
Inspect the visible list without requesting capture
Run this in the developer console of a page you intend to inspect. It calls enumeration without calling getUserMedia() and displays the returned fields locally:
async function inspectVisibleMediaDevices() {
if (!navigator.mediaDevices?.enumerateDevices) return null;
try {
const devices = await navigator.mediaDevices.enumerateDevices();
return devices.map(({ kind, deviceId, groupId, label }) => ({
kind, deviceId, groupId, label
}));
} catch (error) {
return { error: error.name };
}
}
console.log(await inspectVisibleMediaDevices());
Interpret the result as entries exposed to this document. Two audioinput entries do not prove that exactly two physical microphones exist. One entry does not prove that there is only one microphone. Zero entries can reflect filtering or unavailable devices; a failed call is a separate outcome.
For a controlled comparison, record the browser, origin, embedded or top-level context, existing grants and whether capture is active. Then, only if you need the site's calling feature, compare after deliberately granting it access. Do not grant a random test site camera access merely to obtain a fuller fingerprint report. Avoid publishing raw IDs or labels in screenshots or logs.
deviceId persistence and groupId boundaries
MDN’s deviceId reference states that IDs can persist across sessions for an origin, but clearing cookies resets them. Private browsing uses different identifiers that are not retained across private sessions. A cache-only clear should not be treated as the same action as clearing cookies and site data.
That reset does not unplug a webcam or change the descriptive information a permitted page may later observe. The ID is a browser-provided token, not a hardware serial number. A changed ID and an unchanged hardware setup can both be true. This distinction matters when comparing media devices with the other signals discussed in persistent visitor IDs.
When exposed, matching groupId values associate components of one physical device, such as a headset's microphone and speaker. The standard defines these group identifiers per document; do not treat them as durable cross-session IDs. Labels help people choose devices, but applications cannot assume a label always contains an exact model.
How much tracking does this enable?
A visible list may help distinguish setups when combined with WebGL or canvas. This is a possible contribution, not evidence that every visitor has a unique device list. Measuring uniqueness requires population data, repeated observations and attention to permissions. No such measurement is supplied here, and independence from other signals should not be assumed.
Media enumeration also differs from the codecs and SDP discussed in WebRTC fingerprinting, and from IP exposure covered in WebRTC leak protection. A device label is not an IP address. The browser fingerprinting guide explains how multiple observations may be combined.
Practical privacy checks
Review camera and microphone permissions in browser site settings and revoke grants you no longer need. Stop active calls and close their tabs when finished. If you want to reset stored device identifiers, clear the relevant cookies and site data, understanding that this may sign you out. Review permissions separately rather than assuming every browser's data-clearing dialog revokes them.
Unplugging unused peripherals changes the physical setup, but is no guarantee against fingerprinting. Test with the same browser and permission context before drawing conclusions. Run BrowserInsight's fingerprint test to inspect exposed browser signals, including counts of visible media-device entries. Those counts reflect the test page's access, not a complete hardware inventory. Use this article's snippet to inspect the fields exposed to another page.
If your device appears but a call still fails, follow our browser camera and microphone troubleshooting guide to check device selection, site permissions and system access in order.
Frequently Asked Questions
Can a page enumerate devices without a new prompt?
Yes, when its context meets the API requirements. The returned list is still filtered. Calling enumeration does not itself grant capture permission.
Can it count all my cameras before I grant access?
Not reliably. Restricted results can hide additional cameras and microphones. Count returned entries rather than claiming an exact physical inventory.
Does permission granted on another site expose my labels here?
No blanket grant transfers between unrelated origins. Evaluate this origin's permissions, active capture and embedding policy.
Does clearing cookies reset deviceId?
Yes. The opaque identifier resets; the physical devices remain. Private-session identifiers are different and nonpersistent across sessions.


