Skip to content
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

Watching for permission changes #244

Open
marcoscaceres opened this issue Jun 10, 2021 · 2 comments
Open

Watching for permission changes #244

marcoscaceres opened this issue Jun 10, 2021 · 2 comments

Comments

@marcoscaceres
Copy link
Member

marcoscaceres commented Jun 10, 2021

Get user media, and I suspect other specs, want to be notified of permission changes (independent of the API eventing model).

I wonder if we should have some kind of subscription model in our spec for that?

The Page Visibility spec has something similar, like the "external now visible visible algorithm"... I don't know if that's quite ideal, but something like that could work.

@jyasskin, wdyt?

@marcoscaceres
Copy link
Member Author

Here is an example from GetUserMedia:

For each device that {{MediaDevices/getUserMedia()}} exposes, whenever a transition occurs of the
[=permission state=] of the permission associated with the device's kind
and the device's deviceId, deviceId, run the following
steps:

@jyasskin
Copy link
Member

It looks like https://w3c.github.io/mediacapture-main/#mediadevices does distinct things when the permission state becomes "granted" vs when it becomes not-"granted". I had imagined that the permission revocation algorithm would handle the "becomes not-granted" case, and the spec could handle the ->granted case itself around the call to https://www.w3.org/TR/permissions/#requesting-more-permission.

I wouldn't object to doing this some other way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants