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: guest271314 via GitHub <sysbot+gh@w3.org>
Date: Tue, 17 Dec 2019 15:59:59 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-566605680-1576598398-sysbot+gh@w3.org>
If gather the issue correctly, could not a `<select multiple>` or equivalent UI be used to select multiple devices, where such implementation can be uniform across implementations?

```
  <form>
    <select multiple>
      <option value="camera_1">Camera 1</option>
      <option value="camera_2">Camera 2</option>
      <option value="audio_input">Audio input</option>
      <option value="audio_output">Audio output</option>
    </select>
    <input type="submit">
  </form>
  <pre></pre>
  <script>
    document.forms[0]
    .onsubmit = e => {
      e.preventDefault();
      e.target.nextElementSibling
      .textContent = JSON.stringify(
        [...e.target.elements[0].selectedOptions].map(({value}) => value)
      , null, 2);
    }
  </script>
```

For direct request for permission of multiple devices using `getUserMedia()` alone, one option would be to allow an array of constraints to be passed

```
getUserMedia({audio:true, video:true})` // default
.then(permission_stream => enumerateDevices()) // permission required #640
.then(devices => {
   getUserMedia([
    {audio:{deviceId:{exact:<device_id>}}}
  , {audio:{deviceId:{exact:<other_device_id>}}}
  , {video:{deviceId:{exact:<specific_device_id>}}}
  ])
})
```

-- 
GitHub Notification of comment by guest271314
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/652#issuecomment-566605680 using your GitHub account
Received on Tuesday, 17 December 2019 16:00:00 UTC

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