Re: [mediacapture-main] enumerateDevices can be used to track user devices in background pages (#561)

There is the case of a page being loaded (so it has focus) that can instantiate a 1000 frames which will have focus at that time (hence with a [[storedDeviceList]] set as null). Each frame can then be used to call enumerateDevices at different times.

Options 1 to 4 can probably be specced so that at the first enumerateDevices call, in case [[storedDeviceList]] is null and page has not focus, do a specific handling like setting [[storedDeviceList]] to the empty list.

With that change, option 1 (which should also include triggering the devicechange event when getting focus) might be ok, and would be the occasion to have enumerateDevices return an empty array :)

5 seems simpler to spec, simpler to implement and web compatible.
Is there any downsides compared to the above options?

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

Received on Friday, 25 January 2019 06:04:44 UTC