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

Modeling media auto-playing as a permission? #203

Closed
slightlyoff opened this issue Sep 27, 2017 · 13 comments
Closed

Modeling media auto-playing as a permission? #203

slightlyoff opened this issue Sep 27, 2017 · 13 comments
Assignees

Comments

@slightlyoff
Copy link
Member

Inspired by conversation in #199, we have noted that the heuristics being implemented by Chrome and Safari around auto-playing media with sound are creating a situation where sites may need to "earn" the ability to auto-play.

This sounds very much like the sort of asynchronous decision made by the Progressive Web App install prompt system in various browsers and interventions being considered for permissions which are being pervasively requested at load time (but without user interaction).

In these cases, it seems as though browsers will always intervene on behalf of users. Developers will struggle to understand the situation until the reflection APIs get better. One possible alternative would be to model auto-playing media within the Permissions API which already includes a notification mechanism to let developers know when browsers change the status of a permission.

It may be necessary to extend the PermissionState enum to handle this situation.

/cc @owencm @jyasskin

@travisleithead travisleithead mentioned this issue Sep 27, 2017
5 tasks
@jyasskin
Copy link
Contributor

I've got an initial exploration of "all" capabilities and their "guards" in Chrome, at https://docs.google.com/spreadsheets/d/1xWK4uf5O3v7xTo85U3X0gGVNfJLD8_W8Zt93BO37we4/edit#gid=0. The guards form a much bigger space than permissions.query() gives access to, but we should start thinking about how to expose the whole space systematically. I'm sure it won't fit into any one enum, and I'm not confident it'll fit into the PermissionStatus interface.

@torgo torgo self-assigned this Oct 31, 2017
@plinss plinss added this to the tag-telcon-2017-11-14 milestone Oct 31, 2017
@foolip
Copy link

foolip commented Nov 15, 2017

Did a telecon happen yesterday and was this discussed?

@dbaron
Copy link
Member

dbaron commented Nov 15, 2017

We did not have a teleconference yesterday.

@mounirlamouri
Copy link

For what it's worth, Chrome isn't interested to express autoplay as a permission. It sounds that we might be moving towards having an autoplay field in Feature Policy as Safari is also interested in this.

@slightlyoff
Copy link
Member Author

It isn't clear to me that feature policy and permissions are in opposition here; to the contrary, having something as a feature policy without any introspection ability from script seems bad (and I don't note any API surface for Feature Policy here)

@dbaron
Copy link
Member

dbaron commented Nov 21, 2017

(Discussed in today's teleconference.)

Also, to expand a little on @slightlyoff's #203 (comment) -- I could imagine feature-policy as a mechanism to allow delegating the permission to subframes -- but still modeling the permission for the toplevel frame as a permission that might related to user interactions -- and still (as Alex points out) having the permissions API being a way to detect the current state that results from the whole interaction.

@mounirlamouri
Copy link

To me, these sounds like two different things: blocking a feature (by default or not) for cross origin iframes and having this feature as a permission. Blink is looking into having "annoying" features blocked by default on cross origin iframes to prevent abuse and give better control to the top frame owner. However, we do not want to make theses permissions as requiring the user to decide whether a website should be allowed to vibrate your phone is wasted user attention.

At the moment, autoplay policies implemented by Safari and about to launch in Chrome could not easily fit into the permission model. These policies have multiple states that change depending on the user actions on the page. It would be easy to describe the state when autoplay is allowed as allow but all the other states would hardly transcribe properly as an "autoplay" permission.

@dbaron
Copy link
Member

dbaron commented Nov 28, 2017

And the other thing we discussed in last week's teleconference was possibly getting some domain experts from different browsers on a call to have further discussion.

The relevant person to pull in from Mozilla would probably be @kentuckyfriedtakahe, who (being in New Zealand) could make our teleconferences that are at 1pm or 10pm California time on Tuesdays (10am or 7pm New Zealand time Wednesdays) but not the one at 7am California time on Tuesday (4am New Zealand time Wednesday).

@dbaron
Copy link
Member

dbaron commented Nov 29, 2017

We discussed using the call on December 19/December 20, which would be the using same times as this week's call.

@mounirlamouri
Copy link

Thank you @dbaron. @kentuckyfriedtakahe and I had a discussion about autoplay a couple of weeks ago. I had a similar discussion with folks from Apple (inc. @jernoble and @hober). We had brief exchanges with Microsoft too. Given the scheduling challenges, it might be useful to double-check that it will not be duplicating the various discussions that already happened. What outcome do we expect out of the call?

@torgo torgo modified the milestones: tag-telcon-2017-12-19, tag-f2f-london-2018-01-31 Jan 16, 2018
@torgo
Copy link
Member

torgo commented Jan 16, 2018

We need to close this out in some way - put it in the agenda for thew next f2f.

@slightlyoff slightlyoff removed their assignment Apr 6, 2018
@torgo
Copy link
Member

torgo commented Apr 7, 2018

TAG resolved at Tokyo F2F: “Media autoplay should be under user control, that could mean for example having a setting "yes, autoplay is OK across the board" or it could mean origin-specific permissions prompts. "yes, netflix can autoplay videos". ---> therefore modeling autoplay as a permission is desirable because the diversity of effective policies will require that sites be able to introspect the policy without attempting to play media.”

@travisleithead
Copy link
Contributor

FYI: The discussion moved here whatwg/html#3617

(Mounir does not believe a Permission is the right model for this for reasons listed here.

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

10 participants