On Wed, 4 Jul 2018, at 18:22, Chris Pearce wrote:
> Hi Mounir,
> 
> Replies inline below...
> 
> 
> On Thu, Jul 5, 2018 at 2:56 AM, Mounir Lamouri <mou...@lamouri.fr> wrote:
> 
> > Hi Chris,
> >
> > Very excited to see Firefox going forward with autoplay blocking. A couple
> > of comments inline.
> >
> > On Tue, 3 Jul 2018, at 19:38, Chris Pearce wrote:
> > > DETAILS:
> > >
> > > We intend to block autoplay of HTMLMediaElement in tabs which haven't
> > > had user interaction. Web authors should assume that they require a user
> > > gesture (mouse click on a "play" button for example) in order to play
> > > audible media.
> >
> > I assume you will not allow autoplay when navigating into the same
> > website? What about iframes? Will they be allowed to autoplay if the main
> > frame is allowed to? Will the feature policy be used instead?
> >
> >
> A gesture in any document in the document hierarchy gesture activates the
> top level document, and a document uses the top level document's gesture
> activation status to determine whether it can play (our implementation
> actually differs a bit, but this is the effective behaviour). Gesture
> activation status isn't preserved across navigation. So if the top level
> document navigates, the incoming document hierarchy won't be able to
> autoplay. If a non-top-level document navigates, the new document in the
> iframe will still use the top-level document's gesture activation status,
> and so the iframe's new content document will be able to autoplay.

With autoplay coming from third party content, do you consider using Feature 
Policy to block cross origin iframes by default?

> > > HTMLMediaElements with a "muted" attribute or "volume=0" are still
> > > allowed to play.
> >
> > Chrome and Safari allows autoplay only when the playback is muted. The
> > spec allows side effect for setting `muted = false;`. What will happen for
> > a website that changes the volume from 0 to something else?
> >
> >
> 
> If an HTMLMediaElement starts playing with muted/volume=0 and then script
> sets it to unmuted/volume>0, then we'll pause the media.

The volume=0 behaviour isn't compatible with Blink and WebKit. Would it be 
worth only use muted for consistency between browsers?

> > Also, will autoplay be allowed when the video has no audio track?
> >
> >
> >
> Our autoplay logic ignores whether the media resource has an audio track;
> it makes our implementation simpler, and if an author knows a media should
> be inaudible, they can set the muted attribute. So a video element playing
> a media resource with no audio track and without the muted attribute would
> still be blocked.

FWIW, WebKit uses the audio track availability and Blink intends to do this at 
some point.

-- Mounir
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to