Short URL: http://html5.org/r/7098
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 7098 | 14492 | 2012-05-08 17:21 |
Index: source
===================================================================
--- source (revision 7097)
+++ source (revision 7098)
@@ -32031,6 +32031,28 @@
known</a>, the <span>current playback position</span> can never be
less than the <span>earliest possible position</span>.</p>
+ <!-- see https://www.w3.org/Bugs/Public/show_bug.cgi?id=14492 -->
+ <!-- basically this is to handle very-long-running streams that use
+ different video and audio tracks per TV show -->
+ <p>If at any time the user agent learns that an audio or video track
+ has ended and all <span>media data</span> relating to that track
+ corresponds to parts of the <span>media timeline</span> that are
+ <em>before</em> the <span>earliest possible position</span>, the
+ user agent may <span>queue a task</span> to remove the track from
+ the <code title="dom-media-audioTracks">audioTracks</code>
+ attribute's <code>AudioTrackList</code> object or the <code
+ title="dom-media-videoTracks">videoTracks</code> attribute's
+ <code>VideoTrackList</code> object as appropriate and then fire an
+ event with the name <code
+ title="event-removetrack">removetrack</code>, that does not bubble
+ and is not cancelable, and that uses the <code>TrackEvent</code>
+ interface, with the <code title="dom-TrackEvent-track">track</code>
+ attribute initialized to the <code>AudioTrack</code> or
+ <code>VideoTrack</code> object representing the track, at the
+ <span>media element</span>'s aforementioned
+ <code>AudioTrackList</code> or <code>VideoTrackList</code>
+ object.</p>
+
<p>The <dfn title="dom-media-duration"><code>duration</code></dfn>
attribute must return the time of the end of the <span>media
resource</span>, in seconds, on the <span>media timeline</span>. If
@@ -33547,6 +33569,7 @@
[TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-TrackList-onchange">onchange</span>;
[TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-TrackList-onaddtrack">onaddtrack</span>;
+ [TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-TrackList-onremovetrack">onremovetrack</span>;
};
interface <dfn>AudioTrack</dfn> {
@@ -33565,6 +33588,7 @@
[TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-TrackList-onchange">onchange</span>;
[TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-TrackList-onaddtrack">onaddtrack</span>;
+ [TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-TrackList-onremovetrack">onremovetrack</span>;
};
interface <dfn>VideoTrack</dfn> {
@@ -33940,6 +33964,7 @@
<tbody>
<tr><td><dfn title="handler-TrackList-onchange"><code>onchange</code></dfn> <td> <code title="event-change">change</code>
<tr><td><dfn title="handler-TrackList-onaddtrack"><code>onaddtrack</code></dfn> <td> <code title="event-addtrack">addtrack</code>
+ <tr><td><dfn title="handler-TrackList-onremovetrack"><code>onremovetrack</code></dfn> <td> <code title="event-removetrack">removetrack</code>
</table>
<hr>
@@ -35465,6 +35490,13 @@
</ol>
+ <!-- removetrack: we don't currently ever remove an in-band text
+ track, because it might have been manipulated or might be about to
+ be manipulated. If we made in-band text tracks readonly, we could
+ probably get away with cleaning them up when they fall into the time
+ before the earliest possible position and are known to be over and
+ done with. -->
+
<p>When a <span>media element</span> is to <dfn>forget the media
element's media-resource-specific text tracks</dfn>, the user
agent must remove from the <span>media element</span>'s <span>list
@@ -35554,7 +35586,15 @@
the old parent was a <span>media element</span>, then the user agent
must remove the <code>track</code> element's corresponding
<span>text track</span> from the <span>media element</span>'s
- <span>list of text tracks</span>.</p> <!-- removetrack -->
+ <span>list of text tracks</span>, and then <span>queue a task</span>
+ to fire an event with the name <code
+ title="event-removetrack">removetrack</code>, that does not bubble
+ and is not cancelable, and that uses the <code>TrackEvent</code>
+ interface, with the <code title="dom-TrackEvent-track">track</code>
+ attribute initialized to the <span>text track</span>'s
+ <code>TextTrack</code> object, at the <span>media element</span>'s
+ <code title="dom-media-textTracks">textTracks</code> attribute's
+ <code>TextTrackList</code> object.</p> <!-- removetrack -->
<p>When a <span>text track</span> corresponding to a
<code>track</code> element is added to a <span>media
@@ -35910,6 +35950,7 @@
getter <span>TextTrack</span> (unsigned long index);
[TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-TextTrackList-onaddtrack">onaddtrack</span>;
+ [TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-TextTrackList-onremovetrack">onremovetrack</span>;
};</pre>
<dl class="domintro">
@@ -36920,6 +36961,7 @@
<tr><th><span title="event handlers">Event handler</span> <th><span>Event handler event type</span>
<tbody>
<tr><td><dfn title="handler-TextTrackList-onaddtrack"><code>onaddtrack</code></dfn> <td> <code title="event-addtrack">addtrack</code>
+ <tr><td><dfn title="handler-TextTrackList-onremovetrack"><code>onremovetrack</code></dfn> <td> <code title="event-removetrack">removetrack</code>
</table>
<p>The following are the <span>event handlers</span> that (and their