Note: Shows how many cameras, microphones, and speakers are detected. No permission needed.
The MediaDevices API categorizes devices into three types: videoinput (cameras), audioinput (microphones), and audiooutput (speakers/headphones). The distribution of these types creates a unique device fingerprint.
Device type classification helps applications present appropriate UI for device selection. Different device types have different use cases and capabilities.
Cameras: webcams, phone cameras (front/rear), capture cards
Microphones: built-in mics, USB mics, headset mics, line-in
Speakers/headphones: built-in speakers, external speakers, headphones, Bluetooth audio
1 videoinput, 1 audioinput, 2 audiooutput
Built-in webcam, mic, speakers, and headphone jack
0 videoinput, 0-1 audioinput, 1-2 audiooutput
Often no camera/mic, just speakers
2 videoinput, 2-3 audioinput, 2-3 audiooutput
Front/rear cameras, multiple mics, earpiece + speaker
3+ videoinput, 5+ audioinput, 3+ audiooutput
Multiple cameras, studio mics, audio interface
navigator.mediaDevices.enumerateDevices()
.then(devices => {
const types = {
videoinput: devices.filter(d => d.kind === 'videoinput').length,
audioinput: devices.filter(d => d.kind === 'audioinput').length,
audiooutput: devices.filter(d => d.kind === 'audiooutput').length
};
console.log(types);
});| Device | Video | Audio In | Audio Out | Total |
|---|---|---|---|---|
| MacBook Pro | 1 | 1 | 2 | 4 |
| Windows Laptop | 1 | 1-2 | 2-3 | 4-6 |
| iPhone | 2 | 3 | 2 | 7 |
| Android Phone | 2 | 2-4 | 2-3 | 6-9 |
| Desktop PC (basic) | 0 | 0 | 1 | 1 |
| Desktop + Webcam | 1 | 1-2 | 2-3 | 4-6 |
| Streaming Setup | 2-4 | 3-6 | 3-5 | 8-15 |
Device type distribution is one of the most effective fingerprinting techniques. The combination of how many cameras, mics, and speakers you have is highly unique and persistent.
Very few users have identical device type distributions. For example, "2 cameras, 3 mics, 4 speakers" is rare and identifies you uniquely.
Trackers can immediately identify:
Device types reveal user characteristics:
Device fingerprints are extremely stable:
Standard browsers don't offer protection because blocking would break legitimate sites:
Effectively preventing device type fingerprinting requires breaking video calling and many web applications. For most users, the trade-off isn't worth it. Consider this a "accept and be aware" privacy leak rather than something you can easily prevent.