-
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 permission shouldn't imply storing it. #93
Comments
Before we transmute the text further, can we get a clear statement from its editors about what the intent of the "request a permission" algorithm is? - Confusion seems to abound about what its purpose is. Is it to elevate the permission level? (from I know Chrome conflates the two (offering no way to obtain camera access without implicitly elevating persistent permissions to 'granted'), but other browsers, like Firefox, do not, and this spec should not. It's not clear to me that adding some form of expiry to the existing permission states is the right approach, as it only seems to allow this confusion to continue. |
I intend "request a permission" to request, including potentially prompt for, access to a capability, or, equivalently, permission to access a capability. I don't intend it to guarantee that the permission is stored. I see it as a mistake in the spec that it's currently too wedded to Chrome's behavior where the permission is always stored. |
@jyasskin when would this algorithm return |
I'm not sure what the best behavior would be. I can imagine a couple options: The site calls
The site calls
Do you have preferences? For Bluetooth, I have |
@jyasskin The I think my immediate concern is that the editors of Media Capture and Stream spec (which is past last-call) appear to think this (non-consensus) Editor's Draft's _request a permission_ algorithm is something they can normatively call from their getUserMedia algorithm (step 7). Would the _request a permission_ algorithm return Would anything else be returned from this algorithm to the |
Yeah, I don't mean to imply that we'll keep the I was trying to say earlier that we don't know whether request a permission will return Right now, the wording says Media Capture has to make its own decision about which of But I think we can have the Permissions spec make the decision between |
I think we should define that the "request access" algorithm (my current working name for what's currently called the "request a permission" algorithm) only returns "granted" or "denied", never "prompt". |
Couple of comments:
|
Mounir, to your last comment: that's why we need to separate access from permission. It's completely reasonable (at least from a design perspective) to say "you have permission to use the camera, here's the MediaStreamTrack originating from the camera, you have it until it ends, if you want another one, ask me again". |
I'd like to propose we change our states to cover temporary permission (which could be reused as return values in the access algorithm to infer temporal and/or one-time access):
I.e. add two "temporarily" states, and rename the one-off-sounding "denied" to a more permanent "blocked". This matches language in a new UX re-design currently being discussed in Firefox. There seems to be value in communicating temporary access to users, so aligning what sites see with this might simplify things. The exact meaning of "temporary" might be up for discussion, or left up to browsers. For instance, for cameras, temporary access may end once the last obtained camera stream is stopped, at which point reported access reverts to Similarly, browsers might look at In any case, there seems to be some room for innovation and/or open areas for discussion here. Thoughts? |
What do you mean by "users" here? The app writer, or the browser/app user? If the app wants to know if permission has been stored permanently after requesting access, it can always do another query() operation. The multiple return values seems like clutter to me. |
By users I mean end-users of the browser, the "user" in "user agent". See the mockup in the URL field of the bug. Here's a direct link to the relevant page. |
@alvestrand you seem to disagree with @mounirlamouri 's comment above:
These extra states solve this bug. |
I believe @alvestrand wants "request access" to use in step 6.7 of http://w3c.github.io/mediacapture-main/getusermedia.html#dom-mediadevices-getusermedia. That's basically the "ask the user" step. It might short-circuit if there's a stored value, but otherwise it does just return "granted" or "denied" and lets the surrounding algorithm figure out what to return to the caller based on that. Telling the surrounding algorithm that it's "temporary" (for either of the two meanings of that word) doesn't help, since it just needs to know whether to give the caller a capability-object. That said, |
I'm realizing that this issue is just a duplicate of #86. "Not storing a permission after granting it" is exactly the same as supporting temporary permissions. |
As written, step 9 of the "request permission" algorithm says
"Get a permission storage identifier for permissionDesc.name and the current environment settings object, and create a permission storage entry mapping this identifier to storage."
I believe this should be an UA choice, based on user preferences. Granting permission to use "now" and granting permission to use "permanently" are two different things.
Suggestion: Preface this sentence with "If the user interaction indicated that the user wanted the permission to be permanently stored, get...."
The text was updated successfully, but these errors were encountered: