[html5] r7968 - [giow] (2) Provide a way for scripts to know when TextTrackList members get enab [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed Jun 12 15:54:57 PDT 2013
Author: ianh
Date: 2013-06-12 15:54:56 -0700 (Wed, 12 Jun 2013)
New Revision: 7968
Modified:
complete.html
index
source
Log:
[giow] (2) Provide a way for scripts to know when TextTrackList members get enabled or disabled.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=22086
Affected topics: HTML, Video Text Tracks, Video and Audio
Modified: complete.html
===================================================================
--- complete.html 2013-06-12 22:31:23 UTC (rev 7967)
+++ complete.html 2013-06-12 22:54:56 UTC (rev 7968)
@@ -27788,7 +27788,7 @@
<li><p>Update the <a href=#media-element>media element</a>'s <code title=dom-media-audioTracks><a href=#dom-media-audiotracks>audioTracks</a></code> attribute's <code><a href=#audiotracklist>AudioTrackList</a></code>
object with the new <code><a href=#audiotrack>AudioTrack</a></code> object.</li>
- <li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-addtrack>addtrack</code>, that does not bubble and is not cancelable, and that
+ <li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-media-addtrack><a href=#event-media-addtrack>addtrack</a></code>, that does not bubble and is not cancelable, and that
uses the <code><a href=#trackevent>TrackEvent</a></code> interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code> attribute initialized to the new
<code><a href=#audiotrack>AudioTrack</a></code> object, at this <code><a href=#audiotracklist>AudioTrackList</a></code> object.</li>
@@ -27805,7 +27805,7 @@
<li><p>Update the <a href=#media-element>media element</a>'s <code title=dom-media-videoTracks><a href=#dom-media-videotracks>videoTracks</a></code> attribute's <code><a href=#videotracklist>VideoTrackList</a></code>
object with the new <code><a href=#videotrack>VideoTrack</a></code> object.</li>
- <li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-addtrack>addtrack</code>, that does not bubble and is not cancelable, and that
+ <li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-media-addtrack><a href=#event-media-addtrack>addtrack</a></code>, that does not bubble and is not cancelable, and that
uses the <code><a href=#trackevent>TrackEvent</a></code> interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code> attribute initialized to the new
<code><a href=#videotrack>VideoTrack</a></code> object, at this <code><a href=#videotracklist>VideoTrackList</a></code> object.</li>
@@ -28112,7 +28112,7 @@
tracks</a> all the <a href=#media-resource-specific-text-track title="media-resource-specific text track">media-resource-specific
text tracks</a>, then empty the <a href=#media-element>media element</a>'s <code title=dom-media-audioTracks><a href=#dom-media-audiotracks>audioTracks</a></code> attribute's <code><a href=#audiotracklist>AudioTrackList</a></code> object,
then empty the <a href=#media-element>media element</a>'s <code title=dom-media-videoTracks><a href=#dom-media-videotracks>videoTracks</a></code>
- attribute's <code><a href=#videotracklist>VideoTrackList</a></code> object. No events (in particular, no <code title=event-removetrack>removetrack</code> events) are fired as part of this; the <code title=event-media-error><a href=#event-media-error>error</a></code> and <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code>
+ attribute's <code><a href=#videotracklist>VideoTrackList</a></code> object. No events (in particular, no <code title=event-media-removetrack><a href=#event-media-removetrack>removetrack</a></code> events) are fired as part of this; the <code title=event-media-error><a href=#event-media-error>error</a></code> and <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code>
events, fired by the algorithms that invoke this one, can be used instead.</p>
</div>
@@ -28387,7 +28387,7 @@
are <em>before</em> the <a href=#earliest-possible-position>earliest possible position</a>, the user agent may <a href=#queue-a-task>queue a
task</a> to first remove the track from the <code title=dom-media-audioTracks><a href=#dom-media-audiotracks>audioTracks</a></code>
attribute's <code><a href=#audiotracklist>AudioTrackList</a></code> object or the <code title=dom-media-videoTracks><a href=#dom-media-videotracks>videoTracks</a></code> attribute's <code><a href=#videotracklist>VideoTrackList</a></code> object as
- appropriate and then <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-removetrack>removetrack</code>, that does not bubble and is not cancelable, and that
+ appropriate and then <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-media-removetrack><a href=#event-media-removetrack>removetrack</a></code>, that does not bubble and is not cancelable, and that
uses the <code><a href=#trackevent>TrackEvent</a></code> interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code> attribute initialized to the <code><a href=#audiotrack>AudioTrack</a></code> or
<code><a href=#videotrack>VideoTrack</a></code> object representing the track, at the <a href=#media-element>media element</a>'s
aforementioned <code><a href=#audiotracklist>AudioTrackList</a></code> or <code><a href=#videotracklist>VideoTrackList</a></code> object.</p>
@@ -29740,7 +29740,7 @@
effect beyond changing the value of the attribute on the <code><a href=#audiotrack>AudioTrack</a></code> object.)</p>
<p>Whenever an audio track in an <code><a href=#audiotracklist>AudioTrackList</a></code> is enabled or disabled, the user
- agent must <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-change>change</code> at the <code><a href=#audiotracklist>AudioTrackList</a></code> object.</p>
+ agent must <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-change><a href=#event-media-change>change</a></code> at the <code><a href=#audiotracklist>AudioTrackList</a></code> object.</p>
<p>The <dfn id=dom-videotracklist-selectedindex title=dom-VideoTrackList-selectedIndex><code>VideoTrackList.selectedIndex</code></dfn> attribute
must return the index of the currently selected track, if any. If the <code><a href=#videotracklist>VideoTrackList</a></code>
@@ -29756,7 +29756,7 @@
<code><a href=#videotrack>VideoTrack</a></code> object.)</p>
<p>Whenever a track in a <code><a href=#videotracklist>VideoTrackList</a></code> that was previously not selected is selected,
- the user agent must <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-change>change</code> at the <code><a href=#videotracklist>VideoTrackList</a></code> object.</p>
+ the user agent must <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-change><a href=#event-media-change>change</a></code> at the <code><a href=#videotracklist>VideoTrackList</a></code> object.</p>
<hr><p>The following are the <a href=#event-handlers>event handlers</a> (and their corresponding <a href=#event-handler-event-type title="event
handler event type">event handler event types</a>) that must be supported, as IDL attributes,
@@ -29764,9 +29764,9 @@
interfaces:</p>
<table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
- <tbody><tr><td><dfn id=handler-tracklist-onchange title=handler-TrackList-onchange><code>onchange</code></dfn> <td> <code title=event-change>change</code>
- <tr><td><dfn id=handler-tracklist-onaddtrack title=handler-TrackList-onaddtrack><code>onaddtrack</code></dfn> <td> <code title=event-addtrack>addtrack</code>
- <tr><td><dfn id=handler-tracklist-onremovetrack title=handler-TrackList-onremovetrack><code>onremovetrack</code></dfn> <td> <code title=event-removetrack>removetrack</code>
+ <tbody><tr><td><dfn id=handler-tracklist-onchange title=handler-TrackList-onchange><code>onchange</code></dfn> <td> <code title=event-media-change><a href=#event-media-change>change</a></code>
+ <tr><td><dfn id=handler-tracklist-onaddtrack title=handler-TrackList-onaddtrack><code>onaddtrack</code></dfn> <td> <code title=event-media-addtrack><a href=#event-media-addtrack>addtrack</a></code>
+ <tr><td><dfn id=handler-tracklist-onremovetrack title=handler-TrackList-onremovetrack><code>onremovetrack</code></dfn> <td> <code title=event-media-removetrack><a href=#event-media-removetrack>removetrack</a></code>
</table><hr><p>The <a href=#task-source>task source</a> for the <a href=#concept-task title=concept-task>tasks</a> listed in this
section is the <a href=#dom-manipulation-task-source>DOM manipulation task source</a>.</p>
@@ -30821,6 +30821,35 @@
<p>The <a href=#text-track title="text track">text tracks</a> of a <a href=#media-element>media element</a> are <dfn id=the-text-tracks-are-ready title="the text tracks are ready">ready</dfn> when both the element's <a href=#list-of-pending-text-tracks>list of pending text
tracks</a> is empty and the element's <a href=#blocked-on-parser>blocked-on-parser</a> flag is false.</p>
+ <p>Each <a href=#media-element>media element</a> has a <dfn id=pending-text-track-change-notification-flag>pending text track change notification flag</dfn>,
+ which must initially be unset.</p>
+
+ <p>Whenever a <a href=#text-track>text track</a> that is in a <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text
+ tracks</a> has its <a href=#text-track-mode>text track mode</a> change value, the user agent must run the
+ following steps for the <a href=#media-element>media element</a>:</p>
+
+ <ol><li><p>If the <a href=#media-element>media element</a>'s <a href=#pending-text-track-change-notification-flag>pending text track change notification
+ flag</a> is set, abort these steps.</li>
+
+ <li><p>Set the <a href=#media-element>media element</a>'s <a href=#pending-text-track-change-notification-flag>pending text track change notification
+ flag</a>.</li>
+
+ <li>
+
+ <p><a href=#queue-a-task>Queue a task</a> that runs the following substeps:</p>
+
+ <ol><li><p>Unset the <a href=#media-element>media element</a>'s <a href=#pending-text-track-change-notification-flag>pending text track change notification
+ flag</a>.</li>
+
+ <li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-media-change><a href=#event-media-change>change</a></code> at
+ the <a href=#media-element>media element</a>'s <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code>
+ attribute's <code><a href=#texttracklist>TextTrackList</a></code> object.</li>
+
+ </ol></li>
+
+ </ol><p>The <a href=#task-source>task source</a> for the <a href=#concept-task title=concept-task>tasks</a> listed in this
+ section is the <a href=#dom-manipulation-task-source>DOM manipulation task source</a>.</p>
+
<hr><p>A <dfn id=text-track-cue>text track cue</dfn> is the unit of time-sensitive data in a <a href=#text-track>text track</a>,
corresponding for instance for subtitles and captions to the text that appears at a particular
time and disappears at another time.</p>
@@ -31022,7 +31051,7 @@
<li><p>Add the new <a href=#text-track>text track</a> to the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text
tracks</a>.</li>
- <li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-addtrack>addtrack</code>, that does not bubble and is not cancelable, and that uses
+ <li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-media-addtrack><a href=#event-media-addtrack>addtrack</a></code>, that does not bubble and is not cancelable, and that uses
the <code><a href=#trackevent>TrackEvent</a></code> interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code>
attribute initialized to the <a href=#text-track>text track</a>'s <code><a href=#texttrack>TextTrack</a></code> object, at the
<a href=#media-element>media element</a>'s <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code> attribute's
@@ -31083,7 +31112,7 @@
<p>When a <code><a href=#the-track-element>track</a></code> element's parent element changes and the new parent is a <a href=#media-element>media
element</a>, then the user agent must add the <code><a href=#the-track-element>track</a></code> element's corresponding
<a href=#text-track>text track</a> to the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>, and
- then <a href=#queue-a-task>queue a task</a> to <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-addtrack>addtrack</code>, that does not bubble and is not cancelable, and that uses
+ then <a href=#queue-a-task>queue a task</a> to <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-media-addtrack><a href=#event-media-addtrack>addtrack</a></code>, that does not bubble and is not cancelable, and that uses
the <code><a href=#trackevent>TrackEvent</a></code> interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code>
attribute initialized to the <a href=#text-track>text track</a>'s <code><a href=#texttrack>TextTrack</a></code> object, at the
<a href=#media-element>media element</a>'s <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code> attribute's
@@ -31092,7 +31121,7 @@
<p>When a <code><a href=#the-track-element>track</a></code> element's parent element changes and the old parent was a <a href=#media-element>media
element</a>, then the user agent must remove the <code><a href=#the-track-element>track</a></code> element's corresponding
<a href=#text-track>text track</a> from the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>,
- and then <a href=#queue-a-task>queue a task</a> to <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-removetrack>removetrack</code>, that does not bubble and is not cancelable, and that
+ and then <a href=#queue-a-task>queue a task</a> to <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-media-removetrack><a href=#event-media-removetrack>removetrack</a></code>, that does not bubble and is not cancelable, and that
uses the <code><a href=#trackevent>TrackEvent</a></code> interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code> attribute initialized to the <a href=#text-track>text track</a>'s
<code><a href=#texttrack>TextTrack</a></code> object, at the <a href=#media-element>media element</a>'s <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code> attribute's <code><a href=#texttracklist>TextTrackList</a></code> object.</p>
<!-- removetrack -->
@@ -31357,6 +31386,7 @@
getter <a href=#texttrack>TextTrack</a> (unsigned long index);
<a href=#texttrack>TextTrack</a>? <a href=#dom-texttracklist-gettrackbyid title=dom-TextTrackList-getTrackById>getTrackById</a>(DOMString id);
+ attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-texttracklist-onchange title=handler-TextTrackList-onchange>onchange</a>;
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-texttracklist-onaddtrack title=handler-TextTrackList-onaddtrack>onaddtrack</a>;
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-texttracklist-onremovetrack title=handler-TextTrackList-onremovetrack>onremovetrack</a>;
};</pre>
@@ -31566,7 +31596,7 @@
<li>
- <p><a href=#queue-a-task>Queue a task</a> to <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-addtrack>addtrack</code>, that does not bubble and is not cancelable, and that
+ <p><a href=#queue-a-task>Queue a task</a> to <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-media-addtrack><a href=#event-media-addtrack>addtrack</a></code>, that does not bubble and is not cancelable, and that
uses the <code><a href=#trackevent>TrackEvent</a></code> interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code> attribute initialized to the new <a href=#text-track>text
track</a>'s <code><a href=#texttrack>TextTrack</a></code> object, at the <a href=#media-element>media element</a>'s <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code> attribute's <code><a href=#texttracklist>TextTrackList</a></code>
object.</p>
@@ -32000,8 +32030,9 @@
attributes, by all objects implementing the <code><a href=#texttracklist>TextTrackList</a></code> interface:</p>
<table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
- <tbody><tr><td><dfn id=handler-texttracklist-onaddtrack title=handler-TextTrackList-onaddtrack><code>onaddtrack</code></dfn> <td> <code title=event-addtrack>addtrack</code>
- <tr><td><dfn id=handler-texttracklist-onremovetrack title=handler-TextTrackList-onremovetrack><code>onremovetrack</code></dfn> <td> <code title=event-removetrack>removetrack</code>
+ <tbody><tr><td><dfn id=handler-texttracklist-onchange title=handler-TextTrackList-onchange><code>onchange</code></dfn> <td> <code title=event-media-change><a href=#event-media-change>change</a></code>
+ <tr><td><dfn id=handler-texttracklist-onaddtrack title=handler-TextTrackList-onaddtrack><code>onaddtrack</code></dfn> <td> <code title=event-media-addtrack><a href=#event-media-addtrack>addtrack</a></code>
+ <tr><td><dfn id=handler-texttracklist-onremovetrack title=handler-TextTrackList-onremovetrack><code>onremovetrack</code></dfn> <td> <code title=event-media-removetrack><a href=#event-media-removetrack>removetrack</a></code>
</table><p>The following are the <a href=#event-handlers>event handlers</a> that (and their corresponding <a href=#event-handler-event-type title="event handler event type">event handler event types</a>) must be supported, as IDL
attributes, by all objects implementing the <code><a href=#texttrack>TextTrack</a></code> interface:</p>
@@ -32295,20 +32326,19 @@
<pre class=idl>[Constructor(DOMString type, optional <a href=#trackeventinit>TrackEventInit</a> eventInitDict)]
interface <dfn id=trackevent>TrackEvent</dfn> : <a href=#event>Event</a> {
- readonly attribute object? <a href=#dom-trackevent-track title=dom-TrackEvent-track>track</a>;
+ readonly attribute (<a href=#videotrack>VideoTrack</a> or <a href=#audiotrack>AudioTrack</a> or <a href=#texttrack>TextTrack</a>) <a href=#dom-trackevent-track title=dom-TrackEvent-track>track</a>;
};
dictionary <dfn id=trackeventinit>TrackEventInit</dfn> : <a href=#eventinit>EventInit</a> {
- object? track;
+ (<a href=#videotrack>VideoTrack</a> or <a href=#audiotrack>AudioTrack</a> or <a href=#texttrack>TextTrack</a>) track;
};</pre>
<dl class=domintro><dt><var title="">event</var> . <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code></dt>
<dd>
- <p>Returns the track object (<code><a href=#texttrack>TextTrack</a></code>,
- <code><a href=#audiotrack>AudioTrack</a></code>, or <code><a href=#videotrack>VideoTrack</a></code>) to which the
- event relates.</p>
+ <p>Returns the track object (<code><a href=#texttrack>TextTrack</a></code>, <code><a href=#audiotrack>AudioTrack</a></code>, or
+ <code><a href=#videotrack>VideoTrack</a></code>) to which the event relates.</p>
</dd>
@@ -32484,6 +32514,24 @@
<tr><td><dfn id=event-mediacontroller-volumechange title=event-MediaController-volumechange><code>volumechange</code></dfn>
<td><code><a href=#event>Event</a></code>
<td>Either the <code title=dom-MediaController-volume><a href=#dom-mediacontroller-volume>volume</a></code> attribute or the <code title=dom-MediaController-muted><a href=#dom-mediacontroller-muted>muted</a></code> attribute has just been updated.
+ </table><p>The following events fire on <code><a href=#audiotracklist>AudioTrackList</a></code>, <code><a href=#videotracklist>VideoTrackList</a></code>, and <code><a href=#texttracklist>TextTrackList</a></code> objects:</p>
+
+ <table><thead><tr><th>Event name
+ <th>Interface
+ <th>Fired when...
+
+ <tbody><tr><td><dfn id=event-media-change title=event-media-change><code>change</code></dfn>
+ <td><code><a href=#event>Event</a></code>
+ <td>One or more tracks in the track list has been enabled or disabled.
+
+ <tr><td><dfn id=event-media-addtrack title=event-media-addtrack><code>addtrack</code></dfn>
+ <td><code><a href=#trackevent>TrackEvent</a></code>
+ <td>A track has been added to the track list.
+
+ <tr><td><dfn id=event-media-removetrack title=event-media-removetrack><code>removetrack</code></dfn>
+ <td><code><a href=#trackevent>TrackEvent</a></code>
+ <td>A track has been removed from the track list.
+
</table><!--ADD-TOPIC:Security--><div class=impl>
<h5 id=security-and-privacy-considerations><span class=secno>4.8.10.17 </span>Security and privacy considerations</h5>
@@ -101848,6 +101896,7 @@
Alex Bishop,
Alex Nicolaou,
Alex Rousskov,
+ Alexander Farkas,
Alexander J. Vincent,
Alexandre Morgaut,
Alexey Feldgendler,
Modified: index
===================================================================
--- index 2013-06-12 22:31:23 UTC (rev 7967)
+++ index 2013-06-12 22:54:56 UTC (rev 7968)
@@ -27788,7 +27788,7 @@
<li><p>Update the <a href=#media-element>media element</a>'s <code title=dom-media-audioTracks><a href=#dom-media-audiotracks>audioTracks</a></code> attribute's <code><a href=#audiotracklist>AudioTrackList</a></code>
object with the new <code><a href=#audiotrack>AudioTrack</a></code> object.</li>
- <li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-addtrack>addtrack</code>, that does not bubble and is not cancelable, and that
+ <li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-media-addtrack><a href=#event-media-addtrack>addtrack</a></code>, that does not bubble and is not cancelable, and that
uses the <code><a href=#trackevent>TrackEvent</a></code> interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code> attribute initialized to the new
<code><a href=#audiotrack>AudioTrack</a></code> object, at this <code><a href=#audiotracklist>AudioTrackList</a></code> object.</li>
@@ -27805,7 +27805,7 @@
<li><p>Update the <a href=#media-element>media element</a>'s <code title=dom-media-videoTracks><a href=#dom-media-videotracks>videoTracks</a></code> attribute's <code><a href=#videotracklist>VideoTrackList</a></code>
object with the new <code><a href=#videotrack>VideoTrack</a></code> object.</li>
- <li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-addtrack>addtrack</code>, that does not bubble and is not cancelable, and that
+ <li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-media-addtrack><a href=#event-media-addtrack>addtrack</a></code>, that does not bubble and is not cancelable, and that
uses the <code><a href=#trackevent>TrackEvent</a></code> interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code> attribute initialized to the new
<code><a href=#videotrack>VideoTrack</a></code> object, at this <code><a href=#videotracklist>VideoTrackList</a></code> object.</li>
@@ -28112,7 +28112,7 @@
tracks</a> all the <a href=#media-resource-specific-text-track title="media-resource-specific text track">media-resource-specific
text tracks</a>, then empty the <a href=#media-element>media element</a>'s <code title=dom-media-audioTracks><a href=#dom-media-audiotracks>audioTracks</a></code> attribute's <code><a href=#audiotracklist>AudioTrackList</a></code> object,
then empty the <a href=#media-element>media element</a>'s <code title=dom-media-videoTracks><a href=#dom-media-videotracks>videoTracks</a></code>
- attribute's <code><a href=#videotracklist>VideoTrackList</a></code> object. No events (in particular, no <code title=event-removetrack>removetrack</code> events) are fired as part of this; the <code title=event-media-error><a href=#event-media-error>error</a></code> and <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code>
+ attribute's <code><a href=#videotracklist>VideoTrackList</a></code> object. No events (in particular, no <code title=event-media-removetrack><a href=#event-media-removetrack>removetrack</a></code> events) are fired as part of this; the <code title=event-media-error><a href=#event-media-error>error</a></code> and <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code>
events, fired by the algorithms that invoke this one, can be used instead.</p>
</div>
@@ -28387,7 +28387,7 @@
are <em>before</em> the <a href=#earliest-possible-position>earliest possible position</a>, the user agent may <a href=#queue-a-task>queue a
task</a> to first remove the track from the <code title=dom-media-audioTracks><a href=#dom-media-audiotracks>audioTracks</a></code>
attribute's <code><a href=#audiotracklist>AudioTrackList</a></code> object or the <code title=dom-media-videoTracks><a href=#dom-media-videotracks>videoTracks</a></code> attribute's <code><a href=#videotracklist>VideoTrackList</a></code> object as
- appropriate and then <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-removetrack>removetrack</code>, that does not bubble and is not cancelable, and that
+ appropriate and then <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-media-removetrack><a href=#event-media-removetrack>removetrack</a></code>, that does not bubble and is not cancelable, and that
uses the <code><a href=#trackevent>TrackEvent</a></code> interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code> attribute initialized to the <code><a href=#audiotrack>AudioTrack</a></code> or
<code><a href=#videotrack>VideoTrack</a></code> object representing the track, at the <a href=#media-element>media element</a>'s
aforementioned <code><a href=#audiotracklist>AudioTrackList</a></code> or <code><a href=#videotracklist>VideoTrackList</a></code> object.</p>
@@ -29740,7 +29740,7 @@
effect beyond changing the value of the attribute on the <code><a href=#audiotrack>AudioTrack</a></code> object.)</p>
<p>Whenever an audio track in an <code><a href=#audiotracklist>AudioTrackList</a></code> is enabled or disabled, the user
- agent must <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-change>change</code> at the <code><a href=#audiotracklist>AudioTrackList</a></code> object.</p>
+ agent must <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-change><a href=#event-media-change>change</a></code> at the <code><a href=#audiotracklist>AudioTrackList</a></code> object.</p>
<p>The <dfn id=dom-videotracklist-selectedindex title=dom-VideoTrackList-selectedIndex><code>VideoTrackList.selectedIndex</code></dfn> attribute
must return the index of the currently selected track, if any. If the <code><a href=#videotracklist>VideoTrackList</a></code>
@@ -29756,7 +29756,7 @@
<code><a href=#videotrack>VideoTrack</a></code> object.)</p>
<p>Whenever a track in a <code><a href=#videotracklist>VideoTrackList</a></code> that was previously not selected is selected,
- the user agent must <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-change>change</code> at the <code><a href=#videotracklist>VideoTrackList</a></code> object.</p>
+ the user agent must <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-change><a href=#event-media-change>change</a></code> at the <code><a href=#videotracklist>VideoTrackList</a></code> object.</p>
<hr><p>The following are the <a href=#event-handlers>event handlers</a> (and their corresponding <a href=#event-handler-event-type title="event
handler event type">event handler event types</a>) that must be supported, as IDL attributes,
@@ -29764,9 +29764,9 @@
interfaces:</p>
<table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
- <tbody><tr><td><dfn id=handler-tracklist-onchange title=handler-TrackList-onchange><code>onchange</code></dfn> <td> <code title=event-change>change</code>
- <tr><td><dfn id=handler-tracklist-onaddtrack title=handler-TrackList-onaddtrack><code>onaddtrack</code></dfn> <td> <code title=event-addtrack>addtrack</code>
- <tr><td><dfn id=handler-tracklist-onremovetrack title=handler-TrackList-onremovetrack><code>onremovetrack</code></dfn> <td> <code title=event-removetrack>removetrack</code>
+ <tbody><tr><td><dfn id=handler-tracklist-onchange title=handler-TrackList-onchange><code>onchange</code></dfn> <td> <code title=event-media-change><a href=#event-media-change>change</a></code>
+ <tr><td><dfn id=handler-tracklist-onaddtrack title=handler-TrackList-onaddtrack><code>onaddtrack</code></dfn> <td> <code title=event-media-addtrack><a href=#event-media-addtrack>addtrack</a></code>
+ <tr><td><dfn id=handler-tracklist-onremovetrack title=handler-TrackList-onremovetrack><code>onremovetrack</code></dfn> <td> <code title=event-media-removetrack><a href=#event-media-removetrack>removetrack</a></code>
</table><hr><p>The <a href=#task-source>task source</a> for the <a href=#concept-task title=concept-task>tasks</a> listed in this
section is the <a href=#dom-manipulation-task-source>DOM manipulation task source</a>.</p>
@@ -30821,6 +30821,35 @@
<p>The <a href=#text-track title="text track">text tracks</a> of a <a href=#media-element>media element</a> are <dfn id=the-text-tracks-are-ready title="the text tracks are ready">ready</dfn> when both the element's <a href=#list-of-pending-text-tracks>list of pending text
tracks</a> is empty and the element's <a href=#blocked-on-parser>blocked-on-parser</a> flag is false.</p>
+ <p>Each <a href=#media-element>media element</a> has a <dfn id=pending-text-track-change-notification-flag>pending text track change notification flag</dfn>,
+ which must initially be unset.</p>
+
+ <p>Whenever a <a href=#text-track>text track</a> that is in a <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text
+ tracks</a> has its <a href=#text-track-mode>text track mode</a> change value, the user agent must run the
+ following steps for the <a href=#media-element>media element</a>:</p>
+
+ <ol><li><p>If the <a href=#media-element>media element</a>'s <a href=#pending-text-track-change-notification-flag>pending text track change notification
+ flag</a> is set, abort these steps.</li>
+
+ <li><p>Set the <a href=#media-element>media element</a>'s <a href=#pending-text-track-change-notification-flag>pending text track change notification
+ flag</a>.</li>
+
+ <li>
+
+ <p><a href=#queue-a-task>Queue a task</a> that runs the following substeps:</p>
+
+ <ol><li><p>Unset the <a href=#media-element>media element</a>'s <a href=#pending-text-track-change-notification-flag>pending text track change notification
+ flag</a>.</li>
+
+ <li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-media-change><a href=#event-media-change>change</a></code> at
+ the <a href=#media-element>media element</a>'s <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code>
+ attribute's <code><a href=#texttracklist>TextTrackList</a></code> object.</li>
+
+ </ol></li>
+
+ </ol><p>The <a href=#task-source>task source</a> for the <a href=#concept-task title=concept-task>tasks</a> listed in this
+ section is the <a href=#dom-manipulation-task-source>DOM manipulation task source</a>.</p>
+
<hr><p>A <dfn id=text-track-cue>text track cue</dfn> is the unit of time-sensitive data in a <a href=#text-track>text track</a>,
corresponding for instance for subtitles and captions to the text that appears at a particular
time and disappears at another time.</p>
@@ -31022,7 +31051,7 @@
<li><p>Add the new <a href=#text-track>text track</a> to the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text
tracks</a>.</li>
- <li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-addtrack>addtrack</code>, that does not bubble and is not cancelable, and that uses
+ <li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-media-addtrack><a href=#event-media-addtrack>addtrack</a></code>, that does not bubble and is not cancelable, and that uses
the <code><a href=#trackevent>TrackEvent</a></code> interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code>
attribute initialized to the <a href=#text-track>text track</a>'s <code><a href=#texttrack>TextTrack</a></code> object, at the
<a href=#media-element>media element</a>'s <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code> attribute's
@@ -31083,7 +31112,7 @@
<p>When a <code><a href=#the-track-element>track</a></code> element's parent element changes and the new parent is a <a href=#media-element>media
element</a>, then the user agent must add the <code><a href=#the-track-element>track</a></code> element's corresponding
<a href=#text-track>text track</a> to the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>, and
- then <a href=#queue-a-task>queue a task</a> to <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-addtrack>addtrack</code>, that does not bubble and is not cancelable, and that uses
+ then <a href=#queue-a-task>queue a task</a> to <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-media-addtrack><a href=#event-media-addtrack>addtrack</a></code>, that does not bubble and is not cancelable, and that uses
the <code><a href=#trackevent>TrackEvent</a></code> interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code>
attribute initialized to the <a href=#text-track>text track</a>'s <code><a href=#texttrack>TextTrack</a></code> object, at the
<a href=#media-element>media element</a>'s <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code> attribute's
@@ -31092,7 +31121,7 @@
<p>When a <code><a href=#the-track-element>track</a></code> element's parent element changes and the old parent was a <a href=#media-element>media
element</a>, then the user agent must remove the <code><a href=#the-track-element>track</a></code> element's corresponding
<a href=#text-track>text track</a> from the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>,
- and then <a href=#queue-a-task>queue a task</a> to <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-removetrack>removetrack</code>, that does not bubble and is not cancelable, and that
+ and then <a href=#queue-a-task>queue a task</a> to <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-media-removetrack><a href=#event-media-removetrack>removetrack</a></code>, that does not bubble and is not cancelable, and that
uses the <code><a href=#trackevent>TrackEvent</a></code> interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code> attribute initialized to the <a href=#text-track>text track</a>'s
<code><a href=#texttrack>TextTrack</a></code> object, at the <a href=#media-element>media element</a>'s <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code> attribute's <code><a href=#texttracklist>TextTrackList</a></code> object.</p>
<!-- removetrack -->
@@ -31357,6 +31386,7 @@
getter <a href=#texttrack>TextTrack</a> (unsigned long index);
<a href=#texttrack>TextTrack</a>? <a href=#dom-texttracklist-gettrackbyid title=dom-TextTrackList-getTrackById>getTrackById</a>(DOMString id);
+ attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-texttracklist-onchange title=handler-TextTrackList-onchange>onchange</a>;
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-texttracklist-onaddtrack title=handler-TextTrackList-onaddtrack>onaddtrack</a>;
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-texttracklist-onremovetrack title=handler-TextTrackList-onremovetrack>onremovetrack</a>;
};</pre>
@@ -31566,7 +31596,7 @@
<li>
- <p><a href=#queue-a-task>Queue a task</a> to <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-addtrack>addtrack</code>, that does not bubble and is not cancelable, and that
+ <p><a href=#queue-a-task>Queue a task</a> to <a href=#concept-event-fire title=concept-event-fire>fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-media-addtrack><a href=#event-media-addtrack>addtrack</a></code>, that does not bubble and is not cancelable, and that
uses the <code><a href=#trackevent>TrackEvent</a></code> interface, with the <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code> attribute initialized to the new <a href=#text-track>text
track</a>'s <code><a href=#texttrack>TextTrack</a></code> object, at the <a href=#media-element>media element</a>'s <code title=dom-media-textTracks><a href=#dom-media-texttracks>textTracks</a></code> attribute's <code><a href=#texttracklist>TextTrackList</a></code>
object.</p>
@@ -32000,8 +32030,9 @@
attributes, by all objects implementing the <code><a href=#texttracklist>TextTrackList</a></code> interface:</p>
<table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
- <tbody><tr><td><dfn id=handler-texttracklist-onaddtrack title=handler-TextTrackList-onaddtrack><code>onaddtrack</code></dfn> <td> <code title=event-addtrack>addtrack</code>
- <tr><td><dfn id=handler-texttracklist-onremovetrack title=handler-TextTrackList-onremovetrack><code>onremovetrack</code></dfn> <td> <code title=event-removetrack>removetrack</code>
+ <tbody><tr><td><dfn id=handler-texttracklist-onchange title=handler-TextTrackList-onchange><code>onchange</code></dfn> <td> <code title=event-media-change><a href=#event-media-change>change</a></code>
+ <tr><td><dfn id=handler-texttracklist-onaddtrack title=handler-TextTrackList-onaddtrack><code>onaddtrack</code></dfn> <td> <code title=event-media-addtrack><a href=#event-media-addtrack>addtrack</a></code>
+ <tr><td><dfn id=handler-texttracklist-onremovetrack title=handler-TextTrackList-onremovetrack><code>onremovetrack</code></dfn> <td> <code title=event-media-removetrack><a href=#event-media-removetrack>removetrack</a></code>
</table><p>The following are the <a href=#event-handlers>event handlers</a> that (and their corresponding <a href=#event-handler-event-type title="event handler event type">event handler event types</a>) must be supported, as IDL
attributes, by all objects implementing the <code><a href=#texttrack>TextTrack</a></code> interface:</p>
@@ -32295,20 +32326,19 @@
<pre class=idl>[Constructor(DOMString type, optional <a href=#trackeventinit>TrackEventInit</a> eventInitDict)]
interface <dfn id=trackevent>TrackEvent</dfn> : <a href=#event>Event</a> {
- readonly attribute object? <a href=#dom-trackevent-track title=dom-TrackEvent-track>track</a>;
+ readonly attribute (<a href=#videotrack>VideoTrack</a> or <a href=#audiotrack>AudioTrack</a> or <a href=#texttrack>TextTrack</a>) <a href=#dom-trackevent-track title=dom-TrackEvent-track>track</a>;
};
dictionary <dfn id=trackeventinit>TrackEventInit</dfn> : <a href=#eventinit>EventInit</a> {
- object? track;
+ (<a href=#videotrack>VideoTrack</a> or <a href=#audiotrack>AudioTrack</a> or <a href=#texttrack>TextTrack</a>) track;
};</pre>
<dl class=domintro><dt><var title="">event</var> . <code title=dom-TrackEvent-track><a href=#dom-trackevent-track>track</a></code></dt>
<dd>
- <p>Returns the track object (<code><a href=#texttrack>TextTrack</a></code>,
- <code><a href=#audiotrack>AudioTrack</a></code>, or <code><a href=#videotrack>VideoTrack</a></code>) to which the
- event relates.</p>
+ <p>Returns the track object (<code><a href=#texttrack>TextTrack</a></code>, <code><a href=#audiotrack>AudioTrack</a></code>, or
+ <code><a href=#videotrack>VideoTrack</a></code>) to which the event relates.</p>
</dd>
@@ -32484,6 +32514,24 @@
<tr><td><dfn id=event-mediacontroller-volumechange title=event-MediaController-volumechange><code>volumechange</code></dfn>
<td><code><a href=#event>Event</a></code>
<td>Either the <code title=dom-MediaController-volume><a href=#dom-mediacontroller-volume>volume</a></code> attribute or the <code title=dom-MediaController-muted><a href=#dom-mediacontroller-muted>muted</a></code> attribute has just been updated.
+ </table><p>The following events fire on <code><a href=#audiotracklist>AudioTrackList</a></code>, <code><a href=#videotracklist>VideoTrackList</a></code>, and <code><a href=#texttracklist>TextTrackList</a></code> objects:</p>
+
+ <table><thead><tr><th>Event name
+ <th>Interface
+ <th>Fired when...
+
+ <tbody><tr><td><dfn id=event-media-change title=event-media-change><code>change</code></dfn>
+ <td><code><a href=#event>Event</a></code>
+ <td>One or more tracks in the track list has been enabled or disabled.
+
+ <tr><td><dfn id=event-media-addtrack title=event-media-addtrack><code>addtrack</code></dfn>
+ <td><code><a href=#trackevent>TrackEvent</a></code>
+ <td>A track has been added to the track list.
+
+ <tr><td><dfn id=event-media-removetrack title=event-media-removetrack><code>removetrack</code></dfn>
+ <td><code><a href=#trackevent>TrackEvent</a></code>
+ <td>A track has been removed from the track list.
+
</table><!--ADD-TOPIC:Security--><div class=impl>
<h5 id=security-and-privacy-considerations><span class=secno>4.8.10.17 </span>Security and privacy considerations</h5>
@@ -101848,6 +101896,7 @@
Alex Bishop,
Alex Nicolaou,
Alex Rousskov,
+ Alexander Farkas,
Alexander J. Vincent,
Alexandre Morgaut,
Alexey Feldgendler,
Modified: source
===================================================================
--- source 2013-06-12 22:31:23 UTC (rev 7967)
+++ source 2013-06-12 22:54:56 UTC (rev 7968)
@@ -29481,7 +29481,7 @@
<li><p><span title="concept-event-fire">Fire</span> a <span
title="concept-events-trusted">trusted</span> event with the name <code
- title="event-addtrack">addtrack</code>, that does not bubble and is not cancelable, and that
+ title="event-media-addtrack">addtrack</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 new
<code>AudioTrack</code> object, at this <code>AudioTrackList</code> object.</p></li>
@@ -29506,7 +29506,7 @@
<li><p><span title="concept-event-fire">Fire</span> a <span
title="concept-events-trusted">trusted</span> event with the name <code
- title="event-addtrack">addtrack</code>, that does not bubble and is not cancelable, and that
+ title="event-media-addtrack">addtrack</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 new
<code>VideoTrack</code> object, at this <code>VideoTrackList</code> object.</p></li>
@@ -29862,7 +29862,7 @@
title="dom-media-audioTracks">audioTracks</code> attribute's <code>AudioTrackList</code> object,
then empty the <span>media element</span>'s <code title="dom-media-videoTracks">videoTracks</code>
attribute's <code>VideoTrackList</code> object. No events (in particular, no <code
- title="event-removetrack">removetrack</code> events) are fired as part of this; the <code
+ title="event-media-removetrack">removetrack</code> events) are fired as part of this; the <code
title="event-media-error">error</code> and <code title="event-media-emptied">emptied</code>
events, fired by the algorithms that invoke this one, can be used instead.</p>
@@ -30181,7 +30181,7 @@
title="dom-media-videoTracks">videoTracks</code> attribute's <code>VideoTrackList</code> object as
appropriate and then <span title="concept-event-fire">fire</span> a <span
title="concept-events-trusted">trusted</span> event with the name <code
- title="event-removetrack">removetrack</code>, that does not bubble and is not cancelable, and that
+ title="event-media-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
@@ -31815,9 +31815,9 @@
<thead>
<tr><th><span title="event handlers">Event handler</span> <th><span>Event handler event type</span>
<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>
+ <tr><td><dfn title="handler-TrackList-onchange"><code>onchange</code></dfn> <td> <code title="event-media-change">change</code>
+ <tr><td><dfn title="handler-TrackList-onaddtrack"><code>onaddtrack</code></dfn> <td> <code title="event-media-addtrack">addtrack</code>
+ <tr><td><dfn title="handler-TrackList-onremovetrack"><code>onremovetrack</code></dfn> <td> <code title="event-media-removetrack">removetrack</code>
</table>
<hr>
@@ -33029,6 +33029,43 @@
title="the text tracks are ready">ready</dfn> when both the element's <span>list of pending text
tracks</span> is empty and the element's <span>blocked-on-parser</span> flag is false.</p>
+ <p>Each <span>media element</span> has a <dfn>pending text track change notification flag</dfn>,
+ which must initially be unset.</p>
+
+ <p>Whenever a <span>text track</span> that is in a <span>media element</span>'s <span>list of text
+ tracks</span> has its <span>text track mode</span> change value, the user agent must run the
+ following steps for the <span>media element</span>:</p>
+
+ <ol>
+
+ <li><p>If the <span>media element</span>'s <span>pending text track change notification
+ flag</span> is set, abort these steps.</p></li>
+
+ <li><p>Set the <span>media element</span>'s <span>pending text track change notification
+ flag</span>.</p></li>
+
+ <li>
+
+ <p><span>Queue a task</span> that runs the following substeps:</p>
+
+ <ol>
+
+ <li><p>Unset the <span>media element</span>'s <span>pending text track change notification
+ flag</span>.</p></li>
+
+ <li><p><span>Fire a simple event</span> named <code title="event-media-change">change</code> at
+ the <span>media element</span>'s <code title="dom-media-textTracks">textTracks</code>
+ attribute's <code>TextTrackList</code> object.</p></li>
+
+ </ol>
+
+ </li>
+
+ </ol>
+
+ <p>The <span>task source</span> for the <span title="concept-task">tasks</span> listed in this
+ section is the <span>DOM manipulation task source</span>.</p>
+
<hr>
<p>A <dfn>text track cue</dfn> is the unit of time-sensitive data in a <span>text track</span>,
@@ -33261,7 +33298,7 @@
<li><p><span title="concept-event-fire">Fire</span> a <span
title="concept-events-trusted">trusted</span> event with the name <code
- title="event-addtrack">addtrack</code>, that does not bubble and is not cancelable, and that uses
+ title="event-media-addtrack">addtrack</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
@@ -33343,7 +33380,7 @@
<span>text track</span> to the <span>media element</span>'s <span>list of text tracks</span>, and
then <span>queue a task</span> to <span title="concept-event-fire">fire</span> a <span
title="concept-events-trusted">trusted</span> event with the name <code
- title="event-addtrack">addtrack</code>, that does not bubble and is not cancelable, and that uses
+ title="event-media-addtrack">addtrack</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
@@ -33354,7 +33391,7 @@
<span>text track</span> from the <span>media element</span>'s <span>list of text tracks</span>,
and then <span>queue a task</span> to <span title="concept-event-fire">fire</span> a <span
title="concept-events-trusted">trusted</span> event with the name <code
- title="event-removetrack">removetrack</code>, that does not bubble and is not cancelable, and that
+ title="event-media-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
@@ -33681,6 +33718,7 @@
getter <span>TextTrack</span> (unsigned long index);
<span>TextTrack</span>? <span title="dom-TextTrackList-getTrackById">getTrackById</span>(DOMString id);
+ attribute <span>EventHandler</span> <span title="handler-TextTrackList-onchange">onchange</span>;
attribute <span>EventHandler</span> <span title="handler-TextTrackList-onaddtrack">onaddtrack</span>;
attribute <span>EventHandler</span> <span title="handler-TextTrackList-onremovetrack">onremovetrack</span>;
};</pre>
@@ -33915,7 +33953,7 @@
<p><span>Queue a task</span> to <span title="concept-event-fire">fire</span> a <span
title="concept-events-trusted">trusted</span> event with the name <code
- title="event-addtrack">addtrack</code>, that does not bubble and is not cancelable, and that
+ title="event-media-addtrack">addtrack</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 new <span>text
track</span>'s <code>TextTrack</code> object, at the <span>media element</span>'s <code
@@ -34404,8 +34442,9 @@
<thead>
<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>
+ <tr><td><dfn title="handler-TextTrackList-onchange"><code>onchange</code></dfn> <td> <code title="event-media-change">change</code>
+ <tr><td><dfn title="handler-TextTrackList-onaddtrack"><code>onaddtrack</code></dfn> <td> <code title="event-media-addtrack">addtrack</code>
+ <tr><td><dfn title="handler-TextTrackList-onremovetrack"><code>onremovetrack</code></dfn> <td> <code title="event-media-removetrack">removetrack</code>
</table>
<p>The following are the <span>event handlers</span> that (and their corresponding <span
@@ -34744,11 +34783,11 @@
<pre class="idl">[Constructor(DOMString type, optional <span>TrackEventInit</span> eventInitDict)]
interface <dfn>TrackEvent</dfn> : <span>Event</span> {
- readonly attribute object? <span title="dom-TrackEvent-track">track</span>;
+ readonly attribute (<span>VideoTrack</span> or <span>AudioTrack</span> or <span>TextTrack</span>) <span title="dom-TrackEvent-track">track</span>;
};
dictionary <dfn>TrackEventInit</dfn> : <span>EventInit</span> {
- object? track;
+ (<span>VideoTrack</span> or <span>AudioTrack</span> or <span>TextTrack</span>) track;
};</pre>
<dl class="domintro">
@@ -34757,9 +34796,8 @@
<dd>
- <p>Returns the track object (<code>TextTrack</code>,
- <code>AudioTrack</code>, or <code>VideoTrack</code>) to which the
- event relates.</p>
+ <p>Returns the track object (<code>TextTrack</code>, <code>AudioTrack</code>, or
+ <code>VideoTrack</code>) to which the event relates.</p>
</dd>
@@ -34991,6 +35029,34 @@
</table>
+ <p>The following events fire on <code>AudioTrackList</code>, <code>VideoTrackList</code>, and <code>TextTrackList</code> objects:</p>
+
+ <table>
+ <thead>
+ <tr>
+ <th>Event name
+ <th>Interface
+ <th>Fired when...
+
+ <tbody>
+ <tr>
+ <td><dfn title="event-media-change"><code>change</code></dfn>
+ <td><code>Event</code>
+ <td>One or more tracks in the track list has been enabled or disabled.
+
+ <tr>
+ <td><dfn title="event-media-addtrack"><code>addtrack</code></dfn>
+ <td><code>TrackEvent</code>
+ <td>A track has been added to the track list.
+
+ <tr>
+ <td><dfn title="event-media-removetrack"><code>removetrack</code></dfn>
+ <td><code>TrackEvent</code>
+ <td>A track has been removed from the track list.
+
+ </table>
+
+
<!--ADD-TOPIC:Security-->
<div class="impl">
@@ -114175,6 +114241,7 @@
Alex Bishop,
Alex Nicolaou,
Alex Rousskov,
+ Alexander Farkas,
Alexander J. Vincent,
Alexandre Morgaut,
Alexey Feldgendler,
More information about the Commit-Watchers
mailing list