-
Notifications
You must be signed in to change notification settings - Fork 61
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
It is unclear which of PermissionStatus change event or MediaStreamTrack ended event should fire first in case Permission is revoked #862
Comments
The order of reacting-to-revocation and PermissionStatus-update seems unclear, so this might affect all permissions. @jyasskin may know the intent.
Me too, in a cause and effect kind of way.
This I think we can model on how ambient-light-sensor does it, but adding a "generic capture device permission revocation algorithm" to mediacapture, and calling it. I can do a PR in #439. |
Note, when a |
Moved this issue from Permissions to mediacapture-main... as we move the permissions setup to this spec, it should (in theory) be possible to now specify the above in mediacapture-main (if not, let me know and I can make some fixes over in Permissions). |
What the permissions spec says now is: "When the permission lifetime expires for an origin:
A simple interpretation of this numbering (1,2) might suggest that that was also the intended order of events. However, if we take the queued tasks into consideration, it gets more complicated. Step 2 here queues a task A per global to queue a task B per track to fire Step 1 appears to invoke: "Whenever the user agent is aware that the state of a PermissionStatus instance status has changed, it ... runs the PermissionStatus update steps: ... 4. Queue a task on the permissions task source to fire an event named change at status." IOW, Step 1 here queues a task C per global to fire So |
The order of firing the events is unclear to me when reading the spec.
I have a slight preference for firing the PermissionStatus event first.
Also, https://w3c.github.io/permissions/#media-devices should ideally link to https://w3c.github.io/mediacapture-main/#ends-nostop in the section dealing with stopping MediaStreamTrack when permission is revoked.
The text was updated successfully, but these errors were encountered: