- From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
- Date: Mon, 24 Jan 2022 21:50:57 +0000
- To: public-webrtc-logs@w3.org
> As currently written, the devicechange event steps MUST only happen when [device enumeration can proceed](https://w3c.github.io/mediacapture-main/getusermedia.html#device-enumeration-can-proceed), so the current behaviour is that events are only fired for active & focussed pages @tonyherre Not quite. That algorithm returns true if [device information can be exposed](https://w3c.github.io/mediacapture-main/getusermedia.html#device-information-can-be-exposed), which is effectively [[[canExposeCameraInfo]]](https://w3c.github.io/mediacapture-main/getusermedia.html#dfn-canexposecamerainfo) || [[[canExposeMicrophoneInfo]]](https://w3c.github.io/mediacapture-main/getusermedia.html#dfn-canexposemicrophoneinfo), which get set to true on gUM success. I.e. the spec mandates firing the event on background tabs that have called gUM successfully at least once since opened. As mentioned in the OP, it's only enumerateDevices that has an additional _"MAY ... wait ... until ... focus"_. We'd like to fix this. > ... moving the "MAY wait" into "device enumeration can proceed" would mean events are now fired on focus. This is [already required](https://w3c.github.io/mediacapture-main/getusermedia.html#dfn-device-change-notification-steps): _"Additionally, if a MediaDevices object that was traversed comes to meet the device enumeration can proceed criteria later (e.g. gains focus), the User Agent MUST execute the device change notification steps ... at that time."_ -- GitHub Notification of comment by jan-ivar Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/842#issuecomment-1020583420 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 24 January 2022 21:50:59 UTC