[MSE] Addressing misc bugs filed by Cyril.
authorAaron Colwell <acolwell@chromium.org>
Tue, 01 Apr 2014 14:27:00 -0700
changeset 274 d471a4412040
parent 273 ef65c237d053
child 275 ad3fa6e5b1cf
[MSE] Addressing misc bugs filed by Cyril.
Bug 25157 - Fix typo in coded frame duration example.
Bug 24854 - Moved negative timestamp checking to allow "sequence" mode
to handle appending coded frames in reverse order.
Bug 24820 - Renamed highest presentation end timestamp to group end
timestamp and fixed a few related issues.
media-source/media-source-respec.html
media-source/media-source.html
media-source/media-source.js
--- a/media-source/media-source-respec.html	Tue Apr 01 08:55:10 2014 -0700
+++ b/media-source/media-source-respec.html	Tue Apr 01 14:27:00 2014 -0700
@@ -177,9 +177,14 @@
 
           <dt id="coded-frame-duration">Coded Frame Duration</dt>
           <dd>
-            <p>The duration of a <a def-id="coded-frame"></a>. For video and text, the duration indicates how long the video frame or text should be displayed. For audio, the duration represents the sum of all the samples contained within the coded frame. For example, if an audio frame contained 441 samples @44100Hz the frame duration would be 100 milliseconds.</p>
+            <p>The duration of a <a def-id="coded-frame"></a>. For video and text, the duration indicates how long the video frame or text should be displayed. For audio, the duration represents the sum of all the samples contained within the coded frame. For example, if an audio frame contained 441 samples @44100Hz the frame duration would be 10 milliseconds.</p>
           </dd>
 
+          <dt id="coded-frame-end-timestamp">Coded Frame End Timestamp</dt>
+          <dd>
+            <p>The sum of a <a def-id="coded-frame"></a> <a def-id="presentation-timestamp"></a> and its
+                <a def-id="coded-frame-duration"></a>. It represents the <a def-id="presentation-timestamp"></a> that immediately follows the coded frame.</p>
+          </dd>
 
           <dt id="coded-frame-group">Coded Frame Group</dt>
           <dd><p>A group of <a def-id="coded-frames"></a> that are adjacent and have monotonically increasing <a def-id="decode-timestamps"></a> without any gaps. Discontinuities detected by the
@@ -716,7 +721,7 @@
               <p class="note">This preserves audio frames and text cues that start before and end after the <a def-id="duration"></a>.</p></li>
             <li>If a user agent is unable to partially render audio frames or text cues that start before and end after the <a def-id="duration"></a>, then run the following steps:
               <ol>
-                <li>Update <var>new duration</var> to the highest end timestamp across all <a>SourceBuffer</a> objects in <a def-id="sourceBuffers"></a>.</li>
+                <li>Update <var>new duration</var> to the highest end time reported by the <a def-id="buffered"></a> attribute across all <a>SourceBuffer</a> objects in <a def-id="sourceBuffers"></a>.</li>
                 <li>Update <a def-id="duration"></a> to <var>new duration</var>.</li>
               </ol>
             </li>
@@ -736,7 +741,7 @@
                 <dt>If <var>error</var> is not set, is null, or is an empty string</dt>
                 <dd>
 	          <ol>
-	            <li>Run the <a def-id="duration-change-algorithm"></a> with <var>new duration</var> set to the highest end timestamp across all <a>SourceBuffer</a> objects in <a def-id="sourceBuffers"></a>.<br>
+	            <li>Run the <a def-id="duration-change-algorithm"></a> with <var>new duration</var> set to the highest end time reported by the <a def-id="buffered"></a> attribute across all <a>SourceBuffer</a> objects in <a def-id="sourceBuffers"></a>.<br>
 		      <p class="note">This allows the duration to properly reflect the end of the appended media segments. For example, if the duration was explicitly set to 10 seconds and only media segments for 0 to 5 seconds were appended before endOfStream() was called, then the duration will get updated to 5 seconds.</p>
 	            </li>
 	            <li>Notify the media element that it now has all of the media data.</li>
@@ -815,7 +820,7 @@
               </ol>
             </li>
             <li>If the <a def-id="append-state"></a> equals <a def-id="parsing-media-segment"></a>, then throw an <a def-id="invalid-state-err"></a> and abort these steps.</li>
-            <li>If the <var>new mode</var> equals <a def-id="AppendMode-sequence"></a>, then set the <a def-id="group-start-timestamp"></a> to the <a def-id="highest-presentation-end-timestamp"></a>.</li>
+            <li>If the <var>new mode</var> equals <a def-id="AppendMode-sequence"></a>, then set the <a def-id="group-start-timestamp"></a> to the <a def-id="group-end-timestamp"></a>.</li>
             <li>Update the attribute to <var>new mode</var>.</li>
           </ol>
         </dd>
@@ -1092,10 +1097,13 @@
             <a def-id="timestampOffset"></a> attribute is set, or the <a def-id="coded-frame-processing-algorithm"></a> runs.
           </p>
 
-          <p>The <dfn id="sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</dfn> variable stores the highest presentation
-            end timestamp encountered in the current <a def-id="coded-frame-group"></a>. It is set to 0 when the SourceBuffer object is created and gets updated
+          <p>The <dfn id="sourcebuffer-group-end-timestamp">group end timestamp</dfn> variable stores the
+            highest <a def-id="coded-frame-end-timestamp"></a> across all <a def-id="coded-frames"></a> in
+            the current <a def-id="coded-frame-group"></a>. It is set to 0 when the SourceBuffer object is created and gets updated
             by the <a def-id="coded-frame-processing-algorithm"></a>.
           </p>
+          <p class="note">The <a def-id="group-end-timestamp"></a> stores the highest <a def-id="coded-frame-end-timestamp"></a> across all <a def-id="track-buffers"></a> in a <a>SourceBuffer</a>. Therefore, care should be taken in setting the <a def-id="mode"></a> attribute when appending multiplexed segments in which the timestamps are not aligned across tracks.
+          </p>
 
           <p>When the segment parser loop algorithm is invoked, run the following steps:</p>
 
@@ -1409,7 +1417,7 @@
                 <li>If <a def-id="mode"></a> equals <a def-id="AppendMode-sequence"></a> and <a def-id="group-start-timestamp"></a> is set, then run the following steps:
                   <ol>
                     <li>Set <a def-id="timestampOffset"></a> equal to <a def-id="group-start-timestamp"></a> - <var>presentation timestamp</var>.</li>
-                    <li>Set <a def-id="highest-presentation-end-timestamp"></a> equal to <a def-id="group-start-timestamp"></a>.</li>
+                    <li>Set <a def-id="group-end-timestamp"></a> equal to <a def-id="group-start-timestamp"></a>.</li>
                     <li>Set the <a def-id="need-RAP-flag"></a> on all <a def-id="track-buffers"></a> to true.</li>
                     <li>Unset <a def-id="group-start-timestamp"></a>.</li>
                   </ol>
@@ -1419,8 +1427,6 @@
 	          <ol>
 	            <li>Add <a def-id="timestampOffset"></a> to the <var>presentation timestamp</var>.</li>
 	            <li>Add <a def-id="timestampOffset"></a> to the <var>decode timestamp</var>.</li>
-	            <li>If the <var>presentation timestamp</var> or <var>decode timestamp</var> is less than the <a def-id="presentation-start-time"></a>, 
-                      then run the <a def-id="eos-decode"></a>, and abort these steps.</li>
 	          </ol>
 	        </li>
                 <li>Let <var>track buffer</var> equal the <a def-id="track-buffer"></a> that the coded frame will be added to.</li>
@@ -1436,9 +1442,9 @@
                         <li>
                           <dl class="switch">
                             <dt>If <a def-id="mode"></a> equals <a def-id="AppendMode-segments"></a>:</dt>
-                            <dd>Set <a def-id="highest-presentation-end-timestamp"></a> to <var>presentation timestamp</var>.</dd>
+                            <dd>Set <a def-id="group-end-timestamp"></a> to <var>presentation timestamp</var>.</dd>
                             <dt>If <a def-id="mode"></a> equals <a def-id="AppendMode-sequence"></a>:</dt>
-                            <dd>Set <a def-id="group-start-timestamp"></a> equal to the <a def-id="highest-presentation-end-timestamp"></a>.</dd>
+                            <dd>Set <a def-id="group-start-timestamp"></a> equal to the <a def-id="group-end-timestamp"></a>.</dd>
                           </dl>
                         </li>
                         <li>Unset the <a def-id="last-decode-timestamp"></a> on all <a def-id="track-buffers"></a>.</li>
@@ -1452,6 +1458,8 @@
                     <dd>Continue.</dd>
                   </dl>
                 </li>
+	        <li>If the <var>presentation timestamp</var> or <var>decode timestamp</var> is less than the <a def-id="presentation-start-time"></a>, 
+                  then run the <a def-id="eos-decode"></a>, and abort these steps.</li>
                 <li>Let <var>frame end timestamp</var> equal the sum of <var>presentation timestamp</var> and <var>frame duration</var>.</li>
                 <li>If <var>presentation timestamp</var> is less than <a def-id="appendWindowStart"></a>, then set the <a def-id="need-RAP-flag"></a> to true, drop the
                   coded frame, and jump to the top of the loop to start processing the next coded frame.
@@ -1546,9 +1554,8 @@
                   <p class="note">The greater than check is needed because bidirectional prediction between coded frames can cause
                     <var>presentation timestamp</var> to not be monotonically increasing eventhough the decode timestamps are monotonically increasing.</p>
                 </li>
-                <li>If <a def-id="highest-presentation-end-timestamp"></a> is unset or <var>frame end timestamp</var> is greater than
-                  <a def-id="highest-presentation-end-timestamp"></a>, then set <a def-id="highest-presentation-end-timestamp"></a> equal to
-                  <var>frame end timestamp</var>.</li>
+                <li>If <var>frame end timestamp</var> is greater than <a def-id="group-end-timestamp"></a>,
+                  then set <a def-id="group-end-timestamp"></a> equal to <var>frame end timestamp</var>.</li>
 	      </ol>
             </li>
             <li>
@@ -1574,7 +1581,7 @@
                   <a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="canplaythrough"></a> at the media element.</li>
 	      </ol>
             </li>
-            <li>If the <a def-id="media-segment"></a> contains data beyond the current <a def-id="duration"></a>, then run the <a def-id="duration-change-algorithm"></a> with <var>new duration</var> set to the maximum of the current duration and the highest end timestamp reported by <a def-id="hme-buffered"></a>.</li>
+            <li>If the <a def-id="media-segment"></a> contains data beyond the current <a def-id="duration"></a>, then run the <a def-id="duration-change-algorithm"></a> with <var>new duration</var> set to the maximum of the current duration and the <a def-id="group-end-timestamp"></a>.</li>
           </ol>
         </section>
 
@@ -2271,7 +2278,19 @@
         </thead>
         <tbody>
           <tr>
-            <td>03 March 2014</td>
+            <td>01 April 2014</a></td>
+            <td>
+              <ul>
+                <li>Bug 25157 - Fix typo in coded frame duration example.</li>
+                <li>Bug 24854 - Moved negative timestamp checking to allow "sequence" mode to handle
+                  appending coded frames in reverse order</li>
+                <li>Bug 24820 - Renamed highest presentation end timestamp to group end timestamp and
+                  fixed a few related issues.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/cad94fce3b90/media-source/media-source.html">03 March 2014</a></td>
             <td>
               <ul>
                 <li>Bug 24347 - Fix HAVE_FUTURE_DATA transition condition in SourceBuffer monitoring algorithm.</li>
--- a/media-source/media-source.html	Tue Apr 01 08:55:10 2014 -0700
+++ b/media-source/media-source.html	Tue Apr 01 14:27:00 2014 -0700
@@ -400,7 +400,7 @@
   </p>
   <h1 class="title p-name" id="title" property="dcterms:title">Media Source Extensions</h1>
   
-  <h2 property="dcterms:issued" datatype="xsd:dateTime" content="2014-03-04T07:31:32.000Z" id="w3c-editor-s-draft-03-march-2014"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published" datetime="2014-03-03">03 March 2014</time></h2>
+  <h2 property="dcterms:issued" datatype="xsd:dateTime" content="2014-04-02T06:11:51.000Z" id="w3c-editor-s-draft-01-april-2014"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published" datetime="2014-04-01">01 April 2014</time></h2>
   <dl>
     
       <dt>This version:</dt>
@@ -592,9 +592,14 @@
 
           <dt id="coded-frame-duration">Coded Frame Duration</dt>
           <dd>
-            <p>The duration of a <a href="#coded-frame">coded frame</a>. For video and text, the duration indicates how long the video frame or text should be displayed. For audio, the duration represents the sum of all the samples contained within the coded frame. For example, if an audio frame contained 441 samples @44100Hz the frame duration would be 100 milliseconds.</p>
+            <p>The duration of a <a href="#coded-frame">coded frame</a>. For video and text, the duration indicates how long the video frame or text should be displayed. For audio, the duration represents the sum of all the samples contained within the coded frame. For example, if an audio frame contained 441 samples @44100Hz the frame duration would be 10 milliseconds.</p>
           </dd>
 
+          <dt id="coded-frame-end-timestamp">Coded Frame End Timestamp</dt>
+          <dd>
+            <p>The sum of a <a href="#coded-frame">coded frame</a> <a href="#presentation-timestamp">presentation timestamp</a> and its
+                <a href="#coded-frame-duration">coded frame duration</a>. It represents the <a href="#presentation-timestamp">presentation timestamp</a> that immediately follows the coded frame.</p>
+          </dd>
 
           <dt id="coded-frame-group">Coded Frame Group</dt>
           <dd><p>A group of <a href="#coded-frame">coded frames</a> that are adjacent and have monotonically increasing <a href="#decode-timestamp">decode timestamps</a> without any gaps. Discontinuities detected by the
@@ -794,7 +799,7 @@
             <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>
             <li>If the <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute equals true, then run the following steps:
               <ol>
-                <li>Abort the <a href="#sourcebuffer-buffer-append">buffer append </a> and <a href="#sourcebuffer-stream-append-loop">stream append loop</a> algorithms if they are running.</li>
+                <li>Abort the <a href="#sourcebuffer-buffer-append">buffer append</a> and <a href="#sourcebuffer-stream-append-loop">stream append loop</a> algorithms if they are running.</li>
                 <li>Set the <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute to false.</li>
                 <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-abort">abort</a></code> at <var>sourceBuffer</var>.</li>
                 <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-updateend">updateend</a></code> at <var>sourceBuffer</var>.</li>
@@ -1112,7 +1117,7 @@
               <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_14"><span>Note</span></div><p class="">This preserves audio frames and text cues that start before and end after the <code><a href="#widl-MediaSource-duration">duration</a></code>.</p></div></li>
             <li>If a user agent is unable to partially render audio frames or text cues that start before and end after the <code><a href="#widl-MediaSource-duration">duration</a></code>, then run the following steps:
               <ol>
-                <li>Update <var>new duration</var> to the highest end timestamp across all <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>.</li>
+                <li>Update <var>new duration</var> to the highest end time reported by the <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> attribute across all <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>.</li>
                 <li>Update <code><a href="#widl-MediaSource-duration">duration</a></code> to <var>new duration</var>.</li>
               </ol>
             </li>
@@ -1132,7 +1137,7 @@
                 <dt>If <var>error</var> is not set, is null, or is an empty string</dt>
                 <dd>
 	          <ol>
-	            <li>Run the <a href="#duration-change-algorithm">duration change algorithm</a> with <var>new duration</var> set to the highest end timestamp across all <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>.<br>
+	            <li>Run the <a href="#duration-change-algorithm">duration change algorithm</a> with <var>new duration</var> set to the highest end time reported by the <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> attribute across all <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>.<br>
 		      <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_15"><span>Note</span></div><p class="">This allows the duration to properly reflect the end of the appended media segments. For example, if the duration was explicitly set to 10 seconds and only media segments for 0 to 5 seconds were appended before endOfStream() was called, then the duration will get updated to 5 seconds.</p></div>
 	            </li>
 	            <li>Notify the media element that it now has all of the media data.</li>
@@ -1256,7 +1261,7 @@
               </ol>
             </li>
             <li>If the <var><a href="#sourcebuffer-append-state">append state</a></var> equals <a href="#sourcebuffer-parsing-media-segment">PARSING_MEDIA_SEGMENT</a>, then throw an <code><a href="http://dom.spec.whatwg.org/#dom-domexception-invalid_state_err">INVALID_STATE_ERR</a></code> and abort these steps.</li>
-            <li>If the <var>new mode</var> equals <code><a href="#idl-def-AppendMode.sequence">"sequence"</a></code>, then set the <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var> to the <var><a href="#sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</a></var>.</li>
+            <li>If the <var>new mode</var> equals <code><a href="#idl-def-AppendMode.sequence">"sequence"</a></code>, then set the <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var> to the <var><a href="#sourcebuffer-group-end-timestamp">group end timestamp</a></var>.</li>
             <li>Update the attribute to <var>new mode</var>.</li>
           </ol>
         </dd><dt id="widl-SourceBuffer-textTracks"><code>textTracks</code> of type <span class="idlAttrType">TextTrackList</span>, readonly   </dt><dd>
@@ -1294,7 +1299,7 @@
             <li>If the <code><a href="#widl-MediaSource-readyState">readyState</a></code> attribute of the <a href="#parent-media-source">parent media source</a> is not in the <code><a href="#idl-def-ReadyState.open">"open"</a></code> state 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>
             <li>If the <code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute equals true, then run the following steps:
               <ol>
-                <li>Abort the <a href="#sourcebuffer-buffer-append">buffer append </a> and <a href="#sourcebuffer-stream-append-loop">stream append loop</a> algorithms if they are running.</li>
+                <li>Abort the <a href="#sourcebuffer-buffer-append">buffer append</a> and <a href="#sourcebuffer-stream-append-loop">stream append loop</a> algorithms if they are running.</li>
                 <li>Set the <code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute to false.</li>
                 <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-abort">abort</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
                 <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-updateend">updateend</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
@@ -1316,7 +1321,7 @@
             <li>Add <var>data</var> to the end of the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var>.</li>
             <li>Set the <code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute to true.</li>
             <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-updatestart">updatestart</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
-            <li>Asynchronously run the <a href="#sourcebuffer-buffer-append">buffer append </a> algorithm.</li>
+            <li>Asynchronously run the <a href="#sourcebuffer-buffer-append">buffer append</a> algorithm.</li>
           </ol></dd><dt id="widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize"><code>appendStream</code></dt><dd>
           <p>Appends segment data to the source buffer from a <code><a href="http://www.w3.org/TR/2013/WD-streams-api-20131105/#idl-def-Stream" class="idlType">Stream</a></code>[<cite><a class="bibref" href="#bib-STREAMS-API">STREAMS-API</a></cite>].</p>
 
@@ -1459,10 +1464,13 @@
             <code><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></code> attribute is set, or the <a href="#sourcebuffer-coded-frame-processing">coded frame processing algorithm</a> runs.
           </p>
 
-          <p>The <dfn id="sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</dfn> variable stores the highest presentation
-            end timestamp encountered in the current <a href="#coded-frame-group">coded frame group</a>. It is set to 0 when the SourceBuffer object is created and gets updated
+          <p>The <dfn id="sourcebuffer-group-end-timestamp">group end timestamp</dfn> variable stores the
+            highest <a href="#coded-frame-end-timestamp">coded frame end timestamp</a> across all <a href="#coded-frame">coded frames</a> in
+            the current <a href="#coded-frame-group">coded frame group</a>. It is set to 0 when the SourceBuffer object is created and gets updated
             by the <a href="#sourcebuffer-coded-frame-processing">coded frame processing algorithm</a>.
           </p>
+          <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_16"><span>Note</span></div><p class="">The <var><a href="#sourcebuffer-group-end-timestamp">group end timestamp</a></var> stores the highest <a href="#coded-frame-end-timestamp">coded frame end timestamp</a> across all <a href="#track-buffer">track buffers</a> in a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>. Therefore, care should be taken in setting the <code><a href="#widl-SourceBuffer-mode">mode</a></code> attribute when appending multiplexed segments in which the timestamps are not aligned across tracks.
+          </p></div>
 
           <p>When the segment parser loop algorithm is invoked, run the following steps:</p>
 
@@ -1496,7 +1504,7 @@
 	        <li>If the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var> does not contain a complete <a href="#media-segment">media segment</a> header yet, then jump to the <i>need more data</i> step below.</li>
 	        <li>If the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var> contains one or more complete <a href="#coded-frame">coded frames</a>, then run the
                   <a href="#sourcebuffer-coded-frame-processing">coded frame processing algorithm</a>.
-                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_16"><span>Note</span></div><p class="">
+                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_17"><span>Note</span></div><p class="">
                     The frequency at which the coded frame processing algorithm is run is implementation-specific. The coded frame processing algorithm may
                     be called when the input buffer contains the complete media segment or it may be called multiple times as complete coded frames are
                     added to the input buffer.
@@ -1558,7 +1566,7 @@
             <li>Run the <a href="#sourcebuffer-coded-frame-eviction">coded frame eviction algorithm</a>.</li>
             <li>
               <p>If the <var><a href="#sourcebuffer-buffer-full-flag">buffer full flag</a></var> equals true, then throw a <code><a href="http://dom.spec.whatwg.org/#dom-domexception-quota_exceeded_err">QUOTA_EXCEEDED_ERR</a></code> exception and abort these step.</p>
-              <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_17"><span>Note</span></div><p class="">This is the signal that the implementation was unable to evict enough data to accomodate the append or the append is too big. The web
+              <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_18"><span>Note</span></div><p class="">This is the signal that the implementation was unable to evict enough data to accomodate the append or the append is too big. The web
                 application should use <code><a href="#widl-SourceBuffer-remove-void-double-start-double-end">remove()</a></code> to explicitly free up space and/or reduce the size of the append.</p></div>
             </li>
             </ol>
@@ -1602,7 +1610,7 @@
             <li>Run the <a href="#sourcebuffer-coded-frame-eviction">coded frame eviction algorithm</a>.</li>
             <li>
               <p>If the <var><a href="#sourcebuffer-buffer-full-flag">buffer full flag</a></var> equals true, then run the <a href="#sourcebuffer-append-error">append error algorithm</a> and abort this algorithm.</p>
-              <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_18"><span>Note</span></div><p class="">The web application should use <code><a href="#widl-SourceBuffer-remove-void-double-start-double-end">remove()</a></code> to free up space in the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>.</p></div>
+              <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_19"><span>Note</span></div><p class="">The web application should use <code><a href="#widl-SourceBuffer-remove-void-double-start-double-end">remove()</a></code> to free up space in the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>.</p></div>
             </li>
             <li>Add <var>data</var> to the end of the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var>.</li>
             <li>Run the <a href="#sourcebuffer-segment-parser-loop">segment parser loop</a> algorithm.</li>
@@ -1648,7 +1656,7 @@
               <ol>
                 <li>If the <a href="#init-segment">initialization segment</a> contains tracks with codecs the user agent does not support, then run the <a href="#end-of-stream-algorithm">end of stream algorithm</a> with the <var>error</var> parameter set to <code><a href="#idl-def-EndOfStreamError.decode">"decode"</a></code>
                   and abort these steps.
-                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_19"><span>Note</span></div><p class="">User agents may consider codecs, that would otherwise be supported, as "not supported" here if the codecs were not
+                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_20"><span>Note</span></div><p class="">User agents may consider codecs, that would otherwise be supported, as "not supported" here if the codecs were not
                     specified in the <var>type</var> parameter passed to <code><a href="#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type">addSourceBuffer()</a></code>. <br>
                     For example, MediaSource.isTypeSupported('video/webm;codecs="vp8,vorbis"') may return true, but if
                     <code><a href="#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type">addSourceBuffer()</a></code> was called with 'video/webm;codecs="vp8"' and a Vorbis track appears in the
@@ -1759,12 +1767,12 @@
 	      <p>For each <a href="#coded-frame">coded frame</a> in the <a href="#media-segment">media segment</a> run the following steps:</p>
 	      <ol>
 	        <li><i>Loop Top: </i>Let <var>presentation timestamp</var> be a double precision floating point representation of the coded frame's <a href="#presentation-timestamp">presentation timestamp</a> in seconds.
-                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_20"><span>Note</span></div><p class="">Special processing may be needed to determine the presentation and decode timestamps for timed text frames since this information may not be explicilty
+                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_21"><span>Note</span></div><p class="">Special processing may be needed to determine the presentation and decode timestamps for timed text frames since this information may not be explicilty
                     present in the underlying format or may be dependent on the order of the frames. Some metadata text tracks, like MPEG2-TS PSI data, may only have implied timestamps.
                     Format specific rules for these situations should be in the <a href="#byte-stream-format-specs">byte stream format specifications</a> or in separate extension specifications.</p></div>
                 </li>
 	        <li>Let <var>decode timestamp</var> be a double precision floating point representation of the coded frame's decode timestamp in seconds.
-                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_21"><span>Note</span></div><p class="">Implementations don't have to internally store timestamps in a double precision floating point representation. This
+                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_22"><span>Note</span></div><p class="">Implementations don't have to internally store timestamps in a double precision floating point representation. This
                     representation is used here because it is the represention for timestamps in the HTML spec. The intention here is to make the
                     behavior clear without adding unnecessary complexity to the algorithm to deal with the fact that adding a timestampOffset may
                     cause a timestamp rollover in the underlying timestamp representation used by the byte stream format. Implementations can use any
@@ -1776,7 +1784,7 @@
                 <li>If <code><a href="#widl-SourceBuffer-mode">mode</a></code> equals <code><a href="#idl-def-AppendMode.sequence">"sequence"</a></code> and <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var> is set, then run the following steps:
                   <ol>
                     <li>Set <code><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></code> equal to <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var> - <var>presentation timestamp</var>.</li>
-                    <li>Set <var><a href="#sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</a></var> equal to <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var>.</li>
+                    <li>Set <var><a href="#sourcebuffer-group-end-timestamp">group end timestamp</a></var> equal to <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var>.</li>
                     <li>Set the <var><a href="#need-RAP-flag">need random access point flag</a></var> on all <a href="#track-buffer">track buffers</a> to true.</li>
                     <li>Unset <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var>.</li>
                   </ol>
@@ -1786,8 +1794,6 @@
 	          <ol>
 	            <li>Add <code><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></code> to the <var>presentation timestamp</var>.</li>
 	            <li>Add <code><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></code> to the <var>decode timestamp</var>.</li>
-	            <li>If the <var>presentation timestamp</var> or <var>decode timestamp</var> is less than the <a href="#presentation-start-time">presentation start time</a>, 
-                      then run the <a href="#end-of-stream-algorithm">end of stream algorithm</a> with the <var>error</var> parameter set to <code><a href="#idl-def-EndOfStreamError.decode">"decode"</a></code>, and abort these steps.</li>
 	          </ol>
 	        </li>
                 <li>Let <var>track buffer</var> equal the <a href="#track-buffer">track buffer</a> that the coded frame will be added to.</li>
@@ -1803,9 +1809,9 @@
                         <li>
                           <dl class="switch">
                             <dt>If <code><a href="#widl-SourceBuffer-mode">mode</a></code> equals <code><a href="#idl-def-AppendMode.segments">"segments"</a></code>:</dt>
-                            <dd>Set <var><a href="#sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</a></var> to <var>presentation timestamp</var>.</dd>
+                            <dd>Set <var><a href="#sourcebuffer-group-end-timestamp">group end timestamp</a></var> to <var>presentation timestamp</var>.</dd>
                             <dt>If <code><a href="#widl-SourceBuffer-mode">mode</a></code> equals <code><a href="#idl-def-AppendMode.sequence">"sequence"</a></code>:</dt>
-                            <dd>Set <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var> equal to the <var><a href="#sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</a></var>.</dd>
+                            <dd>Set <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var> equal to the <var><a href="#sourcebuffer-group-end-timestamp">group end timestamp</a></var>.</dd>
                           </dl>
                         </li>
                         <li>Unset the <var><a href="#last-decode-timestamp">last decode timestamp</a></var> on all <a href="#track-buffer">track buffers</a>.</li>
@@ -1819,10 +1825,12 @@
                     <dd>Continue.</dd>
                   </dl>
                 </li>
+	        <li>If the <var>presentation timestamp</var> or <var>decode timestamp</var> is less than the <a href="#presentation-start-time">presentation start time</a>, 
+                  then run the <a href="#end-of-stream-algorithm">end of stream algorithm</a> with the <var>error</var> parameter set to <code><a href="#idl-def-EndOfStreamError.decode">"decode"</a></code>, and abort these steps.</li>
                 <li>Let <var>frame end timestamp</var> equal the sum of <var>presentation timestamp</var> and <var>frame duration</var>.</li>
                 <li>If <var>presentation timestamp</var> is less than <code><a href="#widl-SourceBuffer-appendWindowStart">appendWindowStart</a></code>, then set the <var><a href="#need-RAP-flag">need random access point flag</a></var> to true, drop the
                   coded frame, and jump to the top of the loop to start processing the next coded frame.
-                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_22"><span>Note</span></div><p class="">Some implementations may choose to collect some of these coded frames that are outside the <a href="#append-window">append window</a> and use them
+                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_23"><span>Note</span></div><p class="">Some implementations may choose to collect some of these coded frames that are outside the <a href="#append-window">append window</a> and use them
                     to generate a splice at the first coded frame that has a <a href="#presentation-timestamp">presentation timestamp</a> greater than or equal to <code><a href="#widl-SourceBuffer-appendWindowStart">appendWindowStart</a></code> even if
                     that frame is not a <a href="#random-access-point">random access point</a>. Supporting this requires multiple decoders or faster than real-time decoding so for now
                     this behavior will not be a normative requirement.
@@ -1853,7 +1861,7 @@
                             <li>Let <var>remove window timestamp</var> equal <var>overlapped frame presentation timestamp</var> plus 1 microsecond.</li>
                             <li>If the <var>presentation timestamp</var> is less than the <var>remove window timestamp</var>, then remove <var>overlapped frame</var> and any
                               <a href="#coded-frame">coded frames</a> that depend on it from <var>track buffer</var>.
-                              <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_23"><span>Note</span></div><p class="">
+                              <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_24"><span>Note</span></div><p class="">
                                 This is to compensate for minor errors in frame timestamp computations that can appear when converting back and forth between double precision
                                 floating point numbers and rationals. This tolerance allows a frame to replace an existing one as long as it is within 1 microsecond of the existing
                                 frame's start time. Frames that come slightly before an existing frame are handled by the removal step below.
@@ -1882,14 +1890,14 @@
                     <dt>If detailed information about decoding dependencies is available:</dt>
                     <dd>Remove all <a href="#coded-frame">coded frames</a> from <var>track buffer</var> that have decoding dependencies on the coded frames removed in
                       the previous step.
-                      <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_24"><span>Note</span></div><p class="">For example if an I-frame is removed in the previous step, then all P-frames &amp; B-frames that depend on that I-frame
+                      <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_25"><span>Note</span></div><p class="">For example if an I-frame is removed in the previous step, then all P-frames &amp; B-frames that depend on that I-frame
                         should be removed from <var>track buffer</var>. This makes sure that decode dependencies are properly maintained during overlaps.
                       </p></div>
                     </dd>
                     <dt>Otherwise:</dt>
                     <dd>Remove all <a href="#coded-frame">coded frames</a> between the coded frames removed in the previous step and the next
                       <a href="#random-access-point">random access point</a> after those removed frames.
-                      <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_25"><span>Note</span></div><p class="">Removing all <a href="#coded-frame">coded frames</a> until the next <a href="#random-access-point">random access point</a> is a conservative
+                      <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_26"><span>Note</span></div><p class="">Removing all <a href="#coded-frame">coded frames</a> until the next <a href="#random-access-point">random access point</a> is a conservative
                         estimate of the decoding dependencies since it assumes all frames between the removed frames and the next random access point
                         depended on the frames that were removed.
                       </p></div>
@@ -1910,12 +1918,11 @@
                 <li>If <var><a href="#highest-presentation-timestamp">highest presentation timestamp</a></var> for <var>track buffer</var> is unset or <var>frame end timestamp</var> is greater
                   than <var><a href="#highest-presentation-timestamp">highest presentation timestamp</a></var>, then set <var><a href="#highest-presentation-timestamp">highest presentation timestamp</a></var> for <var>track buffer</var>
                   to <var>frame end timestamp</var>.
-                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_26"><span>Note</span></div><p class="">The greater than check is needed because bidirectional prediction between coded frames can cause
+                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_27"><span>Note</span></div><p class="">The greater than check is needed because bidirectional prediction between coded frames can cause
                     <var>presentation timestamp</var> to not be monotonically increasing eventhough the decode timestamps are monotonically increasing.</p></div>
                 </li>
-                <li>If <var><a href="#sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</a></var> is unset or <var>frame end timestamp</var> is greater than
-                  <var><a href="#sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</a></var>, then set <var><a href="#sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</a></var> equal to
-                  <var>frame end timestamp</var>.</li>
+                <li>If <var>frame end timestamp</var> is greater than <var><a href="#sourcebuffer-group-end-timestamp">group end timestamp</a></var>,
+                  then set <var><a href="#sourcebuffer-group-end-timestamp">group end timestamp</a></var> equal to <var>frame end timestamp</var>.</li>
 	      </ol>
             </li>
             <li>
@@ -1941,7 +1948,7 @@
                   <a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#event-media-canplaythrough">canplaythrough</a></code> at the media element.</li>
 	      </ol>
             </li>
-            <li>If the <a href="#media-segment">media segment</a> contains data beyond the current <code><a href="#widl-MediaSource-duration">duration</a></code>, then run the <a href="#duration-change-algorithm">duration change algorithm</a> with <var>new duration</var> set to the maximum of the current duration and the highest end timestamp reported by <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-buffered">HTMLMediaElement.buffered</a></code>.</li>
+            <li>If the <a href="#media-segment">media segment</a> contains data beyond the current <code><a href="#widl-MediaSource-duration">duration</a></code>, then run the <a href="#duration-change-algorithm">duration change algorithm</a> with <var>new duration</var> set to the maximum of the current duration and the <var><a href="#sourcebuffer-group-end-timestamp">group end timestamp</a></var>.</li>
           </ol>
         </section>
 
@@ -1957,7 +1964,7 @@
                 <li>
                   <p>If this <a href="#track-buffer">track buffer</a> has a <a href="#random-access-point">random access point</a> timestamp that is greater than or equal to
                     <var>end</var>, then update <var>remove end timestamp</var> to that random access point timestamp.</p>
-	          <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_27"><span>Note</span></div><p class="">Random access point timestamps can be different across tracks because the dependencies between <a href="#coded-frame">coded frames</a> within a
+	          <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_28"><span>Note</span></div><p class="">Random access point timestamps can be different across tracks because the dependencies between <a href="#coded-frame">coded frames</a> within a
                     track are usually different than the dependencies in another track.</p></div>
                 </li>
 	        <li>Remove all media data, from this <a href="#track-buffer">track buffer</a>, that contain starting timestamps greater than or equal to
@@ -1966,7 +1973,7 @@
                   <p>If this object is in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>, the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#current-playback-position">current playback position</a> is greater than or equal to
                     <var>start</var> and less than the <var>remove end timestamp</var>, and <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> is greater than
                     <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_metadata">HAVE_METADATA</a></code>, then set the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_metadata">HAVE_METADATA</a></code> and stall playback.</p>
-                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_28"><span>Note</span></div><p class="">This transition occurs because media data for the current position has been removed. Playback cannot progress until media for the
+                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_29"><span>Note</span></div><p class="">This transition occurs because media data for the current position has been removed. Playback cannot progress until media for the
                     <a href="http://www.w3.org/TR/html5/embedded-content-0.html#current-playback-position">current playback position</a> is appended or the <a href="#active-source-buffer-changes">selected/enabled tracks change</a>.</p></div>
                 </li>
 	      </ol>
@@ -1984,7 +1991,7 @@
             <li>If the <var><a href="#sourcebuffer-buffer-full-flag">buffer full flag</a></var> equals false, then abort these steps.</li>
             <li>Let <var>removal ranges</var> equal a list of presentation time ranges that can be evicted from the presentation to make room for the
               <var>new data</var>.
-              <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_29"><span>Note</span></div><p class="">Implementations may use different methods for selecting <var>removal ranges</var> so web applications should not depend on a
+              <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_30"><span>Note</span></div><p class="">Implementations may use different methods for selecting <var>removal ranges</var> so web applications should not depend on a
                 specific behavior. The web application can use the <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> attribute to observe whether portions of the buffered data have been evicted.
               </p></div>
             </li>
@@ -2008,7 +2015,7 @@
             <li>Update <var>presentation timestamp</var> and <var>decode timestamp</var> to the nearest audio sample timestamp based on sample rate of the 
               audio in <var>overlapped frame</var>. If a timestamp is equidistant from both audio sample timestamps, then use the higher timestamp. (eg.
               floor(x * sample_rate + 0.5) / sample_rate).
-              <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_30"><span>Note</span></div><div class="">
+              <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_31"><span>Note</span></div><div class="">
                 <p>For example, given the following values:</p>
                 <ul>
                   <li>The <a href="#presentation-timestamp">presentation timestamp</a> of <var>overlapped frame</var> equals 10.</li>
@@ -2029,13 +2036,13 @@
                     <li>The <a href="#decode-timestamp">decode timestamp</a> set to the <var>overlapped frame</var> <a href="#decode-timestamp">decode timestamp</a>.</li>
                     <li>The <a href="#coded-frame-duration">coded frame duration</a> set to difference between <var>presentation timestamp</var> and the <var>overlapped frame</var> <a href="#presentation-timestamp">presentation timestamp</a>.</li>
                   </ul>
-                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_31"><span>Note</span></div><p class="">
+                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_32"><span>Note</span></div><p class="">
                     Some implementations may apply fades to/from silence to coded frames on either side of the inserted silence to make the transition less
                     jarring.
                   </p></div>
                 </li>
                 <li>Return to caller without providing a splice frame.
-                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_32"><span>Note</span></div><p class="">
+                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_33"><span>Note</span></div><p class="">
                     This is intended to allow <var>new coded frame</var> to be added to the <var>track buffer</var> as if
                     <var>overlapped frame</var> had not been in the <var>track buffer</var> to begin with.
                   </p></div>
@@ -2054,12 +2061,12 @@
                 <li>The <a href="#coded-frame-duration">coded frame duration</a> set to difference between <var>frame end timestamp</var> and the <var>overlapped frame</var> <a href="#presentation-timestamp">presentation timestamp</a>.</li>
                 <li>The fade out coded frames equals <var>fade-out coded frames</var>.</li>
                 <li>The fade in coded frame equal <var>new coded frame</var>.
-                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_33"><span>Note</span></div><p class="">If the <var>new coded frame</var> is less than 5 milliseconds in duration, then coded frames that are appended after the
+                  <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_34"><span>Note</span></div><p class="">If the <var>new coded frame</var> is less than 5 milliseconds in duration, then coded frames that are appended after the
                     <var>new coded frame</var> will be needed to properly render the splice.</p></div>
                 </li>
                 <li>The splice timestamp equals <var>presentation timestamp</var>.</li>
               </ul>
-              <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_34"><span>Note</span></div><p class="">See the <a href="#sourcebuffer-audio-splice-rendering-algorithm">audio splice rendering algorithm</a> for details on how this splice frame is rendered.</p></div>
+              <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_35"><span>Note</span></div><p class="">See the <a href="#sourcebuffer-audio-splice-rendering-algorithm">audio splice rendering algorithm</a> for details on how this splice frame is rendered.</p></div>
             </li>
           </ol>
         </section>
@@ -2091,7 +2098,7 @@
             <li>Copy samples between <var>splice end timestamp</var> to <var>end timestamp</var> from <var>fade in samples</var> into <var>output samples</var>.</li>
             <li>Render <var>output samples</var>.</li>
           </ol>
-          <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_35"><span>Note</span></div><div class="">
+          <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_36"><span>Note</span></div><div class="">
             <p>Here is a graphical representation of this algorithm.</p>
             <img src="audio_splice.png" alt="Audio splice diagram">
           </div></div>
@@ -2116,7 +2123,7 @@
             </li><li>Update the <a href="#coded-frame-duration">coded frame duration</a> of the <var>first overlapped frame</var> to <var>presentation timestamp</var> - <var>overlapped presentation timestamp</var>.</li>
             <li>Add <var>first overlapped frame</var> to the <var>track buffer</var>.
             </li><li>Return to caller without providing a splice frame.
-              <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_36"><span>Note</span></div><p class="">This is intended to allow <var>new coded frame</var> to be added to the <var>track buffer</var> as if
+              <div class="note"><div class="note-title" aria-level="4" role="heading" id="h_note_37"><span>Note</span></div><p class="">This is intended to allow <var>new coded frame</var> to be added to the <var>track buffer</var> as if
                 it hadn't overlapped any frames in <var>track buffer</var> to begin with.</p></div>
             </li>
           </ol>
@@ -2201,7 +2208,7 @@
           <p>Creates URLs for <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> objects.</p>
 
           
-          <div class="note"><div class="note-title" aria-level="3" role="heading" id="h_note_37"><span>Note</span></div><p class="">This algorithm is intended to mirror the behavior of the <a href="http://www.w3.org/TR/FileAPI/#dfn-createObjectURL">createObjectURL()</a>[<cite><a class="bibref" href="#bib-FILE-API">FILE-API</a></cite>] method with autoRevoke set to true.</p></div>
+          <div class="note"><div class="note-title" aria-level="3" role="heading" id="h_note_38"><span>Note</span></div><p class="">This algorithm is intended to mirror the behavior of the <a href="http://www.w3.org/TR/FileAPI/#dfn-createObjectURL">createObjectURL()</a>[<cite><a class="bibref" href="#bib-FILE-API">FILE-API</a></cite>] method with autoRevoke set to true.</p></div>
         <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">mediaSource</td><td class="prmType"><code><a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a></code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr></tbody></table><div><em>Return type: </em><code>DOMString</code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
             <li>If <var>mediaSource</var> is NULL the return null.</li>
             <li>Return a unique <a href="#mediasource-object-url">MediaSource object URL</a> that can be used to dereference the <var>mediaSource</var> argument, and run the rest of the algorithm asynchronously.</li>
@@ -2429,9 +2436,9 @@
         mappings for byte stream formats they support to facilitate interoperability. The <a href="byte-stream-format-registry.html">byte stream format registry</a> is the authoritative source for these
         mappings. If an implementation claims to support a MIME type listed in the registry, its <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> implementation must conform to the
         <a href="#byte-stream-format-specs">byte stream format specification</a> listed in the registry entry.</p>
-      <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_38"><span>Note</span></div><p class="">The byte stream format specifications in the registry are not intended to define new storage formats. They simply outline the subset of
+      <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_39"><span>Note</span></div><p class="">The byte stream format specifications in the registry are not intended to define new storage formats. They simply outline the subset of
         existing storage format structures that implementations of this specification will accept.</p></div>
-      <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_39"><span>Note</span></div><p class="">Byte stream format parsing and validation is implemented in the <a href="#sourcebuffer-segment-parser-loop">segment parser loop</a> algorithm.</p></div>
+      <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_40"><span>Note</span></div><p class="">Byte stream format parsing and validation is implemented in the <a href="#sourcebuffer-segment-parser-loop">segment parser loop</a> algorithm.</p></div>
 
       <p>This section provides general requirements for all byte stream format specifications:</p>
       <ul>
@@ -2441,12 +2448,12 @@
           <ol>
             <li>
               <p>The number and type of tracks are not consistent.</p>
-              <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_40"><span>Note</span></div><p class="">For example, if the first <a href="#init-segment">initialization segment</a> has 2 audio tracks and 1 video track, then all <a href="#init-segment">initialization segments</a> that follow it in the byte stream must describe 2 audio tracks and 1 video track.</p></div>
+              <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_41"><span>Note</span></div><p class="">For example, if the first <a href="#init-segment">initialization segment</a> has 2 audio tracks and 1 video track, then all <a href="#init-segment">initialization segments</a> that follow it in the byte stream must describe 2 audio tracks and 1 video track.</p></div>
             </li>
             <li><a href="#track-id">Track IDs</a> are not the same across <a href="#init-segment">initialization segments</a>, for segments describing multiple tracks of a single type. (e.g. 2 audio tracks).</li>
 	    <li>
               <p>Codecs changes across <a href="#init-segment">initialization segments</a>.</p>
-              <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_41"><span>Note</span></div><p class="">For example, a byte stream that starts with an <a href="#init-segment">initialization segment</a> that specifies a single AAC track and later contains an <a href="#init-segment">initialization segment</a> that specifies a single AMR-WB track is not allowed. Support for multiple codecs is handled with multiple <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects.</p></div>
+              <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_42"><span>Note</span></div><p class="">For example, a byte stream that starts with an <a href="#init-segment">initialization segment</a> that specifies a single AAC track and later contains an <a href="#init-segment">initialization segment</a> that specifies a single AMR-WB track is not allowed. Support for multiple codecs is handled with multiple <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects.</p></div>
             </li>
           </ol>
         </li>
@@ -2455,11 +2462,11 @@
             <li><a href="#track-id">Track IDs</a> changing across <a href="#init-segment">initialization segments</a> if the segments describes only one track of each type.</li>
 	    <li>
               <p>Video frame size changes. The user agent must support seamless playback.</p>
-              <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_42"><span>Note</span></div><p class="">This will cause the &lt;video&gt; display region to change size if the web application does not use CSS or HTML attributes (width/height) to constrain the element size.</p></div>
+              <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_43"><span>Note</span></div><p class="">This will cause the &lt;video&gt; display region to change size if the web application does not use CSS or HTML attributes (width/height) to constrain the element size.</p></div>
             </li>
 	    <li>
               <p>Audio channel count changes. The user agent may support this seamlessly and could trigger downmixing.</p>
-              <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_43"><span>Note</span></div><p class="">This is a quality of implementation issue because changing the channel count may require reinitializing the audio device, resamplers, and channel mixers which tends to be audible.</p></div>
+              <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_44"><span>Note</span></div><p class="">This is a quality of implementation issue because changing the channel count may require reinitializing the audio device, resamplers, and channel mixers which tends to be audible.</p></div>
             </li>
           </ol>
         </li>
@@ -2467,7 +2474,7 @@
           <ol>
             <li>Map all timestamps to the same <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-timeline">media timeline</a>.</li>
             <li>Support seamless playback of <a href="#media-segment">media segments</a> having a timestamp gap smaller than the audio frame size. User agent must not reflect these gaps in the <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> attribute.
-	      <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_44"><span>Note</span></div><p class="">This is intended to simplify switching between audio streams where the frame boundaries don't always line up across encodings (e.g. Vorbis).</p></div>
+	      <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_45"><span>Note</span></div><p class="">This is intended to simplify switching between audio streams where the frame boundaries don't always line up across encodings (e.g. Vorbis).</p></div>
             </li>
           </ol>
         </li>
@@ -2609,7 +2616,19 @@
         </thead>
         <tbody>
           <tr>
-            <td>03 March 2014</td>
+            <td>01 April 2014</td>
+            <td>
+              <ul>
+                <li>Bug 25157 - Fix typo in coded frame duration example.</li>
+                <li>Bug 24854 - Moved negative timestamp checking to allow "sequence" mode to handle
+                  appending coded frames in reverse order</li>
+                <li>Bug 24820 - Renamed highest presentation end timestamp to group end timestamp and
+                  fixed a few related issues.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/cad94fce3b90/media-source/media-source.html">03 March 2014</a></td>
             <td>
               <ul>
                 <li>Bug 24347 - Fix HAVE_FUTURE_DATA transition condition in SourceBuffer monitoring algorithm.</li>
--- a/media-source/media-source.js	Tue Apr 01 08:55:10 2014 -0700
+++ b/media-source/media-source.js	Tue Apr 01 14:27:00 2014 -0700
@@ -186,6 +186,7 @@
     'coded-frames': { func: term_helper, fragment: 'coded-frame', link_text: 'coded frames', },
     'coded-frame-duration': { func: term_helper, fragment: 'coded-frame-duration', link_text: 'coded frame duration', },
     'coded-frames-duration': { func: term_helper, fragment: 'coded-frame-duration', link_text: 'coded frame\'s duration', },
+    'coded-frame-end-timestamp': { func: term_helper, fragment: 'coded-frame-end-timestamp', link_text: 'coded frame end timestamp', },
     'parent-media-source': { func: term_helper, fragment: 'parent-media-source', link_text: 'parent media source', },
     'coded-frame-group': { func: term_helper, fragment: 'coded-frame-group', link_text: 'coded frame group', },
     'decode-timestamp': { func: term_helper, fragment: 'decode-timestamp', link_text: 'decode timestamp', },
@@ -226,7 +227,7 @@
     'input-buffer': { func: var_helper, fragment: '#sourcebuffer-input-buffer', link_text: 'input buffer', },
     'buffer-full-flag': { func: var_helper, fragment: '#sourcebuffer-buffer-full-flag', link_text: 'buffer full flag', },
     'group-start-timestamp': { func: var_helper, fragment: '#sourcebuffer-group-start-timestamp', link_text: 'group start timestamp', },
-    'highest-presentation-end-timestamp': { func: var_helper, fragment: '#sourcebuffer-highest-presentation-end-timestamp', link_text: 'highest presentation end timestamp', },
+    'group-end-timestamp': { func: var_helper, fragment: '#sourcebuffer-group-end-timestamp', link_text: 'group end timestamp', },
     'MediaSource-object-URL': { func: link_helper, fragment: '#mediasource-object-url', link_text: 'MediaSource object URL', },
     'first-init-segment-flag': { func: var_helper, fragment: '#first-init-segment-flag', link_text: 'first initialization segment flag', },