-
Notifications
You must be signed in to change notification settings - Fork 61
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
Should getUserMedia promise be resolved only on pages that have focus #560
Comments
Firefox has this behavior as well. Turning on camera/mic from a background tab is creepy. This might even be something that could go in the permissions spec. Having prompts appear from background tabs is generally a UX security issue. enumerateDevices() does not require permission, so I'd treat that as a separate issue I think. |
Right, Safari is not resolving getUserMedia promise even in the case where no prompt will be shown to user (say user granted persistent access to this website). One could think of relaxing this rule in case the device is already capturing. I guess the idea would be to postpone the whole getUserMedia process starting at step 6 until page has focus. |
Firefox has the same behavior. Testing with this fiddle in two tabs, Chrome and (early) Edge do not. @alvestrand @henbos @aboba thoughts?
I can submit a PR for discussion. Then we can argue over MAY, SHOULD or MUST, if we like this. |
Safari currently does not resolve/reject a getUserMedia promise until the view is visible.
This allows to start capture on a page that the user has access to.
Should this be mandated in the spec?
The same question might apply to enumerateDevices.
The text was updated successfully, but these errors were encountered: