Re: [w3c/permissions] questions on query() (#124)

For case 1, in the "per-[realm](https://tc39.github.io/ecma262/#realm)" model, if https://example.com/ is granted access to device `"abcd"`, `"abcd"` is disconnected, and the UA knows that it will get a new deviceId if it's plugged in again, then

1. Whether you return `"prompt"` or `"granted"` from `query()` after `"abcd"` is disconnected, the page won't actually be able to access the device, so to some extent it doesn't matter.
2. Since you know that `"abcd"` will never appear again, you might be able to let the page save some resources by changing `"abcd"`'s state back to the default (probably `"prompt"`).

If the UA doesn't know that the physical device will get a new deviceId, you probably have to leave the device as `"granted"` just in case.

In "ephemeral" mode, you'd revoke as soon as all active streams stop, which I assume happens automatically when the device is disconnected.

-- 
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/124#issuecomment-243575959

Received on Tuesday, 30 August 2016 20:50:18 UTC