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

Re: [mediacapture-main] Should we allow empty string device IDs? (#551)

From: youennf via GitHub <sysbot+gh@w3.org>
Date: Fri, 18 Jan 2019 21:48:59 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-455698743-1547848138-sysbot+gh@w3.org>
> That might work, but in that case I would expect a `devicechange` event to fire. I'd also expect the _deviceId_ to be usable in _getUserMedia_ before the event but not after, or perhaps during.

I am fine allowing this value in getUserMedia anytime (before and after).
As long as a MediaStreamTrack is live, you would expect that calling the same getUserMedia call should succeed.

> > allow some values (empty string, 'default') to be the same cross-origin.
> What does this accomplish that a random id doesn't?

Implementation-wise, this is more difficult to implement since you need to recall that this random value is actually equivalent to a default deviceId.
And it does not bring any value since it is not hiding anything.

'default'/empty string also convey in a better way the intent, which is to tell to the web page whether there is any available camera/microphone device, not whether there is a particular specific device that can be targeted.

That said, enumerateDevices should not even be used to check for camera/microphone existence in Safari since non default devices are not exposed. Maybe the solution is to just not return any device until it is proven that users have some confidence in the web site.

GitHub Notification of comment by youennf
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/551#issuecomment-455698743 using your GitHub account
Received on Friday, 18 January 2019 21:49:01 UTC

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