Re: [mediacapture-main] Bug in spec: circular dependency for enumerateDevices() (#709)

Not really, in step 4, you can check capture is using the device with the given id through the provided MediaStreamTrack.

If not, you can check enumerateDevices to know whether the device is there.
If it is not there, you keep the track.
If it is there, you make another getUserMedia call with exact constraints.

Although the spec does not require it, I think getUserMedia({ video : { deviceId: 'xyzxyzxyzxyz' } }) browser current implementations will always pick the device with the corresponding id, if the device is there and functional.
So you should be able to always stop at step 4.

In browsers that have pickers like Firefox, it might be actually better to stick with what the user selected (or ask the user if they would prefer to use the past device explicitly).

-- 
GitHub Notification of comment by youennf
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/709#issuecomment-685868816 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 2 September 2020 17:00:12 UTC