- From: guest271314 via GitHub <sysbot+gh@w3.org>
- Date: Sun, 02 Aug 2020 17:11:04 +0000
- To: public-webrtc-logs@w3.org
This bug leads back to the sequence of events described at https://github.com/w3c/mediacapture-main/issues/703#issuecomment-653822239, specifically, the order should be `enumerateDevices()` permissions granted or not => `getUserMedia()` if permissions are granted, instead of `getUserMedia()` permissions granted or not => `enumerateDevices()` if granted - to avoid having to execute `getUserMedia()` twice to select one device intended to be selected ``` navigator.mediaDevices.getUserMedia({audio: true}) .then(async stream => { const [track] = stream.getTracks(); const devices = await navigator.mediaDevices.enumerateDevices(); console.log(devices); const {deviceId} = devices.find(({kind, label}) => kind === "audiooutput"); track.stop(); return navigator.mediaDevices.getUserMedia({audio:{deviceId:{exact: deviceId}}}); }) .then(stream => { console.log(stream.getTracks()[0]); // do stuff }) .catch(console.error); ``` where even then the same code cannot be run at both Chromium and Nighly 80 because Nighly lists `kind` of the device as `"audioinput"` and `label` as `"Monitor of Built-in Audio Analog Stereo"` where Chromium 86 lists `kind` as `audiooutput` and `label` as `"Default"`. Preferably the devices should be able to be selected before capture of the device is started. There should be consistency here. -- GitHub Notification of comment by guest271314 Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/708#issuecomment-667700128 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 2 August 2020 17:11:06 UTC