Audio input device labels gotten by navigator.mediaDevices.enumeratedDevices() are empty
Categories
(Core :: Audio/Video, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: amejia, Assigned: padenot)
Details
Attachments
(1 file)
Original issue Fenix#16956
Steps to reproduce
- Run the following in the console
navigator.mediaDevices.getUserMedia({audio: true}).then(() => {
navigator.mediaDevices.enumerateDevices().then(devices => {
for (const device of devices)
console.log(device);
});
});
- Allow audio device permission if a dialog appears
- Check the results
Expected behavior
Audio input devices and video input devices labels are non-empty.
Actual behavior
Audio input devices labels are empty while video input devices labels are non-empty.
On Desktop/Android Chrome and Desktop Firefox the both labels are non-empty. So it may be Fenix specific problem.
Device information
- Android device: Samsung Galaxy 8+
- Fenix version: Nightly 201203 17:01 (Build #2015779275)
Assignee | ||
Comment 1•3 years ago
|
||
I'll do something today so that it's non-empty. We're not quite ready to do regular enumeration yet, and it might not make as much sense as it does on desktop.
Assignee | ||
Comment 2•3 years ago
|
||
I'll do it next year, couldn't find time to do it immediately.
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
I'm told by the fluent team that we should hard-code an en-US
string for now, and revisit this when bug 1660391 is fixed, since we don't have a JSContext
here.
Assignee | ||
Comment 4•3 years ago
|
||
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eb7671c9034a Put an hard-coded but non-empty label for audio devices on Android. r=jib
Comment 6•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 7•3 years ago
|
||
I find that navigator.mediaDevices.enumerateDevices().then(mediaDevices => {console.log(mediaDevices)})
produces blank labels. If I first use getUserMedia to attach a stream to an element, then labels are subsequently returned. Otherwise, labels return blank.
Steps to Reproduce
- Create test.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<video id="test"></video>
</body>
</html>
- Run in console:
navigator.mediaDevices.enumerateDevices().then(mediaDevices => {console.log(mediaDevices)})
I see no labels. - Run in console
navigator.mediaDevices.getUserMedia({video:true}).then(function(stream) { var video = document.getElementById('test'); video.srcObject = stream; })
to attach any video device - Run step 2 again and I see labels.
Version/Device
FF developer 90.0b11 (64-bit) desktop
Windows 10
Assignee | ||
Comment 8•3 years ago
|
||
This is expected. A website shouldn't be able to see the labels of the audio devices attached to the computer of a user, without the user having given consent to the use of these devices, to prevent website authors to fingerprint users.
Reference: https://w3c.github.io/mediacapture-main/getusermedia.html#device-information-can-be-exposed
Description
•