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

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