Skip to content

Commit

Permalink
[] (0) More poking around getting the media element section to use th…
Browse files Browse the repository at this point in the history
…e new event loop stuff.

git-svn-id: http://svn.whatwg.org/webapps@2080 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 19, 2008
1 parent cdef700 commit bf3f3cf
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 89 deletions.
124 changes: 68 additions & 56 deletions index
Expand Up @@ -28,7 +28,7 @@


<h1 id=html-5>HTML 5</h1> <h1 id=html-5>HTML 5</h1>


<h2 class="no-num no-toc" id=draft>Draft Recommendation &mdash; 18 August <h2 class="no-num no-toc" id=draft>Draft Recommendation &mdash; 19 August
2008</h2> 2008</h2>


<p>You can take part in this work. <a <p>You can take part in this work. <a
Expand Down Expand Up @@ -13046,7 +13046,7 @@ first matching case):&lt;/p&gt;


<dd><code title=attr-hyperlink-rel><a href="#rel3">rel</a></code> <dd><code title=attr-hyperlink-rel><a href="#rel3">rel</a></code>


<dd><code title=attr-hyperlink-media><a href="#media12">media</a></code> <dd><code title=attr-hyperlink-media><a href="#media14">media</a></code>


<dd><code title=attr-hyperlink-hreflang><a <dd><code title=attr-hyperlink-hreflang><a
href="#hreflang3">hreflang</a></code> href="#hreflang3">hreflang</a></code>
Expand Down Expand Up @@ -13085,7 +13085,7 @@ first matching case):&lt;/p&gt;
href="#target3">target</a></code>, <code title=attr-hyperlink-ping><a href="#target3">target</a></code>, <code title=attr-hyperlink-ping><a
href="#ping">ping</a></code>, <code title=attr-hyperlink-rel><a href="#ping">ping</a></code>, <code title=attr-hyperlink-rel><a
href="#rel3">rel</a></code>, <code title=attr-hyperlink-media><a href="#rel3">rel</a></code>, <code title=attr-hyperlink-media><a
href="#media12">media</a></code>, <code title=attr-hyperlink-hreflang><a href="#media14">media</a></code>, <code title=attr-hyperlink-hreflang><a
href="#hreflang3">hreflang</a></code>, and <code href="#hreflang3">hreflang</a></code>, and <code
title=attr-hyperlink-type><a href="#type20">type</a></code> attributes title=attr-hyperlink-type><a href="#type20">type</a></code> attributes
must be omitted if the <code title=attr-hyperlink-href><a must be omitted if the <code title=attr-hyperlink-href><a
Expand Down Expand Up @@ -13114,7 +13114,7 @@ first matching case):&lt;/p&gt;
title=attr-hyperlink-ping><a href="#ping">ping</a></code> attributes title=attr-hyperlink-ping><a href="#ping">ping</a></code> attributes
decide how the link is followed. The <code title=attr-hyperlink-rel><a decide how the link is followed. The <code title=attr-hyperlink-rel><a
href="#rel3">rel</a></code>, <code title=attr-hyperlink-media><a href="#rel3">rel</a></code>, <code title=attr-hyperlink-media><a
href="#media12">media</a></code>, <code title=attr-hyperlink-hreflang><a href="#media14">media</a></code>, <code title=attr-hyperlink-hreflang><a
href="#hreflang3">hreflang</a></code>, and <code href="#hreflang3">hreflang</a></code>, and <code
title=attr-hyperlink-type><a href="#type20">type</a></code> attributes may title=attr-hyperlink-type><a href="#type20">type</a></code> attributes may
be used to indicate to the user the likely nature of the target resource be used to indicate to the user the likely nature of the target resource
Expand Down Expand Up @@ -18689,8 +18689,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
<code title=dom-media-load><a href="#load">load()</a></code> method on the <code title=dom-media-load><a href="#load">load()</a></code> method on the
<a href="#media7">media element</a>, and ignores any resulting exceptions. <a href="#media7">media element</a>, and ignores any resulting exceptions.
The <a href="#task-source">task source</a> for this task is the <a The <a href="#task-source">task source</a> for this task is the <a
href="#media7">media element</a>'s own <a href="#new-resource">new href="#media7">media element</a>'s own <a href="#media12">media element
resource task source</a>. new resource task source</a>.


<p>The DOM attributes <dfn id=src6 <p>The DOM attributes <dfn id=src6
title=dom-source-src><code>src</code></dfn>, <dfn id=type9 title=dom-source-src><code>src</code></dfn>, <dfn id=type9
Expand Down Expand Up @@ -18821,6 +18821,15 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
resource</dfn> is used to refer to the complete set of media data, e.g. resource</dfn> is used to refer to the complete set of media data, e.g.
the complete video file, or complete audio file. the complete video file, or complete audio file.


<p><a href="#media7" title="media element">Media elements</a> use two <a
href="#task-queues" title="task queue">task queues</a>, the <dfn
id=media11>media element event task source</dfn> for asynchronous events
and callbacks, and the <dfn id=media12>media element new resource task
source</dfn> for handling implicit loads. Unless otherwise specified, all
the tasks <a href="#queue" title="queue a task">queued</a> in this section
and its subsections use the <a href="#media11">media element event task
source</a>.

<h5 id=error><span class=secno>4.7.10.1. </span>Error codes</h5> <h5 id=error><span class=secno>4.7.10.1. </span>Error codes</h5>


<p>All <a href="#media7" title="media element">media elements</a> have an <p>All <a href="#media7" title="media element">media elements</a> have an
Expand Down Expand Up @@ -18883,8 +18892,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
href="#load">load()</a></code> method on the <a href="#media7">media href="#load">load()</a></code> method on the <a href="#media7">media
element</a>, and ignores any resulting exceptions. The <a element</a>, and ignores any resulting exceptions. The <a
href="#task-source">task source</a> for this task is the <a href="#task-source">task source</a> for this task is the <a
href="#media7">media element</a>'s own <a href="#new-resource">new href="#media7">media element</a>'s own <a href="#media12">media element
resource task source</a>. new resource task source</a>.


<p class=note>If a <code title=attr-media-src><a <p class=note>If a <code title=attr-media-src><a
href="#src7">src</a></code> attribute is specified, the resource it href="#src7">src</a></code> attribute is specified, the resource it
Expand Down Expand Up @@ -19072,9 +19081,14 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
<ol> <ol>
<li> <li>
<p>If there are any <a href="#tasks" title=concept-task>tasks</a> from <p>If there are any <a href="#tasks" title=concept-task>tasks</a> from
the <a href="#media7">media element</a>'s own <dfn id=new-resource>new the <a href="#media7">media element</a>'s <a href="#media12">media
resource task source</dfn> in one of the <a href="#task-queues" element new resource task source</a> or its <a href="#media11">media
title="task queue">task queues</a>, then remove those tasks. element event task source</a> in one of the <a href="#task-queues"
title="task queue">task queues</a>, then remove those tasks.</p>

<p class=note>Basically, pending events, callbacks, and loads for the
media element are discarded when the media element starts loading a new
resource.</p>


<li> <li>
<p>Any already-running instance of this algorithm for this element must <p>Any already-running instance of this algorithm for this element must
Expand Down Expand Up @@ -19458,8 +19472,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
href="#load">load()</a></code> method on the <a href="#media7">media href="#load">load()</a></code> method on the <a href="#media7">media
element</a>, and ignores any resulting exceptions. The <a element</a>, and ignores any resulting exceptions. The <a
href="#task-source">task source</a> for this task is the <a href="#task-source">task source</a> for this task is the <a
href="#media7">media element</a>'s own <a href="#new-resource">new href="#media7">media element</a>'s own <a href="#media12">media element
resource task source</a>. new resource task source</a>.


<p>The <dfn id=bufferingrate <p>The <dfn id=bufferingrate
title=dom-media-bufferingRate><code>bufferingRate</code></dfn> attribute title=dom-media-bufferingRate><code>bufferingRate</code></dfn> attribute
Expand Down Expand Up @@ -19523,12 +19537,11 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae


<p>When the length of the <a href="#media10">media resource</a> changes <p>When the length of the <a href="#media10">media resource</a> changes
(e.g. from being unknown to known, or from indeterminate to known, or from (e.g. from being unknown to known, or from indeterminate to known, or from
a previously established length to a new length) the user agent must, once a previously established length to a new length) the user agent must <a
any running scripts have finished, <a href="#firing2">fire a simple href="#queue">queue a task</a> to <a href="#firing2">fire a simple
event</a> called <code title=event-durationchange><a event</a> called <code title=event-durationchange><a
href="#durationchange">durationchange</a></code> at the <a href="#durationchange">durationchange</a></code> at the <a
href="#media7">media element</a>.</p> href="#media7">media element</a>.
<!-- xxx queue -->


<p><a href="#media7" title="media element">Media elements</a> have a <dfn <p><a href="#media7" title="media element">Media elements</a> have a <dfn
id=current0>current playback position</dfn>, which must initially be zero. id=current0>current playback position</dfn>, which must initially be zero.
Expand Down Expand Up @@ -19967,33 +19980,32 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
href="#stopped">stopped due to errors</a>, or playback having <a href="#stopped">stopped due to errors</a>, or playback having <a
href="#paused0">paused for user interaction</a>, or the <a href="#seek" href="#paused0">paused for user interaction</a>, or the <a href="#seek"
title=dom-media-seek>seeking algorithm</a> being invoked, the user agent title=dom-media-seek>seeking algorithm</a> being invoked, the user agent
must <a href="#firing2">fire a simple event</a> called <code must <a href="#queue">queue a task</a> to <a href="#firing2">fire a simple
title=event-timeupdate><a href="#timeupdate">timeupdate</a></code> at the event</a> called <code title=event-timeupdate><a
element, and then must <a href="#firing2">fire a simple event</a> called href="#timeupdate">timeupdate</a></code> at the element, and <a
<code title=event-waiting><a href="#waiting">waiting</a></code> at the href="#queue">queue a task</a> to <a href="#firing2">fire a simple
element.</p> event</a> called <code title=event-waiting><a
<!-- xxx queue --> href="#waiting">waiting</a></code> at the element.


<p>When a <a href="#media7">media element</a> that is <a <p>When a <a href="#media7">media element</a> that is <a
href="#actively">actively playing</a> stops playing because it has <a href="#actively">actively playing</a> stops playing because it has <a
href="#paused0">paused for user interaction</a>, the user agent must <a href="#paused0">paused for user interaction</a>, the user agent must <a
href="#firing2">fire a simple event</a> called <code href="#queue">queue a task</a> to <a href="#firing2">fire a simple
title=event-timeupdate><a href="#timeupdate">timeupdate</a></code> at the event</a> called <code title=event-timeupdate><a
element.</p> href="#timeupdate">timeupdate</a></code> at the element.
<!-- xxx queue -->


<p>When <code title=dom-media-currentLoop><a <p>When <code title=dom-media-currentLoop><a
href="#currentloop">currentLoop</a></code> is less than <span><code href="#currentloop">currentLoop</a></code> is less than <span><code
title=dom-media-playCount><a title=dom-media-playCount><a
href="#playcount0">playCount</a></code>-1</span> and the <a href="#playcount0">playCount</a></code>-1</span> and the <a
href="#current0">current playback position</a> reaches the <var><a href="#current0">current playback position</a> reaches the <var><a
href="#effective1">effective loop end</a></var>, then the user agent must href="#effective1">effective loop end</a></var>, then the user agent must
<a href="#seek" title=dom-media-seek>seek</a> to the <var><a increase <code title=dom-media-currentLoop><a
href="#effective0">effective loop start</a></var>, increase <code href="#currentloop">currentLoop</a></code> by 1, <a href="#queue">queue a
title=dom-media-currentLoop><a href="#currentloop">currentLoop</a></code> task</a> to <a href="#firing2">fire a simple event</a> called <code
by 1, and <a href="#firing2">fire a simple event</a> called <code title=event-timeupdate><a href="#timeupdate">timeupdate</a></code>, and <a
title=event-timeupdate><a href="#timeupdate">timeupdate</a></code>.</p> href="#seek" title=dom-media-seek>seek</a> to the <var><a
<!-- xxx queue --> href="#effective0">effective loop start</a></var>.


<p>When <code title=dom-media-currentLoop><a <p>When <code title=dom-media-currentLoop><a
href="#currentloop">currentLoop</a></code> is equal to the <span><code href="#currentloop">currentLoop</a></code> is equal to the <span><code
Expand All @@ -20012,16 +20024,15 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
href="#ended0">ended</a></code> attribute becomes true. href="#ended0">ended</a></code> attribute becomes true.


<li> <li>
<p>The user agent must <a href="#firing2">fire a simple event</a> called <p>The user agent must <a href="#queue">queue a task</a> to <a
<code title=event-timeupdate><a href="#timeupdate">timeupdate</a></code> href="#firing2">fire a simple event</a> called <code
at the element. title=event-timeupdate><a href="#timeupdate">timeupdate</a></code> at
</li> the element.
<!-- xxx queue -->


<li> <li>
<p>The user agent must <a href="#firing2">fire a simple event</a> called <p>The user agent must <a href="#queue">queue a task</a> to <a
<code title=event-ended><a href="#ended1">ended</a></code> at the href="#firing2">fire a simple event</a> called <code
element. title=event-ended><a href="#ended1">ended</a></code> at the element.
</ol> </ol>


<p>The <dfn id=defaultplaybackrate <p>The <dfn id=defaultplaybackrate
Expand Down Expand Up @@ -20050,12 +20061,13 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
title=dom-media-playbackRate><a title=dom-media-playbackRate><a
href="#playbackrate">playbackRate</a></code> attributes change value href="#playbackrate">playbackRate</a></code> attributes change value
(either by being set by script or by being changed directly by the user (either by being set by script or by being changed directly by the user
agent, e.g. in response to user control) the user agent must, once any agent, e.g. in response to user control) the user agent must <a
running scripts have finished, <a href="#firing2">fire a simple event</a> href="#queue">queue a task</a> to <a href="#firing2">fire a simple
called <code title=event-ratechange><a event</a> called <code title=event-ratechange><a
href="#ratechange">ratechange</a></code> at the <a href="#media7">media href="#ratechange">ratechange</a></code> at the <a href="#media7">media
element</a>.</p> element</a>.
<!-- xxx queue -->
<hr>


<p>When the <dfn id=play title=dom-media-play><code>play()</code></dfn> <p>When the <dfn id=play title=dom-media-play><code>play()</code></dfn>
method on a <a href="#media7">media element</a> is invoked, the user agent method on a <a href="#media7">media element</a> is invoked, the user agent
Expand Down Expand Up @@ -23746,7 +23758,7 @@ function AddCloud(data, x, y) { ... }</pre>


<dd><code title=attr-hyperlink-rel><a href="#rel3">rel</a></code> <dd><code title=attr-hyperlink-rel><a href="#rel3">rel</a></code>


<dd><code title=attr-hyperlink-media><a href="#media12">media</a></code> <dd><code title=attr-hyperlink-media><a href="#media14">media</a></code>


<dd><code title=attr-hyperlink-hreflang><a <dd><code title=attr-hyperlink-hreflang><a
href="#hreflang3">hreflang</a></code> href="#hreflang3">hreflang</a></code>
Expand All @@ -23766,7 +23778,7 @@ function AddCloud(data, x, y) { ... }</pre>
attribute DOMString <a href="#ping1" title=dom-area-ping>ping</a>; attribute DOMString <a href="#ping1" title=dom-area-ping>ping</a>;
attribute DOMString <a href="#rel2" title=dom-area-rel>rel</a>; attribute DOMString <a href="#rel2" title=dom-area-rel>rel</a>;
readonly attribute DOMTokenList <a href="#rellist1" title=dom-area-relList>relList</a>; readonly attribute DOMTokenList <a href="#rellist1" title=dom-area-relList>relList</a>;
attribute DOMString <a href="#media11" title=dom-area-media>media</a>; attribute DOMString <a href="#media13" title=dom-area-media>media</a>;
attribute DOMString <a href="#hreflang2" title=dom-area-hreflang>hreflang</a>; attribute DOMString <a href="#hreflang2" title=dom-area-hreflang>hreflang</a>;
attribute DOMString <a href="#type10" title=dom-area-type>type</a>; attribute DOMString <a href="#type10" title=dom-area-type>type</a>;
};</pre> };</pre>
Expand Down Expand Up @@ -23925,7 +23937,7 @@ function AddCloud(data, x, y) { ... }</pre>
<code title=attr-hyperlink-ping><a href="#ping">ping</a></code> attributes <code title=attr-hyperlink-ping><a href="#ping">ping</a></code> attributes
decide how the link is followed. The <code title=attr-hyperlink-rel><a decide how the link is followed. The <code title=attr-hyperlink-rel><a
href="#rel3">rel</a></code>, <code title=attr-hyperlink-media><a href="#rel3">rel</a></code>, <code title=attr-hyperlink-media><a
href="#media12">media</a></code>, <code title=attr-hyperlink-hreflang><a href="#media14">media</a></code>, <code title=attr-hyperlink-hreflang><a
href="#hreflang3">hreflang</a></code>, and <code href="#hreflang3">hreflang</a></code>, and <code
title=attr-hyperlink-type><a href="#type20">type</a></code> attributes may title=attr-hyperlink-type><a href="#type20">type</a></code> attributes may
be used to indicate to the user the likely nature of the target resource be used to indicate to the user the likely nature of the target resource
Expand All @@ -23935,7 +23947,7 @@ function AddCloud(data, x, y) { ... }</pre>
href="#target3">target</a></code>, <code title=attr-hyperlink-ping><a href="#target3">target</a></code>, <code title=attr-hyperlink-ping><a
href="#ping">ping</a></code>, <code title=attr-hyperlink-rel><a href="#ping">ping</a></code>, <code title=attr-hyperlink-rel><a
href="#rel3">rel</a></code>, <code title=attr-hyperlink-media><a href="#rel3">rel</a></code>, <code title=attr-hyperlink-media><a
href="#media12">media</a></code>, <code title=attr-hyperlink-hreflang><a href="#media14">media</a></code>, <code title=attr-hyperlink-hreflang><a
href="#hreflang3">hreflang</a></code>, and <code href="#hreflang3">hreflang</a></code>, and <code
title=attr-hyperlink-type><a href="#type20">type</a></code> attributes title=attr-hyperlink-type><a href="#type20">type</a></code> attributes
must be omitted if the <code title=attr-hyperlink-href><a must be omitted if the <code title=attr-hyperlink-href><a
Expand Down Expand Up @@ -23972,7 +23984,7 @@ function AddCloud(data, x, y) { ... }</pre>
title=dom-area-href><code>href</code></dfn>, <dfn id=target2 title=dom-area-href><code>href</code></dfn>, <dfn id=target2
title=dom-area-target><code>target</code></dfn>, <dfn id=ping1 title=dom-area-target><code>target</code></dfn>, <dfn id=ping1
title=dom-area-ping><code>ping</code></dfn>, <dfn id=rel2 title=dom-area-ping><code>ping</code></dfn>, <dfn id=rel2
title=dom-area-rel><code>rel</code></dfn>, <dfn id=media11 title=dom-area-rel><code>rel</code></dfn>, <dfn id=media13
title=dom-area-media><code>media</code></dfn>, <dfn id=hreflang2 title=dom-area-media><code>media</code></dfn>, <dfn id=hreflang2
title=dom-area-hreflang><code>hreflang</code></dfn>, and <dfn id=type10 title=dom-area-hreflang><code>hreflang</code></dfn>, and <dfn id=type10
title=dom-area-type><code>type</code></dfn>, each must <a title=dom-area-type><code>type</code></dfn>, each must <a
Expand Down Expand Up @@ -38432,11 +38444,11 @@ interface <dfn id=sqlstatementerrorcallback>SQLStatementErrorCallback</dfn> {
with the destination resource other than there being a hyperlink between with the destination resource other than there being a hyperlink between
the two. the two.


<p>The <dfn id=media12 title=attr-hyperlink-media><code>media</code></dfn> <p>The <dfn id=media14 title=attr-hyperlink-media><code>media</code></dfn>
attribute describes for which media the target document was designed. It attribute describes for which media the target document was designed. It
is purely advisory. The value must be a valid <a href="#mq">media is purely advisory. The value must be a valid <a href="#mq">media
query</a>. <a href="#refsMQ">[MQ]</a> The default, if the <code query</a>. <a href="#refsMQ">[MQ]</a> The default, if the <code
title=attr-hyperlink-media><a href="#media12">media</a></code> attribute title=attr-hyperlink-media><a href="#media14">media</a></code> attribute
is omitted, is <code>all</code>. is omitted, is <code>all</code>.


<p>The <dfn id=hreflang3 <p>The <dfn id=hreflang3
Expand Down Expand Up @@ -38974,14 +38986,14 @@ at the first element with the given ID must be treated as if it was cloned and r
representation of the current document. representation of the current document.


<p>The nature of the referenced document is given by the <code <p>The nature of the referenced document is given by the <code
title=attr-hyperlink-media><a href="#media12">media</a></code>, <code title=attr-hyperlink-media><a href="#media14">media</a></code>, <code
title=attr-hyperlink-hreflang><a href="#hreflang3">hreflang</a></code>, title=attr-hyperlink-hreflang><a href="#hreflang3">hreflang</a></code>,
and <code title=attr-hyperlink-type><a href="#type20">type</a></code> and <code title=attr-hyperlink-type><a href="#type20">type</a></code>
attributes. attributes.


<p>If the <code title=rel-alternate><a <p>If the <code title=rel-alternate><a
href="#alternate">alternate</a></code> keyword is used with the <code href="#alternate">alternate</a></code> keyword is used with the <code
title=attr-hyperlink-media><a href="#media12">media</a></code> attribute, title=attr-hyperlink-media><a href="#media14">media</a></code> attribute,
it indicates that the referenced document is intended for use with the it indicates that the referenced document is intended for use with the
media specified. media specified.


Expand All @@ -38999,7 +39011,7 @@ at the first element with the given ID must be treated as if it was cloned and r
document in the specified format. document in the specified format.


<p>The <code title=attr-hyperlink-media><a <p>The <code title=attr-hyperlink-media><a
href="#media12">media</a></code>, <code title=attr-hyperlink-hreflang><a href="#media14">media</a></code>, <code title=attr-hyperlink-hreflang><a
href="#hreflang3">hreflang</a></code>, and <code href="#hreflang3">hreflang</a></code>, and <code
title=attr-hyperlink-type><a href="#type20">type</a></code> attributes can title=attr-hyperlink-type><a href="#type20">type</a></code> attributes can
be combined when specified with the <code title=rel-alternate><a be combined when specified with the <code title=rel-alternate><a
Expand Down

0 comments on commit bf3f3cf

Please sign in to comment.