-
Notifications
You must be signed in to change notification settings - Fork 53
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
Requesting permissions needs to be able to ask for multiple things #92
Comments
Hmm, the first iteration of the spec had @jyasskin any objection with me adding |
Note that I'm effectively requesting |
No objection to Personally I kinda like @alvestrand's option 1, where the browser collects up all the On |
I think maybe we should settle on #83 before adding this? |
#83 is a discussion we had over and over... Regarding |
@mounirlamouri so I take it you're in favor of requestAll, then? I don't care so much what the JS API is as long as the underlying "request access" mechanism allows the full flexibility. |
To me, To quote the blog I credit with how web permissions today are modeled:
|
First of all, Android moved out of this system. Second of all, the problem with it is that Android used to (and still does for some apps) require the user to accept the permissions in order to install the applications. This means that users would be incentivized to say yes and overlook a couple of dodgy permissions. Obviously, there is no equivalent to this system on the Web and adding If your general concern is that websites would use this to prevent users access to the content unless the permissions are granted they can already do that. Any video chat app will not allow you to start using it unless you granted them at least mic access because you would have a broken experience otherwise. Will streamlining the methods make it more likely that websites will abuse it? Maybe. I don't know. Though, I don't think we should design based on this. |
What is the point of If we make something easier to do, then more people will do it. I also haven't heard a clear statement about what behavior proponents want out of |
Is the expectation that UX would be built to merge all possible combinations of requests? Laterally chasing generality leads to discovering problems no-one cares about in my experience. I'd like to point out of that |
Also, I can't tell whether this issue is about an algorithm for other specs to call, a new API for sites to call, or both. |
I would prefer option 1 unless this is intended to be a sort of "atomic" permission request: give my app all these permissions, or give me none of them. That seems like the semantic intent of "requestAll". Otherwise option 1's individual requests, with the browser maintaining UI flexibility for how to present them (separate prompts, dialog with checkboxes, etc.), makes the most sense to me. |
@domenic, the issue with the first option is that the UA will have to do some magic behind the hood in order to combine requests coming together. If the spec recommends to combine requests with |
If we do the "combining" thing, I would expect request(foo); request(camera); request(bar); request(microphone) to result in 3 simultaneous popups: foo, bar and (camera+microphone), becaue the camera+microphone is the only one that people will write special code for. I think that's "not too bad"; the WEBRTC spec already has language saying that if one does getusermedia(camera1); getusermedia(camera2) the prompts should be combined if possible. |
User agents already need to implement combining and/or stacking given the existing APIs. So I'm not sure why we need a new API for that given that we can't simplify the existing situation. I recommend focusing on modeling the existing world first, before adding more APIs. |
Yes, I don't think magic is pejorative here. User interface and presentation is precisely where we want browsers to have maximum flexibility to perform "magic" and improve, without being overly constrained by API surface. |
Closing per #83 |
(People interested in the original proposal ["multiple things need to be asked for in one UI operation"] probably want to track #191 instead.) |
When requesting permission, multiple things need to be asked for in one UI operation - the most common combination in MediaCapture being camera and microphone. There may be multiple suitable options, and the caller may have a preferred ranking.
Two solutions:
Combine multiple concurrent permission calls with promise.All, and state that the UI is responsible for presenting multiple requests as one request to the user. This seems complex and non-obvious.
Pass multiple lists of permissions as an argument to the "request permission" algorithm, with the assumption that the request succeeds only if one item is successful from each list.
The text was updated successfully, but these errors were encountered: