W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > December 2019

Re: [mediacapture-main] In-content device selection a mistake. Too complicated, leaks info (#652)

From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
Date: Wed, 18 Dec 2019 00:07:48 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-566805901-1576627667-sysbot+gh@w3.org>
https://github.com/w3c/mediacapture-main/pull/644#issuecomment-566248295 accomplishes this by tweaking the existing `getUserMedia` request method a bit, and relying on browsers to figure out the rest from context. E.g.:
camera.innerText = cameraTrack.label;

camera.onclick = async () => {
  const deviceId = cameraTrack.getSettings().deviceId;
  cameraTrack = (await getUserMedia({video: {deviceId}})).getVideoTracks()[0];
...brings up a selector with the existing device as default (like Firefox does on initial prompt), except instead of "Don't Allow"/"Allow", users might see "Cancel"/"Allow" so they can back out safely.

Details are up to browsers. The context here is the application has permission to a device already.

GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/652#issuecomment-566805901 using your GitHub account
Received on Wednesday, 18 December 2019 00:07:50 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:49 UTC