[Webkit-unassigned] [Bug 195093] Safari 12.1 : Issue with navigator.mediaDevices.enumerateDevices

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 28 00:38:51 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=195093

--- Comment #2 from Pradeep Kumar <pradeepkumar at bluejeans.com> ---
(In reply to youenn fablet from comment #1)
> Hi Pradeep,
> 
> You are right.
> We changed a bit our fingerprinting enumerateDevices mitigation.
> I would be interested in your feedback there.
> 
> Device IDs should now remain stable after getUserMedia is granted even after
> page reload.
> The device IDs will only be communicated after getUserMedia being granted.
> That should allow picking the same device as previously as follows:
> 
> let stream;
> let deviceId = window.localStorage.getItem('preferredMicrophoneId');
> const constraint = deviceId ? {audio : {deviceId: {exact: deviceId}}} :
> {audio: true};
> try {
>     stream = await navigator.mediaDevices.getUserMedia(constraint);
> } catch (e) {
>    // In case of overconstrainederror, call getUserMedia({audio: true})
> }
> deviceId = stream.getAudioTracks()[0].getSettings().deviceId;
> window.localStorage.setItem('preferredMicrophoneId', deviceId);

Hi Youenn,
Thanks for quick reply. The work around, you are suggesting, it works.

-- 
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/20190228/f9368c86/attachment.html>


More information about the webkit-unassigned mailing list