Replace setTrackInfo() and getSourceBuffer() with AudioTrack, VideoTrack, and TextTrack extensions.
authorAaron Colwell <acolwell@chromium.org>
Tue, 15 Jan 2013 14:19:50 -0800
changeset 77fd2a58eec443
parent 76 c1c9cc8ea659
child 78 5086772fe724
Replace setTrackInfo() and getSourceBuffer() with AudioTrack, VideoTrack, and TextTrack extensions.
media-source/media-source-respec.html
media-source/media-source.html
media-source/media-source.js
     1.1 --- a/media-source/media-source-respec.html	Fri Jan 04 00:00:00 2013 -0800
     1.2 +++ b/media-source/media-source-respec.html	Tue Jan 15 14:19:50 2013 -0800
     1.3 @@ -316,43 +316,16 @@
     1.4            <ol class="method-algorithm">
     1.5              <li>If <var>sourceBuffer</var> is null then throw an <a def-id="invalid-access-err"></a> exception and abort these steps.</li>
     1.6              <li>If <var>sourceBuffer</var> specifies an object that is not in <a def-id="sourceBuffers"></a> then throw a <a def-id="not-found-err"></a> exception and abort these steps.</li>
     1.7 -            <li>Remove track information from <a def-id="audiotracks"></a>, <a def-id="videotracks"></a>, and <a def-id="texttracks"></a> for all tracks associated with <var>sourceBuffer</var> and <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="videoref" name="handler-tracklist-onchange">change</a> at the modified lists.</li>
     1.8 +            <li>Set the the sourceBuffer attribute in all tracks in <var>sourceBuffer</var>.<a def-id="sourcebuffer-audioTracks"></a>, <var>sourceBuffer</var>.<a def-id="sourcebuffer-videoTracks"></a>, and <var>sourceBuffer</var>.<a def-id="sourcebuffer-textTracks"></a> to null.</li>
     1.9 +            <li>Remove all the tracks in <var>sourceBuffer</var>.<a def-id="sourcebuffer-audioTracks"></a>, <var>sourceBuffer</var>.<a def-id="sourcebuffer-videoTracks"></a>, and <var>sourceBuffer</var>.<a def-id="sourcebuffer-textTracks"></a> from the respective <a def-id="audiotracks"></a>, <a def-id="videotracks"></a>, and <a def-id="texttracks"></a> attributes on the HTMLMediaElement.</li>
    1.10 +            <li>Remove all the tracks in <var>sourceBuffer</var>.<a def-id="sourcebuffer-audioTracks"></a>, <var>sourceBuffer</var>.<a def-id="sourcebuffer-videoTracks"></a>, and <var>sourceBuffer</var>.<a def-id="sourcebuffer-textTracks"></a> and <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at the modified lists.</li>
    1.11 +            <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at the HTMLMediaElement track lists that were modified.</li>
    1.12              <li>If <var>sourceBuffer</var> is in <a def-id="activeSourceBuffers"></a>, then remove it from <a def-id="activeSourceBuffers"></a> and <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="removesourcebuffer"></a> at <a def-id="activeSourceBuffers"></a>.</li>
    1.13              <li>Remove <var>sourceBuffer</var> from <a def-id="sourceBuffers"></a> and <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="removesourcebuffer"></a> at <a def-id="sourceBuffers"></a>.</li>
    1.14              <li>Destroy all resources for <var>sourceBuffer</var>.</li>
    1.15            </ol>
    1.16          </dd>
    1.17  
    1.18 -        <dt>SourceBuffer? getSourceBuffer(VideoTrack videoTrack)</dt>
    1.19 -        <dd>
    1.20 -          <p>Gets the <a>SourceBuffer</a> object that created a specific <a def-id="video-track"></a>.</p>
    1.21 -
    1.22 -          <ol class="method-algorithm">
    1.23 -            <li>If <var>videoTrack</var> was not created by any <a>SourceBuffer</a> object in <a def-id="sourceBuffers"></a> then return null.</li>
    1.24 -            <li>Return the <a>SourceBuffer</a> object in <a def-id="sourceBuffers"></a> that created <var>videoTrack</var>.
    1.25 -          </ol>
    1.26 -        </dd>
    1.27 -
    1.28 -        <dt>SourceBuffer? getSourceBuffer(AudioTrack audioTrack)</dt>
    1.29 -        <dd>
    1.30 -          <p>Gets the <a>SourceBuffer</a> object that created a specific <a def-id="audio-track"></a>.</p>
    1.31 -
    1.32 -          <ol class="method-algorithm">
    1.33 -            <li>If <var>audioTrack</var> was not created by any <a>SourceBuffer</a> object in <a def-id="sourceBuffers"></a> then return null.</li>
    1.34 -            <li>Return the <a>SourceBuffer</a> object in <a def-id="sourceBuffers"></a> that created <var>audioTrack</var>.
    1.35 -          </ol>
    1.36 -        </dd>
    1.37 -
    1.38 -        <dt>SourceBuffer? getSourceBuffer(TextTrack textTrack)</dt>
    1.39 -        <dd>
    1.40 -          <p>Gets the <a>SourceBuffer</a> object that created a specific <a def-id="text-track"></a>.</p>
    1.41 -
    1.42 -          <ol class="method-algorithm">
    1.43 -            <li>If <var>textTrack</var> was not created by any <a>SourceBuffer</a> object in <a def-id="sourceBuffers"></a> then return null.</li>
    1.44 -            <li>Return the <a>SourceBuffer</a> object in <a def-id="sourceBuffers"></a> that created <var>textTrack</var>.
    1.45 -          </ol>
    1.46 -        </dd>
    1.47 -
    1.48          <dt>void endOfStream(optional EndOfStreamError error)</dt>
    1.49          <dd>
    1.50            <p>Signals the end of the stream.</p>
    1.51 @@ -403,22 +376,6 @@
    1.52            </ol>
    1.53          </dd>
    1.54  
    1.55 -        <dt>void setTrackInfo(VideoTrack track, DOMString kind, DOMString language)</dt>
    1.56 -        <dd>
    1.57 -            <p>Set the <a def-id="videotrack-kind"></a> and <a def-id="videotrack-language"></a> of the <a def-id="video-track"></a> <var>track</var>.</p>
    1.58 -            <p class="note">This method would be unnecessary if the <a def-id="videotrack-kind"></a> and <a def-id="videotrack-language"></a> attributes of <a def-id="video-track"></a> were not read-only.</p>
    1.59 -        </dd>
    1.60 -        <dt>void setTrackInfo(AudioTrack track, DOMString kind, DOMString language)</dt>
    1.61 -        <dd>
    1.62 -            <p>Set the <a def-id="audiotrack-kind"></a> and <a def-id="audiotrack-language"></a> of the <a def-id="audio-track"></a> <var>track</var>.</p>
    1.63 -            <p class="note">This method would be unnecessary if the <a def-id="audiotrack-kind"></a> and <a def-id="audiotrack-language"></a> attributes of <a def-id="audio-track"></a> were not read-only.</p>
    1.64 -        </dd>
    1.65 -        <dt>void setTrackInfo(TextTrack track, DOMString kind, DOMString language)</dt>
    1.66 -        <dd>
    1.67 -            <p>Set the <a def-id="texttrack-kind"></a> and <a def-id="texttrack-language"></a> of the <a def-id="text-track"></a> <var>track</var>.</p>
    1.68 -            <p class="note">This method would be unnecessary if the <a def-id="texttrack-kind"></a> and <a def-id="texttrack-language"></a> attributes of <a def-id="text-track"></a> were not read-only.</p>
    1.69 -        </dd>
    1.70 -
    1.71          <dt>static bool isTypeSupported(DOMString type)</dt>
    1.72          <dd>
    1.73            <p>Check to see whether the <a>MediaSource</a> is capable of creating <a>SourceBuffer</a> objects for the the specified MIME type.</p>
    1.74 @@ -705,6 +662,21 @@
    1.75            <p class="issue"><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=19676">Bug 19676</a> - timestampOffset accuracy</p>
    1.76          </dd>
    1.77  
    1.78 +        <dt>readonly attribute AudioTrackList audioTracks</dt>
    1.79 +        <dd>
    1.80 +          The list of <a def-id="audio-track"></a> objects created by this object.
    1.81 +        </dd>
    1.82 +
    1.83 +        <dt>readonly attribute VideoTrackList videoTracks</dt>
    1.84 +        <dd>
    1.85 +          The list of <a def-id="video-track"></a> objects created by this object.
    1.86 +        </dd>
    1.87 +
    1.88 +        <dt>readonly attribute TextTrackList textTracks</dt>
    1.89 +        <dd>
    1.90 +          The list of <a def-id="text-track"></a> objects created by this object.
    1.91 +        </dd>
    1.92 +
    1.93          <dt>void appendArrayBuffer(ArrayBuffer data)</dt>
    1.94          <dd>
    1.95            <p>Appends the segment data in an ArrayBuffer to the source buffer.</p>
    1.96 @@ -1053,7 +1025,8 @@
    1.97                          <li>Set <var>active track flag</var> to true.</li>
    1.98                        </ol>
    1.99                      </li>
   1.100 -                    <li>Add <var>new audio track</var> to <a def-id="audiotracks"></a>.</li>
   1.101 +                    <li>Add <var>new audio track</var> to the <a def-id="sourcebuffer-audioTracks"></a> attribute on this <a>SourceBuffer</a> object.</li>
   1.102 +                    <li>Add <var>new audio track</var> to the <a def-id="audiotracks"></a> attribute on the HTMLMediaElement.</li>
   1.103                      <li>Create a new <a def-id="track-buffer"></a> to store <a def-id="coded-frames"></a> for this track.</li>
   1.104                      <li>Add the <a def-id="track-description"></a> for this track to the <a def-id="track-buffer"></a>.</li>
   1.105                    </ol>
   1.106 @@ -1073,7 +1046,8 @@
   1.107                          <li>Set <var>active track flag</var> to true.</li>
   1.108                        </ol>
   1.109                      </li>
   1.110 -                    <li>Add <var>new video track</var> to <a def-id="videotracks"></a>.</li>
   1.111 +                    <li>Add <var>new video track</var> to the <a def-id="sourcebuffer-videoTracks"></a> attribute on this <a>SourceBuffer</a> object.</li>
   1.112 +                    <li>Add <var>new video track</var> to the <a def-id="videotracks"></a> attribute on the HTMLMediaElement.</li>
   1.113                      <li>Create a new <a def-id="track-buffer"></a> to store <a def-id="coded-frames"></a> for this track.</li>
   1.114                      <li>Add the <a def-id="track-description"></a> for this track to the <a def-id="track-buffer"></a>.</li>
   1.115                    </ol>
   1.116 @@ -1088,7 +1062,8 @@
   1.117                        If the <a def-id="texttrack-mode"></a> property on <var>new text track</var> equals <a def-id="texttrack-showing"></a> or
   1.118                        <a def-id="texttrack-hidden"></a>, then set <var>active track flag</var> to true.
   1.119                      </li>
   1.120 -                    <li>Add <var>new text track</var> to <a def-id="texttracks"></a>.</li>
   1.121 +                    <li>Add <var>new text track</var> to the <a def-id="sourcebuffer-textTracks"></a> attribute on this <a>SourceBuffer</a> object.</li>
   1.122 +                    <li>Add <var>new text track</var> to the <a def-id="texttracks"></a> attribute on the HTMLMediaElement.</li>
   1.123                      <li>Create a new <a def-id="track-buffer"></a> to store <a def-id="coded-frames"></a> for this track.</li>
   1.124                      <li>Add the <a def-id="track-description"></a> for this track to the <a def-id="track-buffer"></a>.</li>
   1.125                    </ol>
   1.126 @@ -1270,7 +1245,156 @@
   1.127          <li>Return the <var>intersection range</var>.</li>
   1.128        </ol>
   1.129      </section>
   1.130 -    
   1.131 +
   1.132 +    <section id="audio-track-extensions">
   1.133 +      <h2>AudioTrack Extensions</h2>
   1.134 +      <p>This section specifies extensions to the HTML <a def-id="audio-track"></a> definition.</p>
   1.135 +
   1.136 +      <dl title="partial interface AudioTrack" class="idl">
   1.137 +        <dt>attribute DOMString kind</dt>
   1.138 +        <dd>
   1.139 +          <p>Allows the web application to get and update the track <a def-id="audiotrack-kind"></a>.</p>
   1.140 +          <p>On getting, return the current value of the attribute. This is either the value provided when this object was created or the value provided on
   1.141 +            the last successful set operation.<p>
   1.142 +          <p>On setting, run the following steps:</p>
   1.143 +          <ol>
   1.144 +            <li>If the value being assigned to this attribute does not match one of the <a def-id="videoref" name="dom-TrackList-getKind-categories">kind categories</a>, then abort these steps.</li>
   1.145 +            <li>Update this attribute to the new value.</li>
   1.146 +            <li>If the <a def-id="audiotrack-sourceBuffer"></a> attribute on this track is not null, then
   1.147 +              <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at
   1.148 +              <a def-id="audiotrack-sourceBuffer"></a>.<a def-id="sourcebuffer-audioTracks"></a>.
   1.149 +            </li>
   1.150 +            <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at the <a def-id="audiotracks"></a> attribute on the
   1.151 +              HTMLMediaElement.
   1.152 +            </li>
   1.153 +          </ol>
   1.154 +        </dd>
   1.155 +
   1.156 +        <dt>attribute DOMString language</dt>
   1.157 +        <dd>
   1.158 +          <p>Allows the web application to get and update the track <a def-id="audiotrack-language"></a>.</p>
   1.159 +          <p>On getting, return the current value of the attribute. This is either the value provided when this object was created or the value provided on
   1.160 +            the last successful set operation.<p>
   1.161 +          <p>On setting, run the following steps:</p>
   1.162 +          <ol>
   1.163 +            <li>If the value being assigned to this attribute is not an empty string or a BCP 47 language tag[[BCP47]], then abort these steps.</li>
   1.164 +            <li>Update this attribute to the new value.</li>
   1.165 +            <li>If the <a def-id="audiotrack-sourceBuffer"></a> attribute on this track is not null, then
   1.166 +              <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at
   1.167 +              <a def-id="audiotrack-sourceBuffer"></a>.<a def-id="sourcebuffer-audioTracks"></a>.
   1.168 +            </li>
   1.169 +            <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at the <a def-id="audiotracks"></a> attribute on the
   1.170 +              HTMLMediaElement.
   1.171 +            </li>
   1.172 +          </ol>
   1.173 +        </dd>
   1.174 +
   1.175 +        <dt>readonly attribute SourceBuffer? sourceBuffer</dt>
   1.176 +        <dd>
   1.177 +          <p>Returns the <a>SourceBuffer</a> that created this track. Returns null if this track was not created by a <a>SourceBuffer</a> or the <a>SourceBuffer</a> has been removed from the <a def-id="sourceBuffers"></a> attribute of its <a def-id="parent-media-source"></a>.</p>
   1.178 +        </dd>
   1.179 +      </dl>
   1.180 +    </section>
   1.181 +
   1.182 +    <section id="video-track-extensions">
   1.183 +      <h2>VideoTrack Extensions</h2>
   1.184 +      <p>This section specifies extensions to the HTML <a def-id="video-track"></a> definition.</p>
   1.185 +
   1.186 +      <dl title="partial interface VideoTrack" class="idl">
   1.187 +        <dt>attribute DOMString kind</dt>
   1.188 +        <dd>
   1.189 +          <p>Allows the web application to get and update the track <a def-id="videotrack-kind"></a>.</p>
   1.190 +          <p>On getting, return the current value of the attribute. This is either the value provided when this object was created or the value provided on
   1.191 +            the last successful set operation.<p>
   1.192 +          <p>On setting, run the following steps:</p>
   1.193 +          <ol>
   1.194 +            <li>If the value being assigned to this attribute does not match one of the <a def-id="videoref" name="dom-TrackList-getKind-categories">kind categories</a>, then abort these steps.</li>
   1.195 +            <li>Update this attribute to the new value.</li>
   1.196 +            <li>If the <a def-id="videotrack-sourceBuffer"></a> attribute on this track is not null, then
   1.197 +              <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at
   1.198 +              <a def-id="videotrack-sourceBuffer"></a>.<a def-id="sourcebuffer-videoTracks"></a>.
   1.199 +            </li>
   1.200 +            <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at the <a def-id="videotracks"></a> attribute on the
   1.201 +              HTMLMediaElement.
   1.202 +            </li>
   1.203 +          </ol>
   1.204 +        </dd>
   1.205 +
   1.206 +        <dt>attribute DOMString language</dt>
   1.207 +        <dd>
   1.208 +          <p>Allows the web application to get and update the track <a def-id="videotrack-language"></a>.</p>
   1.209 +          <p>On getting, return the current value of the attribute. This is either the value provided when this object was created or the value provided on
   1.210 +            the last successful set operation.<p>
   1.211 +          <p>On setting, run the following steps:</p>
   1.212 +          <ol>
   1.213 +            <li>If the value being assigned to this attribute is not an empty string or a BCP 47 language tag[[BCP47]], then abort these steps.</li>
   1.214 +            <li>Update this attribute to the new value.</li>
   1.215 +            <li>If the <a def-id="videotrack-sourceBuffer"></a> attribute on this track is not null, then
   1.216 +              <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at
   1.217 +              <a def-id="videotrack-sourceBuffer"></a>.<a def-id="sourcebuffer-videoTracks"></a>.
   1.218 +            </li>
   1.219 +            <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at the <a def-id="videotracks"></a> attribute on the
   1.220 +              HTMLMediaElement.
   1.221 +            </li>
   1.222 +          </ol>
   1.223 +        </dd>
   1.224 +
   1.225 +        <dt>readonly attribute SourceBuffer? sourceBuffer</dt>
   1.226 +        <dd>
   1.227 +          <p>Returns the <a>SourceBuffer</a> that created this track. Returns null if this track was not created by a <a>SourceBuffer</a> or the <a>SourceBuffer</a> has been removed from the <a def-id="sourceBuffers"></a> attribute of its <a def-id="parent-media-source"></a>.</p>
   1.228 +        </dd>
   1.229 +    </section>
   1.230 +
   1.231 +    <section id="text-track-extensions">
   1.232 +      <h2>TextTrack Extensions</h2>
   1.233 +      <p>This section specifies extensions to the HTML <a def-id="text-track"></a> definition.</p>
   1.234 +
   1.235 +      <dl title="partial interface TextTrack" class="idl">
   1.236 +        <dt>attribute DOMString kind</dt>
   1.237 +        <dd>
   1.238 +          <p>Allows the web application to get and update the track <a def-id="texttrack-kind"></a>.</p>
   1.239 +          <p>On getting, return the current value of the attribute. This is either the value provided when this object was created or the value provided on
   1.240 +            the last successful set operation.<p>
   1.241 +          <p>On setting, run the following steps:</p>
   1.242 +          <ol>
   1.243 +            <li>If the value being assigned to this attribute does not match one of the <a def-id="videoref" name="text-track-kind">text track kinds</a>, then abort these steps.</li>
   1.244 +            <li>Update this attribute to the new value.</li>
   1.245 +            <li>If the <a def-id="texttrack-sourceBuffer"></a> attribute on this track is not null, then
   1.246 +              <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at
   1.247 +              <a def-id="texttrack-sourceBuffer"></a>.<a def-id="sourcebuffer-textTracks"></a>.
   1.248 +            </li>
   1.249 +            <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at the <a def-id="texttracks"></a> attribute on the
   1.250 +              HTMLMediaElement.
   1.251 +            </li>
   1.252 +          </ol>
   1.253 +        </dd>
   1.254 +
   1.255 +        <dt>attribute DOMString language</dt>
   1.256 +        <dd>
   1.257 +          <p>Allows the web application to get and update the track <a def-id="texttrack-language"></a>.</p>
   1.258 +          <p>On getting, return the current value of the attribute. This is either the value provided when this object was created or the value provided on
   1.259 +            the last successful set operation.<p>
   1.260 +          <p>On setting, run the following steps:</p>
   1.261 +          <ol>
   1.262 +            <li>If the value being assigned to this attribute is not an valid <a def-id="videoref" name="text-track-language">text track language</a>, 
   1.263 +              then abort these steps.</li>
   1.264 +            <li>Update this attribute to the new value.</li>
   1.265 +            <li>If the <a def-id="texttrack-sourceBuffer"></a> attribute on this track is not null, then
   1.266 +              <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at
   1.267 +              <a def-id="texttrack-sourceBuffer"></a>.<a def-id="sourcebuffer-textTracks"></a>.
   1.268 +            </li>
   1.269 +            <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at the <a def-id="texttracks"></a> attribute on the
   1.270 +              HTMLMediaElement.
   1.271 +            </li>
   1.272 +          </ol>
   1.273 +        </dd>
   1.274 +
   1.275 +        <dt>readonly attribute SourceBuffer? sourceBuffer</dt>
   1.276 +        <dd>
   1.277 +          <p>Returns the <a>SourceBuffer</a> that created this track. Returns null if this track was not created by a <a>SourceBuffer</a> or the <a>SourceBuffer</a> has been removed from the <a def-id="sourceBuffers"></a> attribute of its <a def-id="parent-media-source"></a>.</p>
   1.278 +        </dd>
   1.279 +    </section>
   1.280 +
   1.281      <section id="byte-stream-formats">
   1.282        <h2>Byte Stream Formats</h2>
   1.283        <p>The bytes provided through <a def-id="appendArrayBuffer"></a> and <a def-id="appendStream"></a> for a <a>SourceBuffer</a> form a logical byte stream. The format of this byte stream depends on the media container format in use and is defined in a byte stream format specification. Byte stream format specifications based on WebM , the ISO Base Media File Format, and MPEG-2 Transport Streams are provided below. These format specifications are intended to be the authoritative source for how data from these containers is formatted and passed to a <a>SourceBuffer</a>. If a <a>MediaSource</a> implementation claims to support any of these container formats, then it must implement the corresponding byte stream format specification described below.</p>
   1.284 @@ -1571,6 +1695,10 @@
   1.285          </thead>
   1.286          <tbody>
   1.287            <tr>
   1.288 +	    <td>15 January 2013</td>
   1.289 +            <td>Replace setTrackInfo() and getSourceBuffer() with AudioTrack, VideoTrack, and TextTrack extensions.</td>
   1.290 +          </tr>
   1.291 +          <tr>
   1.292  	    <td><a href="http://dvcs.w3.org/hg/html-media/raw-file/52a85235137b/media-source/media-source.html">04 January 2013</a></td>
   1.293              <td>
   1.294                <ul>
     2.1 --- a/media-source/media-source.html	Fri Jan 04 00:00:00 2013 -0800
     2.2 +++ b/media-source/media-source.html	Tue Jan 15 14:19:50 2013 -0800
     2.3 @@ -397,7 +397,7 @@
     2.4    </p>
     2.5    <h1 class="title" id="title">Media Source Extensions</h1>
     2.6    
     2.7 -  <h2 id="w3c-editor-s-draft-04-january-2013"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft 04 January 2013</h2>
     2.8 +  <h2 id="w3c-editor-s-draft-15-january-2013"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft 15 January 2013</h2>
     2.9    <dl>
    2.10      
    2.11        <dt>This version:</dt>
    2.12 @@ -507,7 +507,7 @@
    2.13        
    2.14      
    2.15    
    2.16 -</section><section id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#goals" class="tocxref"><span class="secno">1.1 </span>Goals</a></li><li class="tocline"><a href="#definitions" class="tocxref"><span class="secno">1.2 </span>Definitions</a></li></ul></li><li class="tocline"><a href="#source-buffer-model" class="tocxref"><span class="secno">2. </span>Source Buffer Model</a><ul class="toc"><li class="tocline"><a href="#source-buffer-overlapping-segments" class="tocxref"><span class="secno">2.1 </span>Appending a Media Segment over a buffered region</a><ul class="toc"><li class="tocline"><a href="#source-buffer-overlap-complete" class="tocxref"><span class="secno">2.1.1 </span>Complete Overlap</a></li><li class="tocline"><a href="#source-buffer-overlap-start" class="tocxref"><span class="secno">2.1.2 </span>Start Overlap</a></li><li class="tocline"><a href="#source-buffer-overlap-end" class="tocxref"><span class="secno">2.1.3 </span>End Overlap</a></li><li class="tocline"><a href="#source-buffer-overlap-middle" class="tocxref"><span class="secno">2.1.4 </span>Middle Overlap</a></li></ul></li><li class="tocline"><a href="#track-buffer-to-decoder-buffer" class="tocxref"><span class="secno">2.2 </span>Track Buffer to Decoder Buffer transfer</a></li></ul></li><li class="tocline"><a href="#mediasource" class="tocxref"><span class="secno">3. </span>MediaSource Object</a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">3.1 </span>Attributes</a></li><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">3.2 </span>Methods</a></li><li class="tocline"><a href="#mediasource-events" class="tocxref"><span class="secno">3.3 </span>Event Summary</a></li><li class="tocline"><a href="#mediasource-algorithms" class="tocxref"><span class="secno">3.4 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#mediasource-attach" class="tocxref"><span class="secno">3.4.1 </span>Attaching to a media element</a></li><li class="tocline"><a href="#mediasource-detach" class="tocxref"><span class="secno">3.4.2 </span>Detaching from a media element</a></li><li class="tocline"><a href="#mediasource-seeking" class="tocxref"><span class="secno">3.4.3 </span>Seeking</a></li><li class="tocline"><a href="#buffer-monitoring" class="tocxref"><span class="secno">3.4.4 </span>SourceBuffer Monitoring</a></li><li class="tocline"><a href="#active-source-buffer-changes" class="tocxref"><span class="secno">3.4.5 </span>Changes to selected/enabled track state</a></li><li class="tocline"><a href="#duration-change-algorithm" class="tocxref"><span class="secno">3.4.6 </span>Duration change</a></li></ul></li></ul></li><li class="tocline"><a href="#sourcebuffer" class="tocxref"><span class="secno">4. </span>SourceBuffer Object</a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno">4.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">4.2 </span>Methods</a></li><li class="tocline"><a href="#track-buffers" class="tocxref"><span class="secno">4.3 </span>Track Buffers</a></li><li class="tocline"><a href="#sourcebuffer-events" class="tocxref"><span class="secno">4.4 </span>Event Summary</a></li><li class="tocline"><a href="#sourcebuffer-algorithms" class="tocxref"><span class="secno">4.5 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#sourcebuffer-segment-parser-loop" class="tocxref"><span class="secno">4.5.1 </span>Segment Parser Loop</a></li><li class="tocline"><a href="#sourcebuffer-reset-parser-state" class="tocxref"><span class="secno">4.5.2 </span>Reset Parser State</a></li><li class="tocline"><a href="#sourcebuffer-append-error" class="tocxref"><span class="secno">4.5.3 </span>Append Error</a></li><li class="tocline"><a href="#sourcebuffer-stream-append-loop" class="tocxref"><span class="secno">4.5.4 </span>Stream Append Loop</a></li><li class="tocline"><a href="#sourcebuffer-init-segment-received" class="tocxref"><span class="secno">4.5.5 </span>Initialization Segment Received</a></li><li class="tocline"><a href="#sourcebuffer-coded-frame-processing" class="tocxref"><span class="secno">4.5.6 </span>Coded Frame Processing</a></li></ul></li></ul></li><li class="tocline"><a href="#sourcebufferlist" class="tocxref"><span class="secno">5. </span>SourceBufferList Object</a><ul class="toc"><li class="tocline"><a href="#attributes-2" class="tocxref"><span class="secno">5.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">5.2 </span>Methods</a></li><li class="tocline"><a href="#sourcebufferlist-events" class="tocxref"><span class="secno">5.3 </span>Event Summary</a></li></ul></li><li class="tocline"><a href="#url" class="tocxref"><span class="secno">6. </span>URL Object</a><ul class="toc"><li class="tocline"><a href="#methods-3" class="tocxref"><span class="secno">6.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#htmlmediaelement-attributes" class="tocxref"><span class="secno">7. </span>HTMLMediaElement attributes</a></li><li class="tocline"><a href="#byte-stream-formats" class="tocxref"><span class="secno">8. </span>Byte Stream Formats</a><ul class="toc"><li class="tocline"><a href="#webm" class="tocxref"><span class="secno">8.1 </span>WebM Byte Streams</a><ul class="toc"><li class="tocline"><a href="#webm-init-segments" class="tocxref"><span class="secno">8.1.1 </span>Initialization Segments</a></li><li class="tocline"><a href="#webm-media-segments" class="tocxref"><span class="secno">8.1.2 </span>Media Segments</a></li><li class="tocline"><a href="#webm-random-access-points" class="tocxref"><span class="secno">8.1.3 </span>Random Access Points</a></li></ul></li><li class="tocline"><a href="#iso" class="tocxref"><span class="secno">8.2 </span>ISO Base Media File Format Byte Streams</a><ul class="toc"><li class="tocline"><a href="#iso-init-segments" class="tocxref"><span class="secno">8.2.1 </span>Initialization Segments</a></li><li class="tocline"><a href="#iso-media-segments" class="tocxref"><span class="secno">8.2.2 </span>Media Segments</a></li><li class="tocline"><a href="#iso-random-access-points" class="tocxref"><span class="secno">8.2.3 </span>Random Access Points</a></li></ul></li><li class="tocline"><a href="#mpeg2ts" class="tocxref"><span class="secno">8.3 </span>MPEG-2 Transport Stream Byte Streams</a><ul class="toc"><li class="tocline"><a href="#mpeg2ts-general" class="tocxref"><span class="secno">8.3.1 </span>General</a></li><li class="tocline"><a href="#mpeg2ts-init-segments" class="tocxref"><span class="secno">8.3.2 </span>Initialization Segments</a></li><li class="tocline"><a href="#mpeg2ts-media-segments" class="tocxref"><span class="secno">8.3.3 </span>Media Segments</a></li><li class="tocline"><a href="#mpeg2ts-random-access-points" class="tocxref"><span class="secno">8.3.4 </span>Random Access Points</a></li><li class="tocline"><a href="#mpeg2ts-discontinuities" class="tocxref"><span class="secno">8.3.5 </span>Timestamp Rollover &amp; Discontinuities</a></li></ul></li></ul></li><li class="tocline"><a href="#examples" class="tocxref"><span class="secno">9. </span>Examples</a></li><li class="tocline"><a href="#revision-history" class="tocxref"><span class="secno">10. </span>Revision History</a></li></ul></section>
    2.17 +</section><section id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#goals" class="tocxref"><span class="secno">1.1 </span>Goals</a></li><li class="tocline"><a href="#definitions" class="tocxref"><span class="secno">1.2 </span>Definitions</a></li></ul></li><li class="tocline"><a href="#source-buffer-model" class="tocxref"><span class="secno">2. </span>Source Buffer Model</a><ul class="toc"><li class="tocline"><a href="#source-buffer-overlapping-segments" class="tocxref"><span class="secno">2.1 </span>Appending a Media Segment over a buffered region</a><ul class="toc"><li class="tocline"><a href="#source-buffer-overlap-complete" class="tocxref"><span class="secno">2.1.1 </span>Complete Overlap</a></li><li class="tocline"><a href="#source-buffer-overlap-start" class="tocxref"><span class="secno">2.1.2 </span>Start Overlap</a></li><li class="tocline"><a href="#source-buffer-overlap-end" class="tocxref"><span class="secno">2.1.3 </span>End Overlap</a></li><li class="tocline"><a href="#source-buffer-overlap-middle" class="tocxref"><span class="secno">2.1.4 </span>Middle Overlap</a></li></ul></li><li class="tocline"><a href="#track-buffer-to-decoder-buffer" class="tocxref"><span class="secno">2.2 </span>Track Buffer to Decoder Buffer transfer</a></li></ul></li><li class="tocline"><a href="#mediasource" class="tocxref"><span class="secno">3. </span>MediaSource Object</a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">3.1 </span>Attributes</a></li><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">3.2 </span>Methods</a></li><li class="tocline"><a href="#mediasource-events" class="tocxref"><span class="secno">3.3 </span>Event Summary</a></li><li class="tocline"><a href="#mediasource-algorithms" class="tocxref"><span class="secno">3.4 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#mediasource-attach" class="tocxref"><span class="secno">3.4.1 </span>Attaching to a media element</a></li><li class="tocline"><a href="#mediasource-detach" class="tocxref"><span class="secno">3.4.2 </span>Detaching from a media element</a></li><li class="tocline"><a href="#mediasource-seeking" class="tocxref"><span class="secno">3.4.3 </span>Seeking</a></li><li class="tocline"><a href="#buffer-monitoring" class="tocxref"><span class="secno">3.4.4 </span>SourceBuffer Monitoring</a></li><li class="tocline"><a href="#active-source-buffer-changes" class="tocxref"><span class="secno">3.4.5 </span>Changes to selected/enabled track state</a></li><li class="tocline"><a href="#duration-change-algorithm" class="tocxref"><span class="secno">3.4.6 </span>Duration change</a></li></ul></li></ul></li><li class="tocline"><a href="#sourcebuffer" class="tocxref"><span class="secno">4. </span>SourceBuffer Object</a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno">4.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">4.2 </span>Methods</a></li><li class="tocline"><a href="#track-buffers" class="tocxref"><span class="secno">4.3 </span>Track Buffers</a></li><li class="tocline"><a href="#sourcebuffer-events" class="tocxref"><span class="secno">4.4 </span>Event Summary</a></li><li class="tocline"><a href="#sourcebuffer-algorithms" class="tocxref"><span class="secno">4.5 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#sourcebuffer-segment-parser-loop" class="tocxref"><span class="secno">4.5.1 </span>Segment Parser Loop</a></li><li class="tocline"><a href="#sourcebuffer-reset-parser-state" class="tocxref"><span class="secno">4.5.2 </span>Reset Parser State</a></li><li class="tocline"><a href="#sourcebuffer-append-error" class="tocxref"><span class="secno">4.5.3 </span>Append Error</a></li><li class="tocline"><a href="#sourcebuffer-stream-append-loop" class="tocxref"><span class="secno">4.5.4 </span>Stream Append Loop</a></li><li class="tocline"><a href="#sourcebuffer-init-segment-received" class="tocxref"><span class="secno">4.5.5 </span>Initialization Segment Received</a></li><li class="tocline"><a href="#sourcebuffer-coded-frame-processing" class="tocxref"><span class="secno">4.5.6 </span>Coded Frame Processing</a></li></ul></li></ul></li><li class="tocline"><a href="#sourcebufferlist" class="tocxref"><span class="secno">5. </span>SourceBufferList Object</a><ul class="toc"><li class="tocline"><a href="#attributes-2" class="tocxref"><span class="secno">5.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">5.2 </span>Methods</a></li><li class="tocline"><a href="#sourcebufferlist-events" class="tocxref"><span class="secno">5.3 </span>Event Summary</a></li></ul></li><li class="tocline"><a href="#url" class="tocxref"><span class="secno">6. </span>URL Object</a><ul class="toc"><li class="tocline"><a href="#methods-3" class="tocxref"><span class="secno">6.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#htmlmediaelement-attributes" class="tocxref"><span class="secno">7. </span>HTMLMediaElement attributes</a></li><li class="tocline"><a href="#audio-track-extensions" class="tocxref"><span class="secno">8. </span>AudioTrack Extensions</a><ul class="toc"><li class="tocline"><a href="#attributes-3" class="tocxref"><span class="secno">8.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#video-track-extensions" class="tocxref"><span class="secno">9. </span>VideoTrack Extensions</a><ul class="toc"><li class="tocline"><a href="#attributes-4" class="tocxref"><span class="secno">9.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#text-track-extensions" class="tocxref"><span class="secno">10. </span>TextTrack Extensions</a><ul class="toc"><li class="tocline"><a href="#attributes-5" class="tocxref"><span class="secno">10.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#byte-stream-formats" class="tocxref"><span class="secno">11. </span>Byte Stream Formats</a><ul class="toc"><li class="tocline"><a href="#webm" class="tocxref"><span class="secno">11.1 </span>WebM Byte Streams</a><ul class="toc"><li class="tocline"><a href="#webm-init-segments" class="tocxref"><span class="secno">11.1.1 </span>Initialization Segments</a></li><li class="tocline"><a href="#webm-media-segments" class="tocxref"><span class="secno">11.1.2 </span>Media Segments</a></li><li class="tocline"><a href="#webm-random-access-points" class="tocxref"><span class="secno">11.1.3 </span>Random Access Points</a></li></ul></li><li class="tocline"><a href="#iso" class="tocxref"><span class="secno">11.2 </span>ISO Base Media File Format Byte Streams</a><ul class="toc"><li class="tocline"><a href="#iso-init-segments" class="tocxref"><span class="secno">11.2.1 </span>Initialization Segments</a></li><li class="tocline"><a href="#iso-media-segments" class="tocxref"><span class="secno">11.2.2 </span>Media Segments</a></li><li class="tocline"><a href="#iso-random-access-points" class="tocxref"><span class="secno">11.2.3 </span>Random Access Points</a></li></ul></li><li class="tocline"><a href="#mpeg2ts" class="tocxref"><span class="secno">11.3 </span>MPEG-2 Transport Stream Byte Streams</a><ul class="toc"><li class="tocline"><a href="#mpeg2ts-general" class="tocxref"><span class="secno">11.3.1 </span>General</a></li><li class="tocline"><a href="#mpeg2ts-init-segments" class="tocxref"><span class="secno">11.3.2 </span>Initialization Segments</a></li><li class="tocline"><a href="#mpeg2ts-media-segments" class="tocxref"><span class="secno">11.3.3 </span>Media Segments</a></li><li class="tocline"><a href="#mpeg2ts-random-access-points" class="tocxref"><span class="secno">11.3.4 </span>Random Access Points</a></li><li class="tocline"><a href="#mpeg2ts-discontinuities" class="tocxref"><span class="secno">11.3.5 </span>Timestamp Rollover &amp; Discontinuities</a></li></ul></li></ul></li><li class="tocline"><a href="#examples" class="tocxref"><span class="secno">12. </span>Examples</a></li><li class="tocline"><a href="#revision-history" class="tocxref"><span class="secno">13. </span>Revision History</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">A. </span>References</a><ul class="toc"><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">A.1 </span>Informative references</a></li></ul></li></ul></section>
    2.18  
    2.19  
    2.20      <section id="introduction">
    2.21 @@ -675,16 +675,10 @@
    2.22  <span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-SourceBufferList" class="idlType"><code>SourceBufferList</code></a></span>    <span class="idlAttrName"><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></span>;</span>
    2.23  <span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-ReadyState" class="idlType"><code>ReadyState</code></a></span>          <span class="idlAttrName"><a href="#widl-MediaSource-readyState">readyState</a></span>;</span>
    2.24  <span class="idlAttribute">             attribute <span class="idlAttrType"><a>unrestricted double</a></span> <span class="idlAttrName"><a href="#widl-MediaSource-duration">duration</a></span>;</span>
    2.25 -<span class="idlMethod">    <span class="idlMethType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></span>  <span class="idlMethName"><a href="#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type">addSourceBuffer</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">type</span></span>);</span>
    2.26 -<span class="idlMethod">    <span class="idlMethType"><a>void</a></span>          <span class="idlMethName"><a href="#widl-MediaSource-removeSourceBuffer-void-SourceBuffer-sourceBuffer">removeSourceBuffer</a></span> (<span class="idlParam"><span class="idlParamType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></span> <span class="idlParamName">sourceBuffer</span></span>);</span>
    2.27 -<span class="idlMethod">    <span class="idlMethType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>?</span> <span class="idlMethName"><a href="#widl-MediaSource-getSourceBuffer-SourceBuffer-VideoTrack-videoTrack">getSourceBuffer</a></span> (<span class="idlParam"><span class="idlParamType"><a>VideoTrack</a></span> <span class="idlParamName">videoTrack</span></span>);</span>
    2.28 -<span class="idlMethod">    <span class="idlMethType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>?</span> <span class="idlMethName"><a href="#widl-MediaSource-getSourceBuffer-SourceBuffer-AudioTrack-audioTrack">getSourceBuffer</a></span> (<span class="idlParam"><span class="idlParamType"><a>AudioTrack</a></span> <span class="idlParamName">audioTrack</span></span>);</span>
    2.29 -<span class="idlMethod">    <span class="idlMethType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>?</span> <span class="idlMethName"><a href="#widl-MediaSource-getSourceBuffer-SourceBuffer-TextTrack-textTrack">getSourceBuffer</a></span> (<span class="idlParam"><span class="idlParamType"><a>TextTrack</a></span> <span class="idlParamName">textTrack</span></span>);</span>
    2.30 -<span class="idlMethod">    <span class="idlMethType"><a>void</a></span>          <span class="idlMethName"><a href="#widl-MediaSource-endOfStream-void-EndOfStreamError-error">endOfStream</a></span> (<span class="idlParam">optional <span class="idlParamType"><a href="#idl-def-EndOfStreamError" class="idlType"><code>EndOfStreamError</code></a></span> <span class="idlParamName">error</span></span>);</span>
    2.31 -<span class="idlMethod">    <span class="idlMethType"><a>void</a></span>          <span class="idlMethName"><a href="#widl-MediaSource-setTrackInfo-void-VideoTrack-track-DOMString-kind-DOMString-language">setTrackInfo</a></span> (<span class="idlParam"><span class="idlParamType"><a>VideoTrack</a></span> <span class="idlParamName">track</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">kind</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">language</span></span>);</span>
    2.32 -<span class="idlMethod">    <span class="idlMethType"><a>void</a></span>          <span class="idlMethName"><a href="#widl-MediaSource-setTrackInfo-void-AudioTrack-track-DOMString-kind-DOMString-language">setTrackInfo</a></span> (<span class="idlParam"><span class="idlParamType"><a>AudioTrack</a></span> <span class="idlParamName">track</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">kind</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">language</span></span>);</span>
    2.33 -<span class="idlMethod">    <span class="idlMethType"><a>void</a></span>          <span class="idlMethName"><a href="#widl-MediaSource-setTrackInfo-void-TextTrack-track-DOMString-kind-DOMString-language">setTrackInfo</a></span> (<span class="idlParam"><span class="idlParamType"><a>TextTrack</a></span> <span class="idlParamName">track</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">kind</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">language</span></span>);</span>
    2.34 -<span class="idlMethod">    static <span class="idlMethType"><a>bool</a></span>   <span class="idlMethName"><a href="#widl-MediaSource-isTypeSupported-bool-DOMString-type">isTypeSupported</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">type</span></span>);</span>
    2.35 +<span class="idlMethod">    <span class="idlMethType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></span> <span class="idlMethName"><a href="#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type">addSourceBuffer</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">type</span></span>);</span>
    2.36 +<span class="idlMethod">    <span class="idlMethType"><a>void</a></span>         <span class="idlMethName"><a href="#widl-MediaSource-removeSourceBuffer-void-SourceBuffer-sourceBuffer">removeSourceBuffer</a></span> (<span class="idlParam"><span class="idlParamType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></span> <span class="idlParamName">sourceBuffer</span></span>);</span>
    2.37 +<span class="idlMethod">    <span class="idlMethType"><a>void</a></span>         <span class="idlMethName"><a href="#widl-MediaSource-endOfStream-void-EndOfStreamError-error">endOfStream</a></span> (<span class="idlParam">optional <span class="idlParamType"><a href="#idl-def-EndOfStreamError" class="idlType"><code>EndOfStreamError</code></a></span> <span class="idlParamName">error</span></span>);</span>
    2.38 +<span class="idlMethod">    static <span class="idlMethType"><a>bool</a></span>  <span class="idlMethName"><a href="#widl-MediaSource-isTypeSupported-bool-DOMString-type">isTypeSupported</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">type</span></span>);</span>
    2.39  };</span></pre><section id="attributes"><h3><span class="secno">3.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-MediaSource-activeSourceBuffers"><code>activeSourceBuffers</code> of type <span class="idlAttrType"><a href="#idl-def-SourceBufferList" class="idlType"><code>SourceBufferList</code></a></span>, readonly</dt><dd>
    2.40            <p>Contains the subset of <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> that are providing the 
    2.41              <a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-videotrack-selected">selected video track</a>,  the 
    2.42 @@ -771,28 +765,7 @@
    2.43                  <dd>Throw an <code><a href="http://dom.spec.whatwg.org/#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code> exception.</dd>
    2.44                </dl>
    2.45              </li>
    2.46 -          </ol></dd><dt id="widl-MediaSource-getSourceBuffer-SourceBuffer-VideoTrack-videoTrack"><code>getSourceBuffer</code></dt><dd>
    2.47 -          <p>Gets the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object that created a specific <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#videotrack">VideoTrack</a></code>.</p>
    2.48 -
    2.49 -          
    2.50 -        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">videoTrack</td><td class="prmType"><code><a>VideoTrack</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></code>, nullable</div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
    2.51 -            <li>If <var>videoTrack</var> was not created by any <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> then return null.</li>
    2.52 -            <li>Return the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> that created <var>videoTrack</var>.
    2.53 -          </li></ol></dd><dt id="widl-MediaSource-getSourceBuffer-SourceBuffer-AudioTrack-audioTrack"><code>getSourceBuffer</code></dt><dd>
    2.54 -          <p>Gets the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object that created a specific <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#audiotrack">AudioTrack</a></code>.</p>
    2.55 -
    2.56 -          
    2.57 -        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">audioTrack</td><td class="prmType"><code><a>AudioTrack</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></code>, nullable</div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
    2.58 -            <li>If <var>audioTrack</var> was not created by any <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> then return null.</li>
    2.59 -            <li>Return the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> that created <var>audioTrack</var>.
    2.60 -          </li></ol></dd><dt id="widl-MediaSource-getSourceBuffer-SourceBuffer-TextTrack-textTrack"><code>getSourceBuffer</code></dt><dd>
    2.61 -          <p>Gets the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object that created a specific <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#texttrack">TextTrack</a></code>.</p>
    2.62 -
    2.63 -          
    2.64 -        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">textTrack</td><td class="prmType"><code><a>TextTrack</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></code>, nullable</div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
    2.65 -            <li>If <var>textTrack</var> was not created by any <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> then return null.</li>
    2.66 -            <li>Return the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> that created <var>textTrack</var>.
    2.67 -          </li></ol></dd><dt id="widl-MediaSource-isTypeSupported-bool-DOMString-type"><code>isTypeSupported</code>, static</dt><dd>
    2.68 +          </ol></dd><dt id="widl-MediaSource-isTypeSupported-bool-DOMString-type"><code>isTypeSupported</code>, static</dt><dd>
    2.69            <p>Check to see whether the <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> is capable of creating <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects for the the specified MIME type.</p>
    2.70  
    2.71            
    2.72 @@ -816,20 +789,14 @@
    2.73          <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">sourceBuffer</td><td class="prmType"><code><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a>void</a></code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
    2.74              <li>If <var>sourceBuffer</var> is null then throw an <code><a href="http://dom.spec.whatwg.org/#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code> exception and abort these steps.</li>
    2.75              <li>If <var>sourceBuffer</var> specifies an object that is not in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> then throw a <code><a href="http://dom.spec.whatwg.org/#dom-domexception-not_found_err">NOT_FOUND_ERR</a></code> exception and abort these steps.</li>
    2.76 -            <li>Remove track information from <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-audiotracks">audioTracks</a></code>, <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-videotracks">videoTracks</a></code>, and <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks">textTracks</a></code> for all tracks associated with <var>sourceBuffer</var> and <a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a> at the modified lists.</li>
    2.77 +            <li>Set the the sourceBuffer attribute in all tracks in <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-audioTracks">audioTracks</a></code>, <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-videoTracks">videoTracks</a></code>, and <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-textTracks">textTracks</a></code> to null.</li>
    2.78 +            <li>Remove all the tracks in <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-audioTracks">audioTracks</a></code>, <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-videoTracks">videoTracks</a></code>, and <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-textTracks">textTracks</a></code> from the respective <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-audiotracks">audioTracks</a></code>, <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-videotracks">videoTracks</a></code>, and <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks">textTracks</a></code> attributes on the HTMLMediaElement.</li>
    2.79 +            <li>Remove all the tracks in <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-audioTracks">audioTracks</a></code>, <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-videoTracks">videoTracks</a></code>, and <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-textTracks">textTracks</a></code> and <a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a></code> at the modified lists.</li>
    2.80 +            <li><a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a></code> at the HTMLMediaElement track lists that were modified.</li>
    2.81              <li>If <var>sourceBuffer</var> is in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>, then remove it from <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> and <a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-removesourcebuffer">removesourcebuffer</a></code> at <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>.</li>
    2.82              <li>Remove <var>sourceBuffer</var> from <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> and <a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-removesourcebuffer">removesourcebuffer</a></code> at <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>.</li>
    2.83              <li>Destroy all resources for <var>sourceBuffer</var>.</li>
    2.84 -          </ol></dd><dt id="widl-MediaSource-setTrackInfo-void-VideoTrack-track-DOMString-kind-DOMString-language"><code>setTrackInfo</code></dt><dd>
    2.85 -            <p>Set the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-videotrack-kind">kind</a></code> and <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-videotrack-language">language</a></code> of the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#videotrack">VideoTrack</a></code> <var>track</var>.</p>
    2.86 -            <div class="note"><div class="note-title"><span>Note</span></div><p class="">This method would be unnecessary if the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-videotrack-kind">kind</a></code> and <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-videotrack-language">language</a></code> attributes of <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#videotrack">VideoTrack</a></code> were not read-only.</p></div>
    2.87 -        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">track</td><td class="prmType"><code><a>VideoTrack</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr><tr><td class="prmName">kind</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr><tr><td class="prmName">language</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd><dt id="widl-MediaSource-setTrackInfo-void-AudioTrack-track-DOMString-kind-DOMString-language"><code>setTrackInfo</code></dt><dd>
    2.88 -            <p>Set the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-audiotrack-kind">kind</a></code> and <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-audiotrack-language">language</a></code> of the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#audiotrack">AudioTrack</a></code> <var>track</var>.</p>
    2.89 -            <div class="note"><div class="note-title"><span>Note</span></div><p class="">This method would be unnecessary if the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-audiotrack-kind">kind</a></code> and <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-audiotrack-language">language</a></code> attributes of <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#audiotrack">AudioTrack</a></code> were not read-only.</p></div>
    2.90 -        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">track</td><td class="prmType"><code><a>AudioTrack</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr><tr><td class="prmName">kind</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr><tr><td class="prmName">language</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd><dt id="widl-MediaSource-setTrackInfo-void-TextTrack-track-DOMString-kind-DOMString-language"><code>setTrackInfo</code></dt><dd>
    2.91 -            <p>Set the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-texttrack-kind">kind</a></code> and <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-texttrack-language">language</a></code> of the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#texttrack">TextTrack</a></code> <var>track</var>.</p>
    2.92 -            <div class="note"><div class="note-title"><span>Note</span></div><p class="">This method would be unnecessary if the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-texttrack-kind">kind</a></code> and <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-texttrack-language">language</a></code> attributes of <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#texttrack">TextTrack</a></code> were not read-only.</p></div>
    2.93 -        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">track</td><td class="prmType"><code><a>TextTrack</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr><tr><td class="prmName">kind</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr><tr><td class="prmName">language</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></section>
    2.94 +          </ol></dd></dl></section>
    2.95  
    2.96        <section id="mediasource-events">
    2.97          <h3><span class="secno">3.3 </span>Event Summary</h3>
    2.98 @@ -1067,15 +1034,20 @@
    2.99        <div class="issue"><div class="issue-title"><span>Issue 4</span></div><p class=""><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=20327">Bug 20327</a> - Continuous splice flag</p></div>
   2.100  
   2.101        <pre class="idl"><span class="idlInterface" id="idl-def-SourceBuffer">interface <span class="idlInterfaceID">SourceBuffer</span> : <span class="idlSuperclass"><a>EventTarget</a></span> {
   2.102 -<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>boolean</a></span>    <span class="idlAttrName"><a href="#widl-SourceBuffer-appending">appending</a></span>;</span>
   2.103 -<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>TimeRanges</a></span> <span class="idlAttrName"><a href="#widl-SourceBuffer-buffered">buffered</a></span>;</span>
   2.104 -<span class="idlAttribute">             attribute <span class="idlAttrType"><a>double</a></span>     <span class="idlAttrName"><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></span>;</span>
   2.105 +<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>boolean</a></span>        <span class="idlAttrName"><a href="#widl-SourceBuffer-appending">appending</a></span>;</span>
   2.106 +<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>TimeRanges</a></span>     <span class="idlAttrName"><a href="#widl-SourceBuffer-buffered">buffered</a></span>;</span>
   2.107 +<span class="idlAttribute">             attribute <span class="idlAttrType"><a>double</a></span>         <span class="idlAttrName"><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></span>;</span>
   2.108 +<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>AudioTrackList</a></span> <span class="idlAttrName"><a href="#widl-SourceBuffer-audioTracks">audioTracks</a></span>;</span>
   2.109 +<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>VideoTrackList</a></span> <span class="idlAttrName"><a href="#widl-SourceBuffer-videoTracks">videoTracks</a></span>;</span>
   2.110 +<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a>TextTrackList</a></span>  <span class="idlAttrName"><a href="#widl-SourceBuffer-textTracks">textTracks</a></span>;</span>
   2.111  <span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-SourceBuffer-appendArrayBuffer-void-ArrayBuffer-data">appendArrayBuffer</a></span> (<span class="idlParam"><span class="idlParamType"><a>ArrayBuffer</a></span> <span class="idlParamName">data</span></span>);</span>
   2.112  <span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize">appendStream</a></span> (<span class="idlParam"><span class="idlParamType"><a>Stream</a></span> <span class="idlParamName">stream</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>unsigned long long</a></span> <span class="idlParamName">maxSize</span></span>);</span>
   2.113  <span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-SourceBuffer-abort-void">abort</a></span> ();</span>
   2.114  <span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-SourceBuffer-remove-void-double-start-double-end">remove</a></span> (<span class="idlParam"><span class="idlParamType"><a>double</a></span> <span class="idlParamName">start</span></span>, <span class="idlParam"><span class="idlParamType"><a>double</a></span> <span class="idlParamName">end</span></span>);</span>
   2.115  };</span></pre><section id="attributes-1"><h3><span class="secno">4.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-SourceBuffer-appending"><code>appending</code> of type <span class="idlAttrType"><a>boolean</a></span>, readonly</dt><dd>
   2.116            <p>Indicates whether an <code><a href="#widl-SourceBuffer-appendArrayBuffer-void-ArrayBuffer-data">appendArrayBuffer()</a></code> or <code><a href="#widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize">appendStream()</a></code> operation is still being processed.</p>
   2.117 +        </dd><dt id="widl-SourceBuffer-audioTracks"><code>audioTracks</code> of type <span class="idlAttrType"><a>AudioTrackList</a></span>, readonly</dt><dd>
   2.118 +          The list of <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#audiotrack">AudioTrack</a></code> objects created by this object.
   2.119          </dd><dt id="widl-SourceBuffer-buffered"><code>buffered</code> of type <span class="idlAttrType"><a>TimeRanges</a></span>, readonly</dt><dd>
   2.120            <p>Indicates what <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#timeranges">TimeRanges</a></code> are buffered in the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>.</p>
   2.121            <p>When the attribute is read the following steps must occur:</p>
   2.122 @@ -1083,6 +1055,8 @@
   2.123              <li>If this object has been removed from the <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> attribute of the <a href="#parent-media-source">parent media source</a> then throw an <code><a href="http://dom.spec.whatwg.org/#dom-domexception-invalid_state_err">INVALID_STATE_ERR</a></code> exception and abort these steps.</li>
   2.124              <li>Return a new static <a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#normalized-timeranges-object">normalized TimeRanges object</a> for the <a href="#media-segment">media segments</a> buffered.</li>
   2.125            </ol>
   2.126 +        </dd><dt id="widl-SourceBuffer-textTracks"><code>textTracks</code> of type <span class="idlAttrType"><a>TextTrackList</a></span>, readonly</dt><dd>
   2.127 +          The list of <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#texttrack">TextTrack</a></code> objects created by this object.
   2.128          </dd><dt id="widl-SourceBuffer-timestampOffset"><code>timestampOffset</code> of type <span class="idlAttrType"><a>double</a></span></dt><dd>
   2.129            <p>Controls the offset applied to timestamps inside subsequent <a href="#media-segment">media segments</a> that are appended to this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>. The <code><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></code> is initially set to 0 which indicates that no offset is being applied.</p>
   2.130            <p>On getting, Return the initial value or the last value that was successfully set.</p>
   2.131 @@ -1094,6 +1068,8 @@
   2.132              <li>Update the attribute to the new value.</li>
   2.133            </ol>
   2.134            <div class="issue"><div class="issue-title"><span>Issue 5</span></div><p class=""><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=19676">Bug 19676</a> - timestampOffset accuracy</p></div>
   2.135 +        </dd><dt id="widl-SourceBuffer-videoTracks"><code>videoTracks</code> of type <span class="idlAttrType"><a>VideoTrackList</a></span>, readonly</dt><dd>
   2.136 +          The list of <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#videotrack">VideoTrack</a></code> objects created by this object.
   2.137          </dd></dl></section><section id="methods-1"><h3><span class="secno">4.2 </span>Methods</h3><dl class="methods"><dt id="widl-SourceBuffer-abort-void"><code>abort</code></dt><dd>
   2.138            <p>Aborts the current segment and resets the segment parser.</p>
   2.139  
   2.140 @@ -1431,7 +1407,8 @@
   2.141                          <li>Set <var>active track flag</var> to true.</li>
   2.142                        </ol>
   2.143                      </li>
   2.144 -                    <li>Add <var>new audio track</var> to <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-audiotracks">audioTracks</a></code>.</li>
   2.145 +                    <li>Add <var>new audio track</var> to the <code><a href="#widl-SourceBuffer-audioTracks">audioTracks</a></code> attribute on this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
   2.146 +                    <li>Add <var>new audio track</var> to the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-audiotracks">audioTracks</a></code> attribute on the HTMLMediaElement.</li>
   2.147                      <li>Create a new <a href="#track-buffer">track buffer</a> to store <a href="#coded-frame">coded frames</a> for this track.</li>
   2.148                      <li>Add the <a href="#track-description">track description</a> for this track to the <a href="#track-buffer">track buffer</a>.</li>
   2.149                    </ol>
   2.150 @@ -1451,7 +1428,8 @@
   2.151                          <li>Set <var>active track flag</var> to true.</li>
   2.152                        </ol>
   2.153                      </li>
   2.154 -                    <li>Add <var>new video track</var> to <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-videotracks">videoTracks</a></code>.</li>
   2.155 +                    <li>Add <var>new video track</var> to the <code><a href="#widl-SourceBuffer-videoTracks">videoTracks</a></code> attribute on this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
   2.156 +                    <li>Add <var>new video track</var> to the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-videotracks">videoTracks</a></code> attribute on the HTMLMediaElement.</li>
   2.157                      <li>Create a new <a href="#track-buffer">track buffer</a> to store <a href="#coded-frame">coded frames</a> for this track.</li>
   2.158                      <li>Add the <a href="#track-description">track description</a> for this track to the <a href="#track-buffer">track buffer</a>.</li>
   2.159                    </ol>
   2.160 @@ -1466,7 +1444,8 @@
   2.161                        If the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-texttrack-mode">mode</a></code> property on <var>new text track</var> equals <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-texttrack-showing">"showing"</a></code> or
   2.162                        <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-texttrack-hidden">"hidden"</a></code>, then set <var>active track flag</var> to true.
   2.163                      </li>
   2.164 -                    <li>Add <var>new text track</var> to <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks">textTracks</a></code>.</li>
   2.165 +                    <li>Add <var>new text track</var> to the <code><a href="#widl-SourceBuffer-textTracks">textTracks</a></code> attribute on this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
   2.166 +                    <li>Add <var>new text track</var> to the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks">textTracks</a></code> attribute on the HTMLMediaElement.</li>
   2.167                      <li>Create a new <a href="#track-buffer">track buffer</a> to store <a href="#coded-frame">coded frames</a> for this track.</li>
   2.168                      <li>Add the <a href="#track-description">track description</a> for this track to the <a href="#track-buffer">track buffer</a>.</li>
   2.169                    </ol>
   2.170 @@ -1645,9 +1624,143 @@
   2.171          <li>Return the <var>intersection range</var>.</li>
   2.172        </ol>
   2.173      </section>
   2.174 -    
   2.175 +
   2.176 +    <section id="audio-track-extensions">
   2.177 +      <!--OddPage--><h2><span class="secno">8. </span>AudioTrack Extensions</h2>
   2.178 +      <p>This section specifies extensions to the HTML <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#audiotrack">AudioTrack</a></code> definition.</p>
   2.179 +
   2.180 +      <pre class="idl"><span class="idlInterface" id="idl-def-AudioTrack">partial interface <span class="idlInterfaceID">AudioTrack</span> {
   2.181 +<span class="idlAttribute">             attribute <span class="idlAttrType"><a>DOMString</a></span>     <span class="idlAttrName"><a href="#widl-AudioTrack-kind">kind</a></span>;</span>
   2.182 +<span class="idlAttribute">             attribute <span class="idlAttrType"><a>DOMString</a></span>     <span class="idlAttrName"><a href="#widl-AudioTrack-language">language</a></span>;</span>
   2.183 +<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>?</span> <span class="idlAttrName"><a href="#widl-AudioTrack-sourceBuffer">sourceBuffer</a></span>;</span>
   2.184 +};</span></pre><section id="attributes-3"><h3><span class="secno">8.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-AudioTrack-kind"><code>kind</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt><dd>
   2.185 +          <p>Allows the web application to get and update the track <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-audiotrack-kind">kind</a></code>.</p>
   2.186 +          <p>On getting, return the current value of the attribute. This is either the value provided when this object was created or the value provided on
   2.187 +            the last successful set operation.</p><p>
   2.188 +          </p><p>On setting, run the following steps:</p>
   2.189 +          <ol>
   2.190 +            <li>If the value being assigned to this attribute does not match one of the <a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-TrackList-getKind-categories">kind categories</a>, then abort these steps.</li>
   2.191 +            <li>Update this attribute to the new value.</li>
   2.192 +            <li>If the <code><a href="#widl-AudioTrack-sourceBuffer">sourceBuffer</a></code> attribute on this track is not null, then
   2.193 +              <a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a></code> at
   2.194 +              <code><a href="#widl-AudioTrack-sourceBuffer">sourceBuffer</a></code>.<code><a href="#widl-SourceBuffer-audioTracks">audioTracks</a></code>.
   2.195 +            </li>
   2.196 +            <li><a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a></code> at the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-audiotracks">audioTracks</a></code> attribute on the
   2.197 +              HTMLMediaElement.
   2.198 +            </li>
   2.199 +          </ol>
   2.200 +        </dd><dt id="widl-AudioTrack-language"><code>language</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt><dd>
   2.201 +          <p>Allows the web application to get and update the track <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-audiotrack-language">language</a></code>.</p>
   2.202 +          <p>On getting, return the current value of the attribute. This is either the value provided when this object was created or the value provided on
   2.203 +            the last successful set operation.</p><p>
   2.204 +          </p><p>On setting, run the following steps:</p>
   2.205 +          <ol>
   2.206 +            <li>If the value being assigned to this attribute is not an empty string or a BCP 47 language tag[<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>], then abort these steps.</li>
   2.207 +            <li>Update this attribute to the new value.</li>
   2.208 +            <li>If the <code><a href="#widl-AudioTrack-sourceBuffer">sourceBuffer</a></code> attribute on this track is not null, then
   2.209 +              <a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a></code> at
   2.210 +              <code><a href="#widl-AudioTrack-sourceBuffer">sourceBuffer</a></code>.<code><a href="#widl-SourceBuffer-audioTracks">audioTracks</a></code>.
   2.211 +            </li>
   2.212 +            <li><a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a></code> at the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-audiotracks">audioTracks</a></code> attribute on the
   2.213 +              HTMLMediaElement.
   2.214 +            </li>
   2.215 +          </ol>
   2.216 +        </dd><dt id="widl-AudioTrack-sourceBuffer"><code>sourceBuffer</code> of type <span class="idlAttrType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></span>, readonly, nullable</dt><dd>
   2.217 +          <p>Returns the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> that created this track. Returns null if this track was not created by a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> or the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> has been removed from the <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> attribute of its <a href="#parent-media-source">parent media source</a>.</p>
   2.218 +        </dd></dl></section>
   2.219 +    </section>
   2.220 +
   2.221 +    <section id="video-track-extensions">
   2.222 +      <!--OddPage--><h2><span class="secno">9. </span>VideoTrack Extensions</h2>
   2.223 +      <p>This section specifies extensions to the HTML <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#videotrack">VideoTrack</a></code> definition.</p>
   2.224 +
   2.225 +      <pre class="idl"><span class="idlInterface" id="idl-def-VideoTrack">partial interface <span class="idlInterfaceID">VideoTrack</span> {
   2.226 +<span class="idlAttribute">             attribute <span class="idlAttrType"><a>DOMString</a></span>     <span class="idlAttrName"><a href="#widl-VideoTrack-kind">kind</a></span>;</span>
   2.227 +<span class="idlAttribute">             attribute <span class="idlAttrType"><a>DOMString</a></span>     <span class="idlAttrName"><a href="#widl-VideoTrack-language">language</a></span>;</span>
   2.228 +<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>?</span> <span class="idlAttrName"><a href="#widl-VideoTrack-sourceBuffer">sourceBuffer</a></span>;</span>
   2.229 +};</span></pre><section id="attributes-4"><h3><span class="secno">9.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-VideoTrack-kind"><code>kind</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt><dd>
   2.230 +          <p>Allows the web application to get and update the track <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-videotrack-kind">kind</a></code>.</p>
   2.231 +          <p>On getting, return the current value of the attribute. This is either the value provided when this object was created or the value provided on
   2.232 +            the last successful set operation.</p><p>
   2.233 +          </p><p>On setting, run the following steps:</p>
   2.234 +          <ol>
   2.235 +            <li>If the value being assigned to this attribute does not match one of the <a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-TrackList-getKind-categories">kind categories</a>, then abort these steps.</li>
   2.236 +            <li>Update this attribute to the new value.</li>
   2.237 +            <li>If the <code><a href="#widl-VideoTrack-sourceBuffer">sourceBuffer</a></code> attribute on this track is not null, then
   2.238 +              <a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a></code> at
   2.239 +              <code><a href="#widl-VideoTrack-sourceBuffer">sourceBuffer</a></code>.<code><a href="#widl-SourceBuffer-videoTracks">videoTracks</a></code>.
   2.240 +            </li>
   2.241 +            <li><a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a></code> at the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-videotracks">videoTracks</a></code> attribute on the
   2.242 +              HTMLMediaElement.
   2.243 +            </li>
   2.244 +          </ol>
   2.245 +        </dd><dt id="widl-VideoTrack-language"><code>language</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt><dd>
   2.246 +          <p>Allows the web application to get and update the track <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-videotrack-language">language</a></code>.</p>
   2.247 +          <p>On getting, return the current value of the attribute. This is either the value provided when this object was created or the value provided on
   2.248 +            the last successful set operation.</p><p>
   2.249 +          </p><p>On setting, run the following steps:</p>
   2.250 +          <ol>
   2.251 +            <li>If the value being assigned to this attribute is not an empty string or a BCP 47 language tag[<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>], then abort these steps.</li>
   2.252 +            <li>Update this attribute to the new value.</li>
   2.253 +            <li>If the <code><a href="#widl-VideoTrack-sourceBuffer">sourceBuffer</a></code> attribute on this track is not null, then
   2.254 +              <a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a></code> at
   2.255 +              <code><a href="#widl-VideoTrack-sourceBuffer">sourceBuffer</a></code>.<code><a href="#widl-SourceBuffer-videoTracks">videoTracks</a></code>.
   2.256 +            </li>
   2.257 +            <li><a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a></code> at the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-videotracks">videoTracks</a></code> attribute on the
   2.258 +              HTMLMediaElement.
   2.259 +            </li>
   2.260 +          </ol>
   2.261 +        </dd><dt id="widl-VideoTrack-sourceBuffer"><code>sourceBuffer</code> of type <span class="idlAttrType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></span>, readonly, nullable</dt><dd>
   2.262 +          <p>Returns the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> that created this track. Returns null if this track was not created by a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> or the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> has been removed from the <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> attribute of its <a href="#parent-media-source">parent media source</a>.</p>
   2.263 +        </dd></dl></section></section>
   2.264 +
   2.265 +    <section id="text-track-extensions">
   2.266 +      <!--OddPage--><h2><span class="secno">10. </span>TextTrack Extensions</h2>
   2.267 +      <p>This section specifies extensions to the HTML <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#texttrack">TextTrack</a></code> definition.</p>
   2.268 +
   2.269 +      <pre class="idl"><span class="idlInterface" id="idl-def-TextTrack">partial interface <span class="idlInterfaceID">TextTrack</span> {
   2.270 +<span class="idlAttribute">             attribute <span class="idlAttrType"><a>DOMString</a></span>     <span class="idlAttrName"><a href="#widl-TextTrack-kind">kind</a></span>;</span>
   2.271 +<span class="idlAttribute">             attribute <span class="idlAttrType"><a>DOMString</a></span>     <span class="idlAttrName"><a href="#widl-TextTrack-language">language</a></span>;</span>
   2.272 +<span class="idlAttribute">    readonly attribute <span class="idlAttrType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>?</span> <span class="idlAttrName"><a href="#widl-TextTrack-sourceBuffer">sourceBuffer</a></span>;</span>
   2.273 +};</span></pre><section id="attributes-5"><h3><span class="secno">10.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-TextTrack-kind"><code>kind</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt><dd>
   2.274 +          <p>Allows the web application to get and update the track <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-texttrack-kind">kind</a></code>.</p>
   2.275 +          <p>On getting, return the current value of the attribute. This is either the value provided when this object was created or the value provided on
   2.276 +            the last successful set operation.</p><p>
   2.277 +          </p><p>On setting, run the following steps:</p>
   2.278 +          <ol>
   2.279 +            <li>If the value being assigned to this attribute does not match one of the <a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#text-track-kind">text track kinds</a>, then abort these steps.</li>
   2.280 +            <li>Update this attribute to the new value.</li>
   2.281 +            <li>If the <code><a href="#widl-TextTrack-sourceBuffer">sourceBuffer</a></code> attribute on this track is not null, then
   2.282 +              <a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a></code> at
   2.283 +              <code><a href="#widl-TextTrack-sourceBuffer">sourceBuffer</a></code>.<code><a href="#widl-SourceBuffer-textTracks">textTracks</a></code>.
   2.284 +            </li>
   2.285 +            <li><a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a></code> at the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks">textTracks</a></code> attribute on the
   2.286 +              HTMLMediaElement.
   2.287 +            </li>
   2.288 +          </ol>
   2.289 +        </dd><dt id="widl-TextTrack-language"><code>language</code> of type <span class="idlAttrType"><a>DOMString</a></span></dt><dd>
   2.290 +          <p>Allows the web application to get and update the track <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-texttrack-language">language</a></code>.</p>
   2.291 +          <p>On getting, return the current value of the attribute. This is either the value provided when this object was created or the value provided on
   2.292 +            the last successful set operation.</p><p>
   2.293 +          </p><p>On setting, run the following steps:</p>
   2.294 +          <ol>
   2.295 +            <li>If the value being assigned to this attribute is not an valid <a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#text-track-language">text track language</a>, 
   2.296 +              then abort these steps.</li>
   2.297 +            <li>Update this attribute to the new value.</li>
   2.298 +            <li>If the <code><a href="#widl-TextTrack-sourceBuffer">sourceBuffer</a></code> attribute on this track is not null, then
   2.299 +              <a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a></code> at
   2.300 +              <code><a href="#widl-TextTrack-sourceBuffer">sourceBuffer</a></code>.<code><a href="#widl-SourceBuffer-textTracks">textTracks</a></code>.
   2.301 +            </li>
   2.302 +            <li><a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#handler-tracklist-onchange">change</a></code> at the <code><a href="http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks">textTracks</a></code> attribute on the
   2.303 +              HTMLMediaElement.
   2.304 +            </li>
   2.305 +          </ol>
   2.306 +        </dd><dt id="widl-TextTrack-sourceBuffer"><code>sourceBuffer</code> of type <span class="idlAttrType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></span>, readonly, nullable</dt><dd>
   2.307 +          <p>Returns the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> that created this track. Returns null if this track was not created by a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> or the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> has been removed from the <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> attribute of its <a href="#parent-media-source">parent media source</a>.</p>
   2.308 +        </dd></dl></section></section>
   2.309 +
   2.310      <section id="byte-stream-formats">
   2.311 -      <!--OddPage--><h2><span class="secno">8. </span>Byte Stream Formats</h2>
   2.312 +      <!--OddPage--><h2><span class="secno">11. </span>Byte Stream Formats</h2>
   2.313        <p>The bytes provided through <code><a href="#widl-SourceBuffer-appendArrayBuffer-void-ArrayBuffer-data">appendArrayBuffer()</a></code> and <code><a href="#widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize">appendStream()</a></code> for a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> form a logical byte stream. The format of this byte stream depends on the media container format in use and is defined in a byte stream format specification. Byte stream format specifications based on WebM , the ISO Base Media File Format, and MPEG-2 Transport Streams are provided below. These format specifications are intended to be the authoritative source for how data from these containers is formatted and passed to a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>. If a <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> implementation claims to support any of these container formats, then it must implement the corresponding byte stream format specification described below.</p>
   2.314        <p>This section provides general requirements for all byte stream formats:</p>
   2.315        <ul>
   2.316 @@ -1706,11 +1819,11 @@
   2.317        <p>Byte stream specifications must at a minimum define constraints which ensure that the above requirements hold. Additional constraints may be defined, for example to simplify implementation.</p>
   2.318  
   2.319        <section id="webm" class="nonnormative">
   2.320 -        <h3><span class="secno">8.1 </span>WebM Byte Streams</h3>
   2.321 +        <h3><span class="secno">11.1 </span>WebM Byte Streams</h3>
   2.322          <p>This section defines segment formats for implementations that choose to support WebM.</p>
   2.323  
   2.324          <section id="webm-init-segments">
   2.325 -          <h4><span class="secno">8.1.1 </span>Initialization Segments</h4>
   2.326 +          <h4><span class="secno">11.1.1 </span>Initialization Segments</h4>
   2.327            <p>A WebM <a href="#init-segment">initialization segment</a> must contain a subset of the elements at the start of a typical WebM file.</p>
   2.328            <p>The following rules apply to WebM initialization segments:</p>
   2.329            <ol>
   2.330 @@ -1722,7 +1835,7 @@
   2.331          </section>
   2.332  
   2.333          <section id="webm-media-segments">
   2.334 -          <h4><span class="secno">8.1.2 </span>Media Segments</h4>
   2.335 +          <h4><span class="secno">11.1.2 </span>Media Segments</h4>
   2.336            <p>A WebM <a href="#media-segment">media segment</a> is a single <a href="http://www.webmproject.org/code/specs/container/#cluster">Cluster</a> element.</p>
   2.337            <p>The following rules apply to WebM media segments:</p>
   2.338            <ol>
   2.339 @@ -1738,26 +1851,26 @@
   2.340          </section>
   2.341  
   2.342          <section id="webm-random-access-points">
   2.343 -          <h4><span class="secno">8.1.3 </span>Random Access Points</h4>
   2.344 +          <h4><span class="secno">11.1.3 </span>Random Access Points</h4>
   2.345            <p>A SimpleBlock element with its Keyframe flag set signals the location of a <a href="#random-access-point">random access point</a> for that track. Media segments containing multiple tracks are only considered a random access point if the first SimpleBlock for each track has its Keyframe flag set. The order of the multiplexed blocks must conform to the <a href="http://www.webmproject.org/code/specs/container/#muxer-guidelines">WebM Muxer Guidelines</a>.</p>
   2.346          </section>
   2.347        </section>
   2.348        
   2.349        <section id="iso" class="nonnormative">
   2.350 -        <h3><span class="secno">8.2 </span>ISO Base Media File Format Byte Streams</h3>
   2.351 +        <h3><span class="secno">11.2 </span>ISO Base Media File Format Byte Streams</h3>
   2.352          <p>This section defines segment formats for implementations that choose to support the ISO Base Media File Format
   2.353  	  <a href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c061988_ISO_IEC_14496-12_2012.zip">ISO/IEC 14496-12</a> (ISO BMFF).</p> 
   2.354            <div class="issue"><div class="issue-title"><span>Issue 9</span></div><p class=""><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=18933">Bug 18933</a> - Segment byte boundaries are not defined</p></div>
   2.355  
   2.356  	<section id="iso-init-segments">
   2.357 -          <h4><span class="secno">8.2.1 </span>Initialization Segments</h4>
   2.358 +          <h4><span class="secno">11.2.1 </span>Initialization Segments</h4>
   2.359            <p>An ISO BMFF <a href="#init-segment">initialization segment</a> must contain a single Movie Header Box (<span class="iso-box">moov</span>). The tracks in the Movie Header Box must not contain any samples (i.e. the <span class="iso-var">entry_count</span> in the <span class="iso-box">stts</span>, <span class="iso-box">stsc</span> and <span class="iso-box">stco</span> boxes must be set to zero). A Movie Extends (<span class="iso-box">mvex</span>) box must be contained in the
   2.360  	    Movie Header Box to indicate that Movie Fragments are to be expected.</p>
   2.361            <p>The <a href="#init-segment">initialization segment</a> may contain Edit Boxes (<span class="iso-box">edts</span>) which provide a mapping of composition times for each track to the global presentation time.</p>
   2.362  	</section>
   2.363          
   2.364  	<section id="iso-media-segments">
   2.365 -          <h4><span class="secno">8.2.2 </span>Media Segments</h4>
   2.366 +          <h4><span class="secno">11.2.2 </span>Media Segments</h4>
   2.367            <p>An ISO BMFF <a href="#media-segment">media segment</a> must contain a single Movie Fragment Box (<span class="iso-box">moof</span>) followed by one or more Media Data Boxes (<span class="iso-box">mdat</span>).</p>
   2.368            <p>The following rules apply to ISO BMFF media segments:</p>
   2.369            <ol>
   2.370 @@ -1772,18 +1885,18 @@
   2.371  	</section>
   2.372  
   2.373  	<section id="iso-random-access-points">
   2.374 -          <h4><span class="secno">8.2.3 </span>Random Access Points</h4>
   2.375 +          <h4><span class="secno">11.2.3 </span>Random Access Points</h4>
   2.376            <p>A <a href="#random-access-point">random access point</a> as defined in this specification corresponds to a Stream Access Point of type 1 or 2 as defined in Annex I of <a href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c061988_ISO_IEC_14496-12_2012.zip">ISO/IEC 14496-12</a>.</p>
   2.377  	</section>
   2.378        </section>
   2.379  
   2.380        <section id="mpeg2ts" class="nonnormative">
   2.381 -        <h3><span class="secno">8.3 </span>MPEG-2 Transport Stream Byte Streams</h3>
   2.382 +        <h3><span class="secno">11.3 </span>MPEG-2 Transport Stream Byte Streams</h3>
   2.383          <p>This section defines segment formats for implementations that choose to support MPEG-2 Transport Streams
   2.384            (MPEG-2 TS) specified in <a href="http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=44169">ISO/IEC 13818-1</a>.</p>
   2.385          
   2.386          <section id="mpeg2ts-general">
   2.387 -          <h4><span class="secno">8.3.1 </span>General</h4>
   2.388 +          <h4><span class="secno">11.3.1 </span>General</h4>
   2.389            <p>MPEG-2 TS media and initialization segments must conform to the MPEG-2 TS Adaptive Profile (ISO/IEC 13818-1:2012 Amd. 2).</p>
   2.390            <p>The following rules must apply to all MPEG-2 TS segments:</p>
   2.391            <ol>
   2.392 @@ -1794,13 +1907,13 @@
   2.393            </ol>
   2.394          </section>
   2.395          <section id="mpeg2ts-init-segments">
   2.396 -          <h4><span class="secno">8.3.2 </span>Initialization Segments</h4>
   2.397 +          <h4><span class="secno">11.3.2 </span>Initialization Segments</h4>
   2.398            <p>An MPEG-2 TS initialization segment must contain a single PAT and a single PMT. Other SI, such as CAT, that are invariant for all subsequent
   2.399              media segments, may be present.</p>
   2.400          </section>
   2.401    
   2.402          <section id="mpeg2ts-media-segments">
   2.403 -          <h4><span class="secno">8.3.3 </span>Media Segments</h4>
   2.404 +          <h4><span class="secno">11.3.3 </span>Media Segments</h4>
   2.405            <p>The following rules apply to all MPEG-2 TS media segments:</p>
   2.406            <ol>
   2.407              <li>PSI that is identical to the information in the initialization segment may appear repeatedly throughout the segment.</li>
   2.408 @@ -1814,12 +1927,12 @@
   2.409          </section>
   2.410  
   2.411          <section id="mpeg2ts-random-access-points">
   2.412 -          <h4><span class="secno">8.3.4 </span>Random Access Points</h4>
   2.413 +          <h4><span class="secno">11.3.4 </span>Random Access Points</h4>
   2.414            <p>A random access point as defined in this specification corresponds to Elementary Stream Random Access Point as defined in 
   2.415              <a href="http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=44169">ISO/IEC 13818-1</a>.</p>
   2.416          </section>
   2.417          <section id="mpeg2ts-discontinuities">
   2.418 -          <h4><span class="secno">8.3.5 </span>Timestamp Rollover &amp; Discontinuities</h4>
   2.419 +          <h4><span class="secno">11.3.5 </span>Timestamp Rollover &amp; Discontinuities</h4>
   2.420            <p>Timestamp rollovers and discontinuities must be handled by the UA. The UA's MPEG-2 TS implementation must maintain an internal offset
   2.421            variable, <dfn id="mpeg2ts-timestampOffset">MPEG2TS_timestampOffset</dfn>, to keep track of the offset that needs to be applied to timestamps
   2.422            that have rolled over or are part of a discontinuity. <var>MPEG2TS_timestampOffset</var> is initially set to 0 when the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> is 
   2.423 @@ -1844,7 +1957,7 @@
   2.424  
   2.425  
   2.426      <section id="examples">
   2.427 -      <!--OddPage--><h2><span class="secno">9. </span>Examples</h2>
   2.428 +      <!--OddPage--><h2><span class="secno">12. </span>Examples</h2>
   2.429        <p>Example use of the Media Source Extensions</p>
   2.430        <div class="block">
   2.431          <div class="blockContent">
   2.432 @@ -1934,7 +2047,7 @@
   2.433      </section>
   2.434  
   2.435      <section id="revision-history">
   2.436 -      <!--OddPage--><h2><span class="secno">10. </span>Revision History</h2>
   2.437 +      <!--OddPage--><h2><span class="secno">13. </span>Revision History</h2>
   2.438        <table class="old-table">
   2.439          <thead>
   2.440            <tr>
   2.441 @@ -1944,7 +2057,11 @@
   2.442          </thead>
   2.443          <tbody>
   2.444            <tr>
   2.445 -	    <td>04 January 2013</td>
   2.446 +	    <td>15 January 2013</td>
   2.447 +            <td>Replace setTrackInfo() and getSourceBuffer() with AudioTrack, VideoTrack, and TextTrack extensions.</td>
   2.448 +          </tr>
   2.449 +          <tr>
   2.450 +	    <td><a href="http://dvcs.w3.org/hg/html-media/raw-file/52a85235137b/media-source/media-source.html">04 January 2013</a></td>
   2.451              <td>
   2.452                <ul>
   2.453                  <li>Renamed append() to appendArrayBuffer() and made appending asynchronous.</li>
   2.454 @@ -2104,4 +2221,5 @@
   2.455      </section>
   2.456    
   2.457  
   2.458 -</body></html>
   2.459 +<section id="references" class="appendix"><!--OddPage--><h2><span class="secno">A. </span>References</h2><section id="informative-references"><h3><span class="secno">A.1 </span>Informative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips; M. Davis. <a href="http://tools.ietf.org/html/bcp47"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/html/bcp47">http://tools.ietf.org/html/bcp47</a> 
   2.460 +</dd></dl></section></section></body></html>
     3.1 --- a/media-source/media-source.js	Fri Jan 04 00:00:00 2013 -0800
     3.2 +++ b/media-source/media-source.js	Tue Jan 15 14:19:50 2013 -0800
     3.3 @@ -79,6 +79,9 @@
     3.4      'abort': { func: idlref_helper, fragment: 'widl-SourceBuffer-abort-void', link_text: 'abort()',  },
     3.5      'remove': { func: idlref_helper, fragment: 'widl-SourceBuffer-remove-void-double-start-double-end', link_text: 'remove()',  },
     3.6      'appending': { func: idlref_helper, fragment: 'widl-SourceBuffer-appending', link_text: 'appending',  },
     3.7 +    'sourcebuffer-audioTracks': { func: idlref_helper, fragment: 'widl-SourceBuffer-audioTracks', link_text: 'audioTracks',  },
     3.8 +    'sourcebuffer-videoTracks': { func: idlref_helper, fragment: 'widl-SourceBuffer-videoTracks', link_text: 'videoTracks',  },
     3.9 +    'sourcebuffer-textTracks': { func: idlref_helper, fragment: 'widl-SourceBuffer-textTracks', link_text: 'textTracks',  },
    3.10      'buffered': { func: idlref_helper, fragment: 'widl-SourceBuffer-buffered', link_text: 'buffered',  },
    3.11      'timestampOffset': { func: idlref_helper, fragment: 'widl-SourceBuffer-timestampOffset', link_text: 'timestampOffset',  },
    3.12      'length': { func: idlref_helper, fragment: 'widl-SourceBufferList-length', link_text: 'length',  },
    3.13 @@ -158,11 +161,13 @@
    3.14      'media-src': { func: code_videoref_helper, fragment: 'attr-media-src', link_text: 'src',  },
    3.15      'timerange': { func: code_videoref_helper, fragment: 'timeranges', link_text: 'TimeRange',  },
    3.16      'timeranges': { func: code_videoref_helper, fragment: 'timeranges', link_text: 'TimeRanges',  },
    3.17 +    'tracklist-change': { func: code_videoref_helper, fragment: 'handler-tracklist-onchange', link_text: 'change',  },
    3.18      'video-track': { func: code_videoref_helper, fragment: 'videotrack', link_text: 'VideoTrack',  },
    3.19      'videotrack-id': { func: code_videoref_helper, fragment: 'dom-videotrack-id', link_text: 'id',  },
    3.20      'videotrack-kind': { func: code_videoref_helper, fragment: 'dom-videotrack-kind', link_text: 'kind', },
    3.21      'videotrack-language': { func: code_videoref_helper, fragment: 'dom-videotrack-language', link_text: 'language', },
    3.22      'videotrack-selected': { func: code_videoref_helper, fragment: 'dom-videotrack-selected', link_text: 'selected', },
    3.23 +    'videotrack-sourceBuffer': { func: idlref_helper, fragment: 'widl-VideoTrack-sourceBuffer', link_text: 'sourceBuffer', },
    3.24      'videotracklist-length': { func: code_videoref_helper, fragment: 'dom-videotracklist-length', link_text: 'length',  },
    3.25      'videotracks': { func: code_videoref_helper, fragment: 'dom-media-videotracks', link_text: 'videoTracks',  },
    3.26      'audio-track': { func: code_videoref_helper, fragment: 'audiotrack', link_text: 'AudioTrack',  },
    3.27 @@ -172,6 +177,7 @@
    3.28      'audiotrack-kind': { func: code_videoref_helper, fragment: 'dom-audiotrack-kind', link_text: 'kind', },
    3.29      'audiotrack-language': { func: code_videoref_helper, fragment: 'dom-audiotrack-language', link_text: 'language', },
    3.30      'audiotrack-enabled': { func: code_videoref_helper, fragment: 'dom-audiotrack-enabled', link_text: 'enabled', },
    3.31 +    'audiotrack-sourceBuffer': { func: idlref_helper, fragment: 'widl-AudioTrack-sourceBuffer', link_text: 'sourceBuffer', },
    3.32      'text-track': { func: code_videoref_helper, fragment: 'texttrack', link_text: 'TextTrack',  },
    3.33      'texttracks': { func: code_videoref_helper, fragment: 'dom-media-texttracks', link_text: 'textTracks',  },
    3.34      'texttrack-mode': { func: code_videoref_helper, fragment: 'dom-texttrack-mode', link_text: 'mode',  },
    3.35 @@ -179,6 +185,7 @@
    3.36      'texttrack-language': { func: code_videoref_helper, fragment: 'dom-texttrack-language', link_text: 'language', },
    3.37      'texttrack-showing': { func: code_videoref_helper, fragment: 'dom-texttrack-showing', link_text: '"showing"', },
    3.38      'texttrack-hidden': { func: code_videoref_helper, fragment: 'dom-texttrack-hidden', link_text: '"hidden"',  },
    3.39 +    'texttrack-sourceBuffer': { func: idlref_helper, fragment: 'widl-TextTrack-sourceBuffer', link_text: 'sourceBuffer', },
    3.40      'ready-state': { func: code_videoref_helper, fragment: 'dom-media-readystate', link_text: 'HTMLMediaElement.readyState',  },
    3.41      'have-nothing': { func: code_videoref_helper, fragment: 'dom-media-have_nothing', link_text: 'HAVE_NOTHING',  },
    3.42      'have-metadata': { func: code_videoref_helper, fragment: 'dom-media-have_metadata', link_text: 'HAVE_METADATA',  },