Skip to content

Commit

Permalink
[gow] (2) Allow UAs to not autoplay.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2331 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 15, 2008
1 parent 0ef3d1b commit ffebc05
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 20 deletions.
26 changes: 18 additions & 8 deletions index
Expand Up @@ -17517,14 +17517,24 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael

<dt>If the new ready state is <code title=dom-media-HAVE_ENOUGH_DATA><a href=#dom-media-have_enough_data>HAVE_ENOUGH_DATA</a></code></dt>

<dd><p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> called
<code title=event-canplaythrough><a href=#event-canplaythrough>canplaythrough</a></code> event.
<!-- XXX make sure it fires after canplay when fixing queueing here -->
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 must also set the <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute to false and
<a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-play><a href=#event-play>play</a></code>.</dd>
<dd>

<p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> called
<code title=event-canplaythrough><a href=#event-canplaythrough>canplaythrough</a></code> event.</p>
<!-- XXX make sure it fires after canplay when fixing queueing here -->

<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
<a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-play><a href=#event-play>play</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>

</dd>

</dl><p class=note>It is possible for the ready state of a media
element to jump between these states discontinuously. For example,
Expand Down
35 changes: 23 additions & 12 deletions source
Expand Up @@ -18842,18 +18842,29 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {
<dt>If the new ready state is <code
title="dom-media-HAVE_ENOUGH_DATA">HAVE_ENOUGH_DATA</code></dt>

<dd><p>The user agent must <span>fire a simple event</span> called
<code title="event-canplaythrough">canplaythrough</code> event.
<!-- XXX make sure it fires after canplay when fixing queueing here -->
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 must also set the <code
title="dom-media-paused">paused</code> attribute to false and
<span>fire a simple event</span> called <code
title="event-play">play</code>.</p></dd>
<dd>

<p>The user agent must <span>fire a simple event</span> called
<code title="event-canplaythrough">canplaythrough</code> event.</p>
<!-- XXX make sure it fires after canplay when fixing queueing here -->

<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
<span>fire a simple event</span> called <code
title="event-play">play</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">autoplay</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>

</dd>

</dl>

Expand Down

0 comments on commit ffebc05

Please sign in to comment.