Skip to content

Commit

Permalink
[gw] (2) Ugh. Fix the order of events in the case of autoplay.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2853 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 23, 2009
1 parent 6d8fa86 commit 1876522
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 23 deletions.
18 changes: 8 additions & 10 deletions index
Expand Up @@ -19250,27 +19250,25 @@ interface <dfn id=cuerangecallback>CueRangeCallback</dfn> {

<p>If the previous ready state was <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code> or
less, the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire
a simple event</a> called <code title=event-canplay><a href=#event-canplay>canplay</a></code>.</p>

<p>In either case, the user agent must then <a href=#queue-a-task>queue a
task</a> to <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-canplaythrough><a href=#event-canplaythrough>canplaythrough</a></code>.</p>
a simple event</a> called <code title=event-canplay><a href=#event-canplay>canplay</a></code>, and, if the element is also
<a href=#potentially-playing>potentially playing</a>, <a href=#queue-a-task>queue a task</a> to
<a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-playing><a href=#event-playing>playing</a></code>.</p>

<p>If the <a href=#autoplaying-flag>autoplaying flag</a> is true, and the <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is true, and the
<a href=#media-element>media element</a> has an <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code> attribute specified,
then the user agent may also set the <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute to false and
then the user agent may also set the <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute to false,
<a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
called <code title=event-play><a href=#event-play>play</a></code>.</p>
called <code title=event-play><a href=#event-play>play</a></code>, and <a href=#queue-a-task>queue a
task</a> to <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-playing><a href=#event-playing>playing</a></code>.</p>

<p class=note>User agents are not required to autoplay, and it
is suggested that user agents honor user preferences on the
matter. Authors are urged to use the <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code> attribute rather than
using script to force the video to play, so as to allow the user
to override the behavior if so desired.</p>

<p>If the element is now <a href=#potentially-playing>potentially playing</a>, and the
previous ready state was <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code> or
less, the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire
a simple event</a> called <code title=event-playing><a href=#event-playing>playing</a></code>.</p>
<p>In any case, the user agent must finally <a href=#queue-a-task>queue a
task</a> to <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-canplaythrough><a href=#event-canplaythrough>canplaythrough</a></code>.</p>

</dd>

Expand Down
24 changes: 11 additions & 13 deletions source
Expand Up @@ -20765,20 +20765,21 @@ interface <dfn>CueRangeCallback</dfn> {
title="dom-media-HAVE_CURRENT_DATA">HAVE_CURRENT_DATA</code> or
less, the user agent must <span>queue a task</span> to <span>fire
a simple event</span> called <code
title="event-canplay">canplay</code>.</p>

<p>In either case, the user agent must then <span>queue a
task</span> to <span>fire a simple event</span> called <code
title="event-canplaythrough">canplaythrough</code>.</p>
title="event-canplay">canplay</code>, and, if the element is also
<span>potentially playing</span>, <span>queue a task</span> to
<span>fire a simple event</span> called <code
title="event-playing">playing</code>.</p>

<p>If the <span>autoplaying flag</span> is true, and the <code
title="dom-media-paused">paused</code> attribute is true, and the
<span>media element</span> has an <code
title="attr-media-autoplay">autoplay</code> attribute specified,
then the user agent may also set the <code
title="dom-media-paused">paused</code> attribute to false and
title="dom-media-paused">paused</code> attribute to false,
<span>queue a task</span> to <span>fire a simple event</span>
called <code title="event-play">play</code>.</p>
called <code title="event-play">play</code>, and <span>queue a
task</span> to <span>fire a simple event</span> called <code
title="event-playing">playing</code>.</p>

<p class="note">User agents are not required to autoplay, and it
is suggested that user agents honor user preferences on the
Expand All @@ -20787,12 +20788,9 @@ interface <dfn>CueRangeCallback</dfn> {
using script to force the video to play, so as to allow the user
to override the behavior if so desired.</p>

<p>If the element is now <span>potentially playing</span>, and the
previous ready state was <code
title="dom-media-HAVE_CURRENT_DATA">HAVE_CURRENT_DATA</code> or
less, the user agent must <span>queue a task</span> to <span>fire
a simple event</span> called <code
title="event-playing">playing</code>.</p>
<p>In any case, the user agent must finally <span>queue a
task</span> to <span>fire a simple event</span> called <code
title="event-canplaythrough">canplaythrough</code>.</p>

</dd>

Expand Down

0 comments on commit 1876522

Please sign in to comment.