W3C home > Mailing lists > Public > public-html-a11y@w3.org > April 2011

Re: [media] adding autoplay requirements to requirements doc

From: Eric Carlson <eric.carlson@apple.com>
Date: Wed, 20 Apr 2011 09:24:43 -0700
Cc: public-html-a11y@w3.org
Message-id: <93CE89BA-34E3-4320-97BD-C4FA14CEFA99@apple.com>
To: Philip Jägenstedt <philipj@opera.com>

On Apr 20, 2011, at 4:11 AM, Philip Jägenstedt wrote:

> On Wed, 20 Apr 2011 12:08:09 +0200, Silvia Pfeiffer <silviapfeiffer1@gmail.com> wrote:
>> On Wed, Apr 20, 2011 at 5:41 PM, Philip Jägenstedt <philipj@opera.com> wrote:
>>> If it's a problem that media starts playing without user consent then it's
>>> not enough to disable autoplay, as there will certainly be sites that use
>>> scripts to start playing.
>> Yes, we agreed on that, too. But we didn't see a way to catch the
>> script-created autoplays in a simple and reliable way.
> The browser inevitably has to know when a video should start playing. At that point, one could simply not play until an asynchronous confirmation has been given, similar to how pop-up blockers work.
  The problem is knowing when to block script-initiated playback and/or ask the user for confirmation. "If play() was not called from a user gesture handler" is an easy answer, but that break playlists, scripts that call play() after a delay (eg. to let an animation run), etc. Requiring a user gesture doesn't really solve the problem anyway - someone that really wants to start playback automatically can call play() from an event handler registered on <body> like "pop-under window" scripts do to get around pop-up blockers today.

  We had this discussion at great length on the WhatWG several years ago. In his "Accessibility of HTML 5 video and audio elements" blog post [1], Bruce Lawson originally questioned the 'autoplay' attribute but after a few days updated the post to say "I’m now reluctantly accepting that autoplay should stay" because of Simon Pieters point [2]  that:

    Removing the attribute will not make pages stop autoplaying video. Instead they will use 
    script to make videos autoplay, and then it becomes harder for the user to prevent 
    videos from autoplaying. (You could have a pref in the UA to disable autoplay="".)

  The 'autoplay' attribute on the HTMLMediaElement is useful because it allows a page authors to *request* automatic playback, but it allows a UA to *deny* that request if a user so desires. Why would the same not apply to a group of media elements?


[1] http://www.brucelawson.co.uk/2009/accessibility-of-html5-video-and-audio-elements/
[2] http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-May/019647.html
Received on Wednesday, 20 April 2011 16:25:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:19 UTC