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

> But that's irrelevant to my point here: In Firefox, `deviceId` is invariant; it's always honored, and never changes from `""` to something else during the session, which is the part I object to.

Another way of describing how Safari is handling things is that, before the prompt, we enumerate some default devices with empty device IDs. After the prompt, the devices change: the default devices are removed and the real devices appear as new devices.
In that sense, we could say `deviceId` is invariant for a given device.

FWIW, providing device ids when filtering out some devices (as is doing Safari before prompt) is not super useful. For instance, a web app may grab the last deviceId being used, use enumerateDevices, sees that it is not matching any device and throw it. We should not encourage that pattern given the deviceId might actually relate to a non-default device.

I am now leaning towards option 2: allow some values (empty string, 'default') to be the same cross-origin.

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

Received on Thursday, 17 January 2019 16:52:37 UTC