Skip to content
Permalink
Browse files
[] (0) More poking around getting the media element section to use th…
…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 bf3f3cf2068392425f863aaa25305ccf028b3edf
Showing with 120 additions and 89 deletions.
  1. +68 −56 index
  2. +52 −33 source
124 index
@@ -28,7 +28,7 @@

<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>

<p>You can take part in this work. <a
@@ -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-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
href="#hreflang3">hreflang</a></code>
@@ -13085,7 +13085,7 @@ first matching case):&lt;/p&gt;
href="#target3">target</a></code>, <code title=attr-hyperlink-ping><a
href="#ping">ping</a></code>, <code title=attr-hyperlink-rel><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
title=attr-hyperlink-type><a href="#type20">type</a></code> attributes
must be omitted if the <code title=attr-hyperlink-href><a
@@ -13114,7 +13114,7 @@ first matching case):&lt;/p&gt;
title=attr-hyperlink-ping><a href="#ping">ping</a></code> attributes
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="#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
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
@@ -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
<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
href="#media7">media element</a>'s own <a href="#new-resource">new
resource task source</a>.
href="#media7">media element</a>'s own <a href="#media12">media element
new resource task source</a>.

<p>The DOM attributes <dfn id=src6
title=dom-source-src><code>src</code></dfn>, <dfn id=type9
@@ -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.
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>

<p>All <a href="#media7" title="media element">media elements</a> have an
@@ -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
element</a>, and ignores any resulting exceptions. 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
resource task source</a>.
href="#media7">media element</a>'s own <a href="#media12">media element
new resource task source</a>.

<p class=note>If a <code title=attr-media-src><a
href="#src7">src</a></code> attribute is specified, the resource it
@@ -19072,9 +19081,14 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
<ol>
<li>
<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
resource task source</dfn> in one of the <a href="#task-queues"
title="task queue">task queues</a>, then remove those tasks.
the <a href="#media7">media element</a>'s <a href="#media12">media
element new resource task source</a> or its <a href="#media11">media
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>
<p>Any already-running instance of this algorithm for this element must
@@ -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
element</a>, and ignores any resulting exceptions. 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
resource task source</a>.
href="#media7">media element</a>'s own <a href="#media12">media element
new resource task source</a>.

<p>The <dfn id=bufferingrate
title=dom-media-bufferingRate><code>bufferingRate</code></dfn> attribute
@@ -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
(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
any running scripts have finished, <a href="#firing2">fire a simple
a previously established length to a new length) the user agent must <a
href="#queue">queue a task</a> to <a href="#firing2">fire a simple
event</a> called <code title=event-durationchange><a
href="#durationchange">durationchange</a></code> at the <a
href="#media7">media element</a>.</p>
<!-- xxx queue -->
href="#media7">media element</a>.

<p><a href="#media7" title="media element">Media elements</a> have a <dfn
id=current0>current playback position</dfn>, which must initially be zero.
@@ -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="#paused0">paused for user interaction</a>, or the <a href="#seek"
title=dom-media-seek>seeking algorithm</a> being invoked, the user agent
must <a href="#firing2">fire a simple event</a> called <code
title=event-timeupdate><a href="#timeupdate">timeupdate</a></code> at the
element, and then must <a href="#firing2">fire a simple event</a> called
<code title=event-waiting><a href="#waiting">waiting</a></code> at the
element.</p>
<!-- xxx queue -->
must <a href="#queue">queue a task</a> to <a href="#firing2">fire a simple
event</a> called <code title=event-timeupdate><a
href="#timeupdate">timeupdate</a></code> at the element, and <a
href="#queue">queue a task</a> to <a href="#firing2">fire a simple
event</a> called <code title=event-waiting><a
href="#waiting">waiting</a></code> at the element.

<p>When a <a href="#media7">media element</a> that is <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="#firing2">fire a simple event</a> called <code
title=event-timeupdate><a href="#timeupdate">timeupdate</a></code> at the
element.</p>
<!-- xxx queue -->
href="#queue">queue a task</a> to <a href="#firing2">fire a simple
event</a> called <code title=event-timeupdate><a
href="#timeupdate">timeupdate</a></code> at the element.

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

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

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

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

<p>The <dfn id=defaultplaybackrate
@@ -20050,12 +20061,13 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediae
title=dom-media-playbackRate><a
href="#playbackrate">playbackRate</a></code> attributes change value
(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
running scripts have finished, <a href="#firing2">fire a simple event</a>
called <code title=event-ratechange><a
agent, e.g. in response to user control) the user agent must <a
href="#queue">queue a task</a> to <a href="#firing2">fire a simple
event</a> called <code title=event-ratechange><a
href="#ratechange">ratechange</a></code> at the <a href="#media7">media
element</a>.</p>
<!-- xxx queue -->
element</a>.

<hr>

<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
@@ -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-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
href="#hreflang3">hreflang</a></code>
@@ -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="#rel2" title=dom-area-rel>rel</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="#type10" title=dom-area-type>type</a>;
};</pre>
@@ -23925,7 +23937,7 @@ function AddCloud(data, x, y) { ... }</pre>
<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
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
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
@@ -23935,7 +23947,7 @@ function AddCloud(data, x, y) { ... }</pre>
href="#target3">target</a></code>, <code title=attr-hyperlink-ping><a
href="#ping">ping</a></code>, <code title=attr-hyperlink-rel><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
title=attr-hyperlink-type><a href="#type20">type</a></code> attributes
must be omitted if the <code title=attr-hyperlink-href><a
@@ -23972,7 +23984,7 @@ function AddCloud(data, x, y) { ... }</pre>
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-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-hreflang><code>hreflang</code></dfn>, and <dfn id=type10
title=dom-area-type><code>type</code></dfn>, each must <a
@@ -38432,11 +38444,11 @@ interface <dfn id=sqlstatementerrorcallback>SQLStatementErrorCallback</dfn> {
with the destination resource other than there being a hyperlink between
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
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
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>.

<p>The <dfn id=hreflang3
@@ -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.

<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>,
and <code title=attr-hyperlink-type><a href="#type20">type</a></code>
attributes.

<p>If the <code title=rel-alternate><a
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
media specified.

@@ -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.

<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
title=attr-hyperlink-type><a href="#type20">type</a></code> attributes can
be combined when specified with the <code title=rel-alternate><a

0 comments on commit bf3f3cf

Please sign in to comment.