Skip to content
Permalink
Browse files

[giow] (0) Captions - Stage 4: preparing the ground for timed tracks …

…updating during media playback.

git-svn-id: http://svn.whatwg.org/webapps@5073 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed May 4, 2010
1 parent 07eb316 commit f81fcc138eeba0728fe3854b062b5f3f1f50afa4
Showing with 218 additions and 148 deletions.
  1. +79 −57 complete.html
  2. +77 −55 index
  3. +62 −36 source
<li><a href=#timed-tracks><span class=secno>4.8.10.10 </span>Timed tracks</a>
<ol>
<li><a href=#timed-track-model><span class=secno>4.8.10.10.1 </span>Timed track model</a></li>
<li><a href=#timed-track-api><span class=secno>4.8.10.10.2 </span>Timed track API</a></li>
<li><a href=#in-band-timed-tracks><span class=secno>4.8.10.10.3 </span>In-band timed tracks</a></li>
<li><a href=#websrt-timed-tracks><span class=secno>4.8.10.10.4 </span>WebSRT timed tracks</a></li>
<li><a href=#sourcing-timed-tracks><span class=secno>4.8.10.10.5 </span>Sourcing timed tracks</a></li>
<li><a href=#timed-track-processing-model><span class=secno>4.8.10.10.6 </span>Timed track processing model</a></li>
<li><a href=#event-definitions><span class=secno>4.8.10.10.7 </span>Event definitions</a></ol></li>
<li><a href=#user-interface><span class=secno>4.8.10.11 </span>User interface</a></li>
<li><a href=#time-ranges><span class=secno>4.8.10.12 </span>Time ranges</a></li>
<li><a href=#mediaevents><span class=secno>4.8.10.13 </span>Event summary</a></li>
<li><a href=#security-and-privacy-considerations><span class=secno>4.8.10.14 </span>Security and privacy considerations</a></ol></li>
<li><a href=#sourcing-in-band-timed-tracks><span class=secno>4.8.10.10.2 </span>Sourcing in-band timed tracks</a></li>
<li><a href=#sourcing-websrt-timed-tracks><span class=secno>4.8.10.10.3 </span>Sourcing WebSRT timed tracks</a></li>
<li><a href=#timed-track-processing-model><span class=secno>4.8.10.10.4 </span>Timed track processing model</a></li>
<li><a href=#timed-track-api><span class=secno>4.8.10.10.5 </span>Timed track API</a></li>
<li><a href=#cue-events><span class=secno>4.8.10.10.6 </span>Event definitions</a></ol></li>
<li><a href=#websrt><span class=secno>4.8.10.11 </span>WebSRT</a>
<ol>
<li><a href=#syntax-0><span class=secno>4.8.10.11.1 </span>Syntax</a></li>
<li><a href=#parsing-0><span class=secno>4.8.10.11.2 </span>Parsing</a></ol></li>
<li><a href=#user-interface><span class=secno>4.8.10.12 </span>User interface</a></li>
<li><a href=#time-ranges><span class=secno>4.8.10.13 </span>Time ranges</a></li>
<li><a href=#mediaevents><span class=secno>4.8.10.14 </span>Event summary</a></li>
<li><a href=#security-and-privacy-considerations><span class=secno>4.8.10.15 </span>Security and privacy considerations</a></ol></li>
<li><a href=#the-canvas-element><span class=secno>4.8.11 </span>The <code>canvas</code> element</a>
<ol>
<li><a href=#2dcontext><span class=secno>4.8.11.1 </span>The 2D context</a>
<li><a href=#scroll-to-fragid><span class=secno>6.5.8 </span>Navigating to a fragment identifier</a></li>
<li><a href=#history-traversal><span class=secno>6.5.9 </span>History traversal</a>
<ol>
<li><a href=#event-definitions-0><span class=secno>6.5.9.1 </span>Event definitions</a></ol></li>
<li><a href=#event-definitions><span class=secno>6.5.9.1 </span>Event definitions</a></ol></li>
<li><a href=#unloading-documents><span class=secno>6.5.10 </span>Unloading documents</a>
<ol>
<li><a href=#event-definition><span class=secno>6.5.10.1 </span>Event definition</a></ol></li>
<li><a href=#worker-locations><span class=secno>9.3.5 </span>Worker locations</a></ol></ol></li>
<li><a href=#comms><span class=secno>10 </span>Communication</a>
<ol>
<li><a href=#event-definitions-1><span class=secno>10.1 </span>Event definitions</a></li>
<li><a href=#event-definitions-0><span class=secno>10.1 </span>Event definitions</a></li>
<li><a href=#server-sent-events><span class=secno>10.2 </span>Server-sent events</a>
<ol>
<li><a href=#server-sent-events-intro><span class=secno>10.2.1 </span>Introduction</a></li>
<li><a href=#the-websocket-interface><span class=secno>10.3.2 </span>The <code>WebSocket</code> interface</a></li>
<li><a href=#feedback-from-the-protocol><span class=secno>10.3.3 </span>Feedback from the protocol</a>
<ol>
<li><a href=#event-definitions-2><span class=secno>10.3.3.1 </span>Event definitions</a></li>
<li><a href=#event-definitions-1><span class=secno>10.3.3.1 </span>Event definitions</a></li>
<li><a href=#garbage-collection-1><span class=secno>10.3.3.2 </span>Garbage collection</a></ol></li>
<li><a href=#websocket-protocol title="The WebSocket protocol enables
two-way communication between a user agent running untrusted code
<ol><li><p>If a fetching process is in progress for the <a href=#media-element>media
element</a>, the user agent should stop it.</li>

<li>Set the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
<a href=#dom-media-network_empty title=dom-media-NETWORK_EMPTY>NETWORK_EMPTY</a>.</li>
<li><p>Set the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
<code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>.</li>

<li class=XXX><p>remove all timed tracks</li>

<li>If <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is
<li><p>If <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is
not set to <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then set it
to that state.</li>

<li>If the <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute
is false, then set to true.</li>
<li><p>If the <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code>
attribute is false, then set to true.</li>

<li>If <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> is true,
<li><p>If <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> is true,
set it to false.</li>

<li>Set the <a href=#current-playback-position>current playback position</a> to 0.</li>
<li><p>Set the <a href=#current-playback-position>current playback position</a> to
0.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code> at the <a href=#media-element>media
the <a href=#event-loop>event loop</a> algorithm). Steps in such sections are
marked with &#8987;.</p>

<ol><li><p>Set the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> to <code title=dom-media-NETWORK_NO_SOURCE><a href=#dom-media-network_no_source>NETWORK_NO_SOURCE</a></code>.</li>
<ol><!-- precondition: networkState == NETWORK_EMPTY at this point --><li><p>Set the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> to <code title=dom-media-NETWORK_NO_SOURCE><a href=#dom-media-network_no_source>NETWORK_NO_SOURCE</a></code>.</li>

<li><p>Asynchronously <a href=#await-a-stable-state>await a stable state</a>, allowing
the <a href=#concept-task title=concept-task>task</a> that invoked this
<li><p><i>Failed</i>: Reaching this step indicates that the media
resource failed to load or that the given <a href=#url>URL</a> could
not be <a href=#resolve-a-url title="resolve a url">resolved</a>. Set the <code title=dom-media-error><a href=#dom-media-error>error</a></code> attribute to a new
<code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to <code title=dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED><a href=#dom-mediaerror-media_err_src_not_supported>MEDIA_ERR_SRC_NOT_SUPPORTED</a></code>.</li>
<code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute is set to <code title=dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED><a href=#dom-mediaerror-media_err_src_not_supported>MEDIA_ERR_SRC_NOT_SUPPORTED</a></code>. <span class=XXX>remove all timed tracks</span></li>

<li><p>Set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <a href=#dom-media-network_no_source title=dom-media-NETWORK_NO_SOURCE>NETWORK_NO_SOURCE</a>
<a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-error>error</code> at the <var title="">candidate</var> element, in the context of the <a href=#fetch title=fetch>fetching process</a> that was used to try to
obtain <var title="">candidate</var>'s corresponding <a href=#media-resource>media
resource</a> in the <a href=#concept-media-load-resource title=concept-media-load-resource>resource fetch
algorithm</a>.</li>
algorithm</a>. <span class=XXX>remove all timed
tracks</span></li>

<li><p>Asynchronously <a href=#await-a-stable-state>await a stable state</a>. The
<a href=#synchronous-section>synchronous section</a> consists of all the remaining
at the <a href=#media-element>media element</a>.</li>

<li><p>Set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <a href=#dom-media-network_empty title=dom-media-NETWORK_EMPTY>NETWORK_EMPTY</a>
the <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>
value and <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code>
at the element.</li>
event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code> at the
element.</li> <!-- XXX shouldn't this be _IDLE? see
aborted-by-user state below -->

<li><p>Set the element's <a href=#delaying-the-load-event-flag>delaying-the-load-event
flag</a> to false. This stops <a href=#delay-the-load-event title="delay the load
at the <a href=#media-element>media element</a>.</li>

<li><p>Set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <a href=#dom-media-network_empty title=dom-media-NETWORK_EMPTY>NETWORK_EMPTY</a>
the <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>
value and <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code>
at the element.</li>
event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code> at the
element.</li> <!-- XXX shouldn't this be _IDLE? see
aborted-by-user case below -->

<li><p>Set the element's <a href=#delaying-the-load-event-flag>delaying-the-load-event
flag</a> to false. This stops <a href=#delay-the-load-event title="delay the load
<li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute has a
value equal to <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, set the
element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <a href=#dom-media-network_empty title=dom-media-NETWORK_EMPTY>NETWORK_EMPTY</a>
the <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>
value and <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code>
at the element. Otherwise, set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute to
the <a href=#dom-media-network_idle title=dom-media-NETWORK_IDLE>NETWORK_IDLE</a>
the <code title=dom-media-NETWORK_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code>
value.</li>

<li><p>Set the element's <a href=#delaying-the-load-event-flag>delaying-the-load-event

</dd>


<dt class=XXX>timed tracks are found</dt>

<dd>

<p class=XXX>...

</dd>

</dl><p>When the <a href=#networking-task-source>networking task source</a> has <a href=#queue-a-task title="queue a task">queued</a> the last <a href=#concept-task title=concept-task>task</a> as part of <a href=#fetch title=fetch>fetching</a> the <a href=#media-resource>media resource</a>
(i.e. once the download has completed), if the fetching process
completes without errors, including decoding the media data, and
available. No data for the <a href=#current-playback-position>current playback position</a>
is available. <a href=#media-element title="media element">Media elements</a>
whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code>
attribute is <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> are always in
attribute are set to <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> are always in
the <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>
state.</dd>

HTML.</p>
</dd>

</dl><p class=XXX>...
</dl><h6 id=sourcing-in-band-timed-tracks><span class=secno>4.8.10.10.2 </span>Sourcing in-band timed tracks</h6>

<p>


<h6 id=timed-track-api><span class=secno>4.8.10.10.2 </span>Timed track API</h6>
<h6 id=sourcing-websrt-timed-tracks><span class=secno>4.8.10.10.3 </span>Sourcing WebSRT timed tracks</h6>

<p class=XXX>...


<h6 id=timed-track-processing-model><span class=secno>4.8.10.10.4 </span>Timed track processing model</h6>

<p class=XXX>...


<h6 id=timed-track-api><span class=secno>4.8.10.10.5 </span>Timed track API</h6>

<!--
// timed tracks on HTMLMediaElement:
</div>


<h6 id=in-band-timed-tracks><span class=secno>4.8.10.10.3 </span>In-band timed tracks</h6>
<h6 id=cue-events><span class=secno>4.8.10.10.6 </span>Event definitions</h6>

<p class=XXX>...

<!-- XXX
CueEvent
readonly attribute MediaCue cue;
-->

<h6 id=websrt-timed-tracks><span class=secno>4.8.10.10.4 </span>WebSRT timed tracks</h6>

<p class=XXX>...


<h6 id=sourcing-timed-tracks><span class=secno>4.8.10.10.5 </span>Sourcing timed tracks</h6>

<p class=XXX>...

<h5 id=websrt><span class=secno>4.8.10.11 </span>WebSRT</h5>

<h6 id=timed-track-processing-model><span class=secno>4.8.10.10.6 </span>Timed track processing model</h6>
<h6 id=syntax-0><span class=secno>4.8.10.11.1 </span>Syntax</h6>

<p class=XXX>...


<h6 id=event-definitions><span class=secno>4.8.10.10.7 </span>Event definitions</h6>
<h6 id=parsing-0><span class=secno>4.8.10.11.2 </span>Parsing</h6>

<p class=XXX>...

<!-- XXX
CueEvent
readonly attribute MediaCue cue;
-->


<h5 id=user-interface><span class=secno>4.8.10.11 </span>User interface</h5>
<h5 id=user-interface><span class=secno>4.8.10.12 </span>User interface</h5>

<p>The <dfn id=attr-media-controls title=attr-media-controls><code>controls</code></dfn>
attribute is a <a href=#boolean-attribute>boolean attribute</a>. If present, it



<h5 id=time-ranges><span class=secno>4.8.10.12 </span>Time ranges</h5>
<h5 id=time-ranges><span class=secno>4.8.10.13 </span>Time ranges</h5>

<p>Objects implementing the <code><a href=#timeranges>TimeRanges</a></code> interface
represent a list of ranges (periods) of time.</p>
</div>


<h5 id=mediaevents><span class=secno>4.8.10.13 </span>Event summary</h5>
<h5 id=mediaevents><span class=secno>4.8.10.14 </span>Event summary</h5>

<p><i>This section is non-normative.</i></p>

<td>
</table><div class=impl>

<h5 id=security-and-privacy-considerations><span class=secno>4.8.10.14 </span>Security and privacy considerations</h5>
<h5 id=security-and-privacy-considerations><span class=secno>4.8.10.15 </span>Security and privacy considerations</h5>

<p>The main security and privacy implications of the
<code><a href=#video>video</a></code> and <code><a href=#audio>audio</a></code> elements come from the
<a href=#dom-manipulation-task-source>DOM manipulation task source</a>.</p>


<h5 id=event-definitions-0><span class=secno>6.5.9.1 </span>Event definitions</h5>
<h5 id=event-definitions><span class=secno>6.5.9.1 </span>Event definitions</h5>

</div>




<h3 id=event-definitions-1><span class=secno>10.1 </span>Event definitions</h3>
<h3 id=event-definitions-0><span class=secno>10.1 </span>Event definitions</h3>

<p>Messages in <a href=#server-sent-events>server-sent events</a>, <a href=#network>Web
sockets</a>, <a href=#crossDocumentMessages>cross-document messaging</a>, and
source</dfn>.</p>


<h5 id=event-definitions-2><span class=secno>10.3.3.1 </span>Event definitions</h5>
<h5 id=event-definitions-1><span class=secno>10.3.3.1 </span>Event definitions</h5>

<pre class=idl>interface <dfn id=closeevent>CloseEvent</dfn> : <a href=#event>Event</a> {
readonly attribute boolean <a href=#dom-closeevent-wasclean title=dom-CloseEvent-wasClean>wasClean</a>;

0 comments on commit f81fcc1

Please sign in to comment.
You can’t perform that action at this time.