- From: Jeffrey Yasskin <notifications@github.com>
- Date: Wed, 27 Apr 2016 14:45:46 -0700
- To: w3c/permissions <permissions@noreply.github.com>
- Cc:
- Message-ID: <w3c/permissions/issues/93/215239542@github.com>
I'm not sure what the best behavior would be. I can imagine a couple options: #### The site calls `request({name:"camera", ...})`, and the user grants temporary access to a camera 1. `request` returns `{state: "granted", stream: someMediaStream}`. The site has to call `query({name:"camera", ...})` to figure out if a future call will prompt. 2. `request` returns `{state: "prompt", stream: someMediaStream}` to convey both the granted permission and the fact that future calls will still prompt. #### The site calls `request({name:"camera", ...})`, and the user closes the prompt without granting or denying it. 1. `request` returns `{state: "prompt", stream: null}` to convey that nothing was granted, but the site can still show another prompt. 2. `request` returns `{state: "denied", stream: null}`. The site has to call `query({name:"camera", ...})` to figure out if a future call will prompt or be auto-denied. Do you have preferences? ---- For Bluetooth, I have [`query()` and `request()` always returning `"prompt"`](https://webbluetoothcg.github.io/web-bluetooth/#query-the-bluetooth-permission), because `request()` will always show the chooser even if the site already has access to another device, but I'm not sure that's the right behavior. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/permissions/issues/93#issuecomment-215239542
Received on Wednesday, 27 April 2016 21:46:16 UTC