Device enumeration spec-ed to hang
- The User Agent MUST wait to proceed to the next step until device enumeration can proceed is true .
But the device enumeration can proceed check can return false, in which case... we should hang indefinitely? This does not seem to match the implementation in Chromium, Safari or Firefox. It also seems unreasonable. Am I misreading this?
This is a parallel step, so the browser doesn't hang. The promise is just not settled yet.
Firefox waits until "the relevant global object's associated Document is fully active" and the browser window has OS-level focus.
Not settling the promise means the following code would "hang", in that it never continues execution past await:
const devices = await navigator.mediaDevices.enumerateDevices();
doUsefulThings(devices);
No implementation I aware of actually follows this algorithm. The promise is settled in all of them.
Seems like we need to have an UMA to figure out whether this anti-tracking feature will break websites.
Firefox implemented this a year ago.
Not continuing execution past await is not a "hang", so there is no issue here, nor is this new information to reopen our previous decision. I suggest closing it.
I filed https://bugs.webkit.org/show_bug.cgi?id=245864 to keep track of this work in WebKit.
Substantive discussion seems to be occuring in #905. Closing this as a duplicate thread.