The MediaDevices API allows websites to enumerate available cameras, microphones, and speakers, which can be used for fingerprinting.
🔬 How It Works
navigator.mediaDevices.enumerateDevices()
.then(devices => {
devices.forEach(device => {
console.log(device.kind); // "audioinput", "videoinput", "audiooutput"
console.log(device.label); // Device name (if permission granted)
console.log(device.deviceId); // Unique device identifier
});
});
📊 Fingerprinting Data
- Number of devices: How many cameras/mics you have
- Device IDs: Unique identifiers per device
- Device labels: Names like "HD Webcam C920"
- Device types: Input vs output devices
🛡️ Antidetect Handling
Antidetect browsers can spoof the number and types of media devices, or return empty lists to appear as a device without camera/microphone.