[Webkit-unassigned] [Bug 179220] New: mediaDevices.enumerateDevices(), device ids change on page refresh
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 2 17:37:18 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=179220
Bug ID: 179220
Summary: mediaDevices.enumerateDevices(), device ids change on
page refresh
Product: WebKit
Version: WebKit Nightly Build
Hardware: Macintosh
OS: macOS 10.12
Status: NEW
Severity: Normal
Priority: P2
Component: WebRTC
Assignee: webkit-unassigned at lists.webkit.org
Reporter: webkit at xylil.com
CC: youennf at gmail.com
I've used the following Javascript as a test on Firefox, Chrome, and Safari:
var constraints = {
audio: false,
video: true,
};
navigator.mediaDevices.getUserMedia(constraints).then(function(stream) {
navigator.mediaDevices.enumerateDevices().then(function(devices) {
devices.forEach(function(device) {
console.log(device.kind + ": " + device.label + " id = " + device.deviceId);
});
});
}).catch(function(err) {
console.error("Device access checks failed: ", err, constraints);
});
Both Firefox and Chrome preserve device ids across page refreshes (further testing with Chrome shows they are preserved even across machine reboots).
However, Safari does not preserve the device ids at all -- they are completely different across page refreshes.
This is problematic, as it makes it much more difficult for applications to 'remember' which devices a user prefers, having to fall back to matching on device.label, which isn't fully reliable.
Confirmed this issue still exists as of r224308.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171103/85878215/attachment.html>
More information about the webkit-unassigned
mailing list