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

Re: [mediacapture-main] Prompt user to choose unless constraints reduce to 1. (#644)

From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
Date: Wed, 08 Jan 2020 20:10:53 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-572236354-1578514251-sysbot+gh@w3.org>
> I am fine with a PR allowing a browser to implement a device picker only in the case where there is more than one device to choose from.

@youennf Great! That's what this PR aims to do.

> I am not sure that "request permission to use" is not allowing this already.

It does, but merely allowing it doesn't make `getUserMedia` a reliable selector. When I click here:

<img width="300" src="https://user-images.githubusercontent.com/3136226/71021127-aceec300-20cb-11ea-8847-90da2c31fb65.png">
...I want to write:

```js
button.onclick = async () => {
  if (numberOfVideoInputDevices > 1) {
    const c = {video: {deviceId: cameraTrack.getSettings().deviceId}};
    cameraTrack = (await navigator.mediaDevices.getUserMedia(c)).getVideoTracks()[0];
  }
}
```
...and have that bring up a browser picker in all browsers (with "Logitech BRIO" as current choice).

This needs to be guaranteed, to replace in-content selection, which won't happen from vague prose.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/pull/644#issuecomment-572236354 using your GitHub account
Received on Wednesday, 8 January 2020 20:10:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:22:36 UTC