As pointed in the original message, we will look into a solution for top
frames to opt-in an iframe to autoplay. Whether to use something like
Feature Policy, Permission Delegation or something else is orthogonal to
this.
As far as we know, cross origin Web Audio is rare enough on Chrome
Android that it doesn't require to solve this problem in order to get
the intervention going. Our numbers say that ~0.23% of page load have a
cross origin AudioContext created (based on Chrome Android Beta
population). Those that don't use a user gesture are probably a fraction
of them. The reason why we are confident it will have low breakage is
that these contents would be broken on Safari iOS.
-- Mounir
On Thu, 8 Sep 2016, at 09:01, 'Harald Alvestrand' via blink-dev wrote:
> There's a "speaker" permission defined as part of the media permissions
> set.
>
> It would be logical to apply that to all cases where permission to play
> sound is questioned.
>
>
> On Thu, Sep 8, 2016 at 9:48 AM, Philip Jägenstedt <
foo...@chromium.org>
> wrote:
>
> > I think that if audio playback were a permission, then this should be
> > possible with permission delegation. But it's not a permission. Mounir,
> > WDYT?
> >
> > On Thu, Sep 8, 2016 at 2:24 AM Chris Harrelson <
chri...@chromium.org>
> > wrote:
> >
> >> What about the use case of a cross-origin iframe that has a WebAudio
> >> player, but relies on the main frame for UI and start-playing logic via
> >> postMessage? Is it possible to implement such a site?
> >>
> >> Chris
> >>
> >> On Wed, Sep 7, 2016 at 6:01 AM, Mounir Lamouri <
mou...@lamouri.fr> wrote:
> >>
> >> *Contact emails*
> >>
mlam...@chromium.org
> >>
> >> *Spec*
> >> WICG/interventions <
https://github.com/WICG/interventions/issues/28>
> >> Web Audio bug entry
> >> <
https://github.com/WebAudio/web-audio-api/issues/836>
> >>
> >> *Summary*
> >> On Android, using Web Audio inside a cross origin iframe will no longer
> >> be allowed if the request isn’t made from an event handler linked to a user
> >> gesture.
> >>
> >> *Motivation*
> >> Chrome currently has restrictions on autoplay which do not apply to Web
> >> Audio. That means that users can go to a website that can play anything on
> >> page load without any kind of user interaction. In order to reduce the
> >> surface for abuse without breaking genuine content, we can apply autoplay
> >> restrictions to cross origins iframes
> >>
> >> *Interoperability and Compatibility Risk*
> >> There is some compatibility risk but this is a compromise (thus the
> >> intent to intervene). We have metrics regarding Web Audio and user gesture
> >> and even though these metrics are overly conservative, we are afraid
> >> blocking Web Audio for top frames might have too much of web compat issues.
> >> However, usage on cross origin iframes is low. The assumption is that
> >> autoplaying Web Audio on cross origin iframes is unlikely a genuine use
> >> case so breaking these calls might be a risk worth taking to improve the
> >> user experience.
> >>
> >> Regarding interoperability, Safari iOS doesn’t allow Web Audio to
> >> autoplay (not only in cross origin iframes). To improve interoperability,
> >> the applied restrictions will match WebKit’s restrictions. As pointed in
> >> the Web Audio bug, blocking playback should be incorporated into the Web
> >> Audio specification.
> >>
> >> With future work and improvements regarding autoplay, we should consider
> >> a way for a top frame to allow an iframe to autoplay Web Audio.
> >>
> >> *Ongoing technical constraints*
> >> No.
> >>
> >> *Will this feature be supported on all six Blink platforms (Windows, Mac,
> >> Linux, Chrome OS, Android, and Android WebView)?*
> >> Android only, including WebView. Technically, not limited to Android but
> >> it will only apply when the flag to disable autoplay is on which is a
> >> WebView setting and otherwise only on on Android.
> >>
> >> *OWP launch tracking bug*
> >>
https://crbug.com/614115
> >>
> >> *Link to entry on the feature dashboard*
> >>
https://www.chromestatus.com/feature/6406908126691328
> >>
> >> *Requesting approval to ship?*
> >> Yes
> >>
> >> -- Mounir
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "blink-dev" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an
> >> email to
blink-dev+...@chromium.org.
> >>
> >> --
> > You received this message because you are subscribed to the Google Groups
> > "blink-dev" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to
blink-dev+...@chromium.org.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
blink-dev+...@chromium.org.