W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > January 2020

Re: [mediacapture-main] Most browsers lie about how many devices they ask users to share (#648)

From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
Date: Thu, 09 Jan 2020 20:49:14 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-572748675-1578602953-sysbot+gh@w3.org>
@youennf  Thanks for clarifying. I didn't mean to mischaracterize Safari's behavior. I based this on observation, not insight into internal heuristics. But when I run [this code](https://jsfiddle.net/jib1/kvcLyj03/) in Safari on MacOS:
```js
const gUM = constraints => navigator.mediaDevices.getUserMedia(constraints);

video1.srcObject = await gUM({video: true});
const [track1] = video1.srcObject.getVideoTracks();

const devices = await navigator.mediaDevices.enumerateDevices();
const [cam1, cam2] = devices.filter(({kind}) => kind == "videoinput");
const cam = (cam1.deviceId == track1.getSettings().deviceId)? cam2 : cam1;
video2.srcObject = await gUM({video: {deviceId: {exact: cam.deviceId}}});
```
...I get access to two cameras after a single prompt asking for one camera. From an end-user's point of view, who is not privy to these heuristics, this seemed surprising to me given the wording.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/648#issuecomment-572748675 using your GitHub account
Received on Thursday, 9 January 2020 20:49:16 UTC

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