Re: [mediacapture-main] Inconsistencies around double filtering of "devicechange" events (#810)

Proposal:
1. Move most of the [`enumerateDevices()`](https://w3c.github.io/mediacapture-main/#dom-mediadevices-enumeratedevices) parallel steps after the [[storedDeviceList]] check to a new "update the stored device list" algorithm.
2. Where [[storedDeviceList]] is currently initialized or set to `null`, instead "update the stored device list".  [[storedDeviceList]] will never be `null`.
3. Remove filtering *before* the notification steps and instead run the device change notification steps (either immediately or later according to when the browsing context meets the [device enumeration can proceed](https://w3c.github.io/mediacapture-main/#device-enumeration-can-proceed) criteria), irrespective of [device information can be exposed](https://w3c.github.io/mediacapture-main/#device-information-can-be-exposed), if new media input and/or output devices are made available, or any available input and/or output device becomes unavailable, or a system default device changes.


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


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

Received on Wednesday, 4 August 2021 07:38:07 UTC