Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device enumeration spec-ed to hang #903

Closed
eladalon1983 opened this issue Sep 22, 2022 · 6 comments
Closed

Device enumeration spec-ed to hang #903

eladalon1983 opened this issue Sep 22, 2022 · 6 comments

Comments

@eladalon1983
Copy link
Member

  1. 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?

@karlt
Copy link
Contributor

karlt commented Sep 22, 2022

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.

@eladalon1983
Copy link
Member Author

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.

@alvestrand
Copy link
Contributor

Seems like we need to have an UMA to figure out whether this anti-tracking feature will break websites.

@jan-ivar
Copy link
Member

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.

@youennf
Copy link
Contributor

youennf commented Sep 30, 2022

I filed https://bugs.webkit.org/show_bug.cgi?id=245864 to keep track of this work in WebKit.

@alvestrand
Copy link
Contributor

Substantive discussion seems to be occuring in #905. Closing this as a duplicate thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants