Fix a bunch of MSE pre-LC bugs.
authorAaron Colwell <acolwell@chromium.org>
Sat, 01 Jun 2013 12:58:28 -0700
changeset 130 1ac9c2205a7b
parent 129 fc9e628b538f
child 131 69dbfb8baca8
Fix a bunch of MSE pre-LC bugs.

Bug 21431 - Updated coded frame processing algorithm for text splicing
Bug 22035 - Update addtrack and removetrack event firing text to match HTML5 language.
Bug 22111 - Remove useless playback sentence from end of stream algorithm.
Bug 22052 - Add corrupted frame metric.
Bug 22062 - Added links for filing bugs.
Bug 22125 - Add "ended" to "open" transition to remove().
Bug 22143 - Move HTMLMediaElement.playbackQuality to HTMLVideoElement.videoPlaybackQuality.
media-source/media-source-respec.html
media-source/media-source.html
media-source/media-source.js
--- a/media-source/media-source-respec.html	Tue May 28 07:57:17 2013 -0700
+++ b/media-source/media-source-respec.html	Sat Jun 01 12:58:28 2013 -0700
@@ -59,7 +59,7 @@
           SourceBuffer: function() {},
           SourceBufferList: function() {},
           AppendMode: function() {},
-          MediaPlaybackQuality: function() {},
+          VideoPlaybackQuality: function() {},
           Stream: function() {},
           ArrayBuffer: function() {},
           ArrayBufferView: function() {},
@@ -67,6 +67,11 @@
       postProcess: [ mediaSourcePostProcessor ]
       };
     </script>
+    <!-- script to register bugs -->
+    <script src="https://dvcs.w3.org/hg/webcomponents/raw-file/tip/assets/scripts/bug-assist.js"></script>
+    <meta name="bug.short_desc" content="[MSE] ">
+    <meta name="bug.product" content="HTML WG">
+    <meta name="bug.component" content="Media Source Extensions">
 
     <style type="text/css">
       .nonnormative { color: green; margin: 2em 0 2em 0em; padding: 0.5em 1em; border: none; background: #DDFFDD; }
@@ -89,28 +94,38 @@
       p + * > li, dd li { margin: 1em 0; }
 
       @media screen { code :link, code :visited { color: inherit; } }
+
+      /* fix bug entry form styling */
+      body > form {
+      padding: 4px;
+      border: 1px solid red;
+      background-color: white;
     </style>
   </head>
   <body>
-    
+
     <section id="sotd">
         <p>The working groups maintains <a href="http://w3.org/brief/Mjcw">a list of all bug reports that the editors have not yet tried to address</a>. This draft highlights some of the pending issues that are still to be discussed in the working group. No decision has been taken on the outcome of these issues including whether they are valid.</p>
         <p>Implementors should be aware that this specification is not stable. <strong>Implementors who are not taking part in the discussions are likely to find the specification changing out from under them in incompatible ways.</strong> Vendors interested in implementing this specification before it eventually reaches the Candidate Recommendation stage should join the mailing list mentioned below and take part in the discussions.</p>
     </section>
 
     <section id="abstract">
-      This specification extends HTMLMediaElement to allow 
-      JavaScript to generate media streams for playback. 
-      Allowing JavaScript to generate streams facilitates a variety of use 
+      This specification extends HTMLMediaElement to allow
+      JavaScript to generate media streams for playback.
+      Allowing JavaScript to generate streams facilitates a variety of use
       cases like adaptive streaming and time shifting live streams.
+
+      <p>If you wish to make comments or file bugs regarding this document in a manner that is tracked by the W3C, please submit them via
+        <a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=HTML%20WG&component=Media%20Source%20Extensions&short_desc=%5BMSE%5D%20">our public bug database</a>.
+      </p>
     </section>
 
 
     <section id="introduction">
       <h2>Introduction</h2>
-      <p>This specification allows JavaScript to dynamically construct media streams for &lt;audio&gt; and &lt;video&gt;. 
+      <p>This specification allows JavaScript to dynamically construct media streams for &lt;audio&gt; and &lt;video&gt;.
         It defines objects that allow JavaScript to pass media segments to an <a def-id="videoref" name="htmlmediaelement">HTMLMediaElement</a> [[HTML5]].
-        A buffering model is also included to describe how the user agent should act when different media segments are 
+        A buffering model is also included to describe how the user agent acts when different media segments are
         appended at different times. Byte stream specifications for WebM, ISO Base Media File Format, and MPEG-2 Transport Streams are given to specify the
         expected format of byte streams used with these extensions.</p>
       <img src="pipeline_model.png" alt="Media Source Pipeline Model Diagram">
@@ -146,7 +161,7 @@
             the <a def-id="appendWindowStart"></a> and <a def-id="appendWindowEnd"></a> attributes respectively.</p></dd>
 
           <dt id="coded-frame">Coded Frame</dt>
-          <dd><p>A unit of media data that has a presentation timestamp and decode timestamp. The presentation timestamp indicates when the frame should be rendered. The decode timestamp indicates when the frame needs to be decoded. If frames can be decoded out of order, then the decode timestamp must be present in the bytestream. If frames cannot be decoded out of order and a decode timestamp is not present in the bytestream, then the decode timestamp is equal to the presentation timestamp.</p></dd>
+          <dd><p>A unit of media data that has a presentation timestamp and decode timestamp. The presentation timestamp indicates when the frame must be rendered. The decode timestamp indicates when the frame needs to be decoded. If frames can be decoded out of order, then the decode timestamp must be present in the bytestream. If frames cannot be decoded out of order and a decode timestamp is not present in the bytestream, then the decode timestamp is equal to the presentation timestamp.</p></dd>
 
           <dt id="coded-frame-sequence">Coded Frame Sequence</dt>
           <dd><p>A sequence of <a def-id="coded-frames"></a> that are adjacent and monotonically increasing in decode time without any gaps. Discontinuities detected by the
@@ -311,9 +326,9 @@
                     <li>If the <a def-id="audiotrack-enabled"></a> attribute on the <a def-id="audio-track"></a> object is true, then
                       set the <var>removed enabled audio track flag</var> to true.</li>
                     <li>Remove the <a def-id="audio-track"></a> object from the <var>HTMLMediaElement audioTracks list</var>.</li>
-                    <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-removetrack"></a> at the <var>HTMLMediaElement audioTracks list</var>.</li>
+                    <li><a def-id="Queue-and-fire-removetrack"></a> at the <var>HTMLMediaElement audioTracks list</var>.</li>
                     <li>Remove the <a def-id="audio-track"></a> object from the <var>SourceBuffer audioTracks list</var>.</li>
-                    <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-removetrack"></a> at the <var>SourceBuffer audioTracks list</var>.</li>
+                    <li><a def-id="Queue-and-fire-removetrack"></a> at the <var>SourceBuffer audioTracks list</var>.</li>
                   </ol>
                 </li>
                 <li>If the <var>removed enabled audio track flag</var> equals true, then <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at the
@@ -332,9 +347,9 @@
                     <li>If the <a def-id="videotrack-selected"></a> attribute on the <a def-id="video-track"></a> object is true, then
                       set the <var>removed selected video track flag</var> to true.</li>
                     <li>Remove the <a def-id="video-track"></a> object from the <var>HTMLMediaElement videoTracks list</var>.</li>
-                    <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-removetrack"></a> at the <var>HTMLMediaElement videoTracks list</var>.</li>
+                    <li><a def-id="Queue-and-fire-removetrack"></a> at the <var>HTMLMediaElement videoTracks list</var>.</li>
                     <li>Remove the <a def-id="video-track"></a> object from the <var>SourceBuffer videoTracks list</var>.</li>
-                    <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-removetrack"></a> at the <var>SourceBuffer videoTracks list</var>.</li>
+                    <li><a def-id="Queue-and-fire-removetrack"></a> at the <var>SourceBuffer videoTracks list</var>.</li>
                   </ol>
                 </li>
                 <li>If the <var>removed selected video track flag</var> equals true, then <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at the
@@ -354,9 +369,9 @@
                     <li>If the <a def-id="texttrack-mode"></a> attribute on the <a def-id="text-track"></a> object is set to  <a def-id="texttrack-showing"></a> or
                       <a def-id="texttrack-hidden"></a> , then set the <var>removed enabled text track flag</var> to true.</li>
                     <li>Remove the <a def-id="text-track"></a> object from the <var>HTMLMediaElement textTracks list</var>.</li>
-                    <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-removetrack"></a> at the <var>HTMLMediaElement textTracks list</var>.</li>
+                    <li><a def-id="Queue-and-fire-removetrack"></a> at the <var>HTMLMediaElement textTracks list</var>.</li>
                     <li>Remove the <a def-id="text-track"></a> object from the <var>SourceBuffer textTracks list</var>.</li>
-                    <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-removetrack"></a> at the <var>SourceBuffer textTracks list</var>.</li>
+                    <li><a def-id="Queue-and-fire-removetrack"></a> at the <var>SourceBuffer textTracks list</var>.</li>
                   </ol>
                 </li>
                 <li>If the <var>removed enabled text track flag</var> equals true, then <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-change"></a> at the
@@ -462,7 +477,7 @@
 
         <section id="mediasource-detach">
           <h4>Detaching from a media element</h4>
-          <p>The following steps are run in any case where the media element is going to transition to <a def-id="videoref" name="dom-media-network_empty">NETWORK_EMPTY</a> and <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="videoref" name="event-mediacontroller-emptied">emptied</a> at the media element. These steps should be run right before the transition.</p>
+          <p>The following steps are run in any case where the media element is going to transition to <a def-id="videoref" name="dom-media-network_empty">NETWORK_EMPTY</a> and <a def-id="queue-a-task-to-fire-an-event-named"></a> <a def-id="videoref" name="event-mediacontroller-emptied">emptied</a> at the media element. These steps must be run right before the transition.</p>
           <ol>
             <li>Set the <a def-id="readyState"></a> attribute to <a def-id="closed"></a>.</li>
             <li>Set the <a def-id="duration"></a> attribute to NaN.</li>
@@ -517,7 +532,7 @@
             determine when it has enough data. The metrics used may change during playback so web applications should only rely on the value of
             <a def-id="ready-state"></a> to determine whether more data is needed or not.</p>
 
-          <p class="note">When the media element needs more data, it should transition from <a def-id="have-enough-data"></a> to
+          <p class="note">When the media element needs more data, it must transition from <a def-id="have-enough-data"></a> to
             <a def-id="have-future-data"></a> early enough for a web application to be able to respond without causing an interruption in playback.
             For example, transitioning when the current playback position is 500ms before the end of the buffered data gives the application roughly
             500ms to append more data before playback stalls.</p>
@@ -654,7 +669,7 @@
         <section id="end-of-stream-algorithm">
           <h4>End of stream algorithm</h4>
           <p>This algorithm gets called when the application signals the end of stream via an <a def-id="endOfStream"></a> call or an algorithm needs to
-            signal a decode error. This algorithm takes an <var>error</var> parameter that indicates whether an error should be signalled.</p>
+            signal a decode error. This algorithm takes an <var>error</var> parameter that indicates whether an error will be signalled.</p>
           <ol>
             <li>Change the <a def-id="readyState"></a> attribute value to <a def-id="ended"></a>.</li>
             <li>
@@ -666,7 +681,7 @@
 	            <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>
 		      <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. Playback should continue until all the media passed in via <a def-id="appendBuffer"></a> and <a def-id="appendStream"></a> has been played.</li>
+	            <li>Notify the media element that it now has all of the media data.</li>
 	          </ol>
 	        </dd>
                 <dt>If <var>error</var> is set to <a def-id="network"></a>
@@ -929,7 +944,14 @@
             <li>If <var>end</var> is less than or equal to <var>start</var>, then throw an <a def-id="invalid-access-err"></a> exception and abort these steps.</li>
             <li>If this object has been removed from the <a def-id="sourceBuffers"></a> attribute of the <a def-id="parent-media-source"></a> then throw an <a def-id="invalid-state-err"></a> exception and abort these steps.</li>
             <li>If the <a def-id="updating"></a> attribute equals true, then throw an <a def-id="invalid-state-err"></a> exception and abort these steps.</li>
-            <li>If the <a def-id="readyState"></a> attribute of the <a def-id="parent-media-source"></a> is not in the <a def-id="open"></a> state then throw an <a def-id="invalid-state-err"></a> exception and abort these steps.</li>
+            <li>
+              <p>If the <a def-id="readyState"></a> attribute of the <a def-id="parent-media-source"></a> is in the <a def-id="ended"></a> state then run
+                the following steps:</p>
+              <ol>
+	        <li>Set the <a def-id="readyState"></a> attribute of the <a def-id="parent-media-source"></a> to <a def-id="open"></a></li>
+	        <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="sourceopen"></a> at the <a def-id="parent-media-source"></a> .</li>
+              </ol>
+            </li>
             <li>Set the <a def-id="updating"></a> attribute to true.</li>
             <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="updatestart"></a> at this <a>SourceBuffer</a> object.</li>
             <li>Return control to the caller and run the rest of the steps asynchronously.</li>
@@ -1059,7 +1081,7 @@
             <li><i>Loop Top:</i> If the <a def-id="input-buffer"></a> is empty, then jump to the <i>need more data</i> step below.</li>
             <li>If the <a def-id="input-buffer"></a> starts with bytes that violate the <a def-id="byte-stream-format-specs"></a>, then run the
               <a def-id="eos-decode"></a> and abort this algorithm.</li>
-            <li>Remove any bytes that the <a def-id="byte-stream-format-specs"></a> say should be ignored from the start of the <a def-id="input-buffer"></a>.</li>
+            <li>Remove any bytes that the <a def-id="byte-stream-format-specs"></a> say must be ignored from the start of the <a def-id="input-buffer"></a>.</li>
             <li>
 	      <p>If the <a def-id="append-state"></a> equals <a def-id="waiting-for-segment"></a>, then run the following steps:</p>
 	      <ol>
@@ -1234,11 +1256,10 @@
                       </ol>
                     </li>
                     <li>Add <var>new audio track</var> to the <a def-id="sourcebuffer-audioTracks"></a> attribute on this <a>SourceBuffer</a> object.</li>
-                    <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-addtrack"></a> at the <a def-id="audio-track-list"></a> object referenced by the
-                      <a def-id="sourcebuffer-audioTracks"></a> attribute 
-                      on this <a>SourceBuffer</a> object.</li>
+                    <li><a def-id="Queue-and-fire-addtrack"></a> at the <a def-id="audio-track-list"></a> object referenced by the
+                      <a def-id="sourcebuffer-audioTracks"></a> attribute on this <a>SourceBuffer</a> object.</li>
                     <li>Add <var>new audio track</var> to the <a def-id="audiotracks"></a> attribute on the HTMLMediaElement.</li>
-                    <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-addtrack"></a> at the <a def-id="audio-track-list"></a> object referenced by the <a def-id="audiotracks"></a> 
+                    <li><a def-id="Queue-and-fire-addtrack"></a> at the <a def-id="audio-track-list"></a> object referenced by the <a def-id="audiotracks"></a>
                       attribute on the HTMLMediaElement.</li>
                     <li>Create a new <a def-id="track-buffer"></a> to store <a def-id="coded-frames"></a> for this track.</li>
                     <li>Add the <a def-id="track-description"></a> for this track to the <a def-id="track-buffer"></a>.</li>
@@ -1260,10 +1281,10 @@
                       </ol>
                     </li>
                     <li>Add <var>new video track</var> to the <a def-id="sourcebuffer-videoTracks"></a> attribute on this <a>SourceBuffer</a> object.</li>
-                    <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-addtrack"></a> at the <a def-id="video-track-list"></a> object referenced by the <a def-id="sourcebuffer-videoTracks"></a> attribute 
+                    <li><a def-id="Queue-and-fire-addtrack"></a> at the <a def-id="video-track-list"></a> object referenced by the <a def-id="sourcebuffer-videoTracks"></a> attribute
                       on this <a>SourceBuffer</a> object.</li>
                     <li>Add <var>new video track</var> to the <a def-id="videotracks"></a> attribute on the HTMLMediaElement.</li>
-                    <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-addtrack"></a> at the <a def-id="video-track-list"></a> object referenced by the <a def-id="videotracks"></a> attribute on the 
+                    <li><a def-id="Queue-and-fire-addtrack"></a> at the <a def-id="video-track-list"></a> object referenced by the <a def-id="videotracks"></a> attribute on the
                       HTMLMediaElement.</li>
                     <li>Create a new <a def-id="track-buffer"></a> to store <a def-id="coded-frames"></a> for this track.</li>
                     <li>Add the <a def-id="track-description"></a> for this track to the <a def-id="track-buffer"></a>.</li>
@@ -1280,10 +1301,10 @@
                       <a def-id="texttrack-hidden"></a>, then set <var>active track flag</var> to true.
                     </li>
                     <li>Add <var>new text track</var> to the <a def-id="sourcebuffer-textTracks"></a> attribute on this <a>SourceBuffer</a> object.</li>
-                    <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-addtrack"></a> at <a def-id="sourcebuffer-textTracks"></a> attribute 
+                    <li><a def-id="Queue-and-fire-addtrack"></a> at <a def-id="sourcebuffer-textTracks"></a> attribute
                       on this <a>SourceBuffer</a> object.</li>
                     <li>Add <var>new text track</var> to the <a def-id="texttracks"></a> attribute on the HTMLMediaElement.</li>
-                    <li><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="tracklist-addtrack"></a> at the <a def-id="text-track-list"></a> object referenced by the <a def-id="texttracks"></a> attribute on the 
+                    <li><a def-id="Queue-and-fire-addtrack"></a> at the <a def-id="text-track-list"></a> object referenced by the <a def-id="texttracks"></a> attribute on the
                       HTMLMediaElement.</li>
                     <li>Create a new <a def-id="track-buffer"></a> to store <a def-id="coded-frames"></a> for this track.</li>
                     <li>Add the <a def-id="track-description"></a> for this track to the <a def-id="track-buffer"></a>.</li>
@@ -1322,7 +1343,11 @@
             <li>
 	      <p>For each <a def-id="coded-frame"></a> in the <a def-id="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 presentation timestamp in seconds.</li>
+	        <li><i>Loop Top: </i>Let <var>presentation timestamp</var> be a double precision floating point representation of the coded frame's presentation timestamp in seconds.
+                  <p class="note">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 def-id="byte-stream-format-specs"></a> or in separate extension specifications.</p>
+                </li>
 	        <li>Let <var>decode timestamp</var> be a double precision floating point representation of the coded frame's decode timestamp in seconds.
                   <p class="note">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
@@ -1351,7 +1376,7 @@
                       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 should be added to.</li>
+                <li>Let <var>track buffer</var> equal the <a def-id="track-buffer"></a> that the coded frame will be added to.</li>
                 <li>
                   <dl class="switch">
                     <dt>If <var>discontinuity flag</var> equals true:</dt>
@@ -1398,25 +1423,36 @@
                     <li>Set the <a def-id="need-RAP-flag"></a> on <var>track buffer</var> to false.</li>
                   </ol>
                 </li>
-                <li>Let <var>spliced frame</var> be an unset variable for holding audio splice information</li>
+                <li>Let <var>spliced audio frame</var> be an unset variable for holding audio splice information</li>
+                <li>Let <var>spliced timed text frame</var> be an unset variable for holding timed text splice information</li>
                 <li>If <a def-id="last-decode-timestamp"></a> for <var>track buffer</var> is unset and there is a <a def-id="coded-frame"></a> in
                   <var>track buffer</var> with a presentation timestamp less than or equal to <var>presentation timestamp</var> and
                   <var>presentation timestamp</var> is less than this coded frame's presentation timestamp plus its frame duration, then run the
                   following steps:
                   <ol>
                     <li>Let <var>overlapped frame</var> be the <a def-id="coded-frame"></a> in <var>track buffer</var> that matches the condition above.</li>
-                    <li>If <var>track buffer</var> contains audio <a def-id="coded-frames"></a>, then run the <a def-id="audio-splice-frame-algorithm"></a> and if a splice 
-                      frame is returned, assign it to <var>spliced frame</var>.</li>
-                    <li>Let <var>overlapped frame presentation timestamp</var> equal the presentation timestamp of <var>overlapped frame</var>.</li>
-                    <li>Let <var>remove window timestamp</var> equal <var>overlapped frame presentation timestamp</var> plus 1 microsecond.</li>
-                    <li>If <var>track buffer</var> contains video <a def-id="coded-frames"></a> and the <var>presentation timestamp</var> is less than the
-                      <var>remove window timestamp</var>, then remove <var>overlapped frame</var> and any <a def-id="coded-frames"></a> that depend on it
-                      from <var>track buffer</var>.
-                      <p class="note">
-                        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.
-                      </p>
+                    <li>
+                      <dl class="switch">
+                        <dt>If <var>track buffer</var> contains audio <a def-id="coded-frames"></a>:</dt>
+                        <dd>Run the <a def-id="audio-splice-frame-algorithm"></a> and if a splice frame is returned, assign it to <var>spliced audio frame</var>.</dd>
+                        <dt>If <var>track buffer</var> contains video <a def-id="coded-frames"></a>:</dt>
+                        <dd>
+                          <ol>
+                            <li>Let <var>overlapped frame presentation timestamp</var> equal the presentation timestamp of <var>overlapped frame</var>.</li>
+                            <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 def-id="coded-frames"></a> that depend on it from <var>track buffer</var>.
+                              <p class="note">
+                                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.
+                              </p>
+                            </li>
+                          </ol>
+                        </dd>
+                        <dt>If <var>track buffer</var> contains timed text <a def-id="coded-frames"></a>:</dt>
+                        <dd>Run the <a def-id="text-splice-frame-algorithm"></a> and if a splice frame is returned, assign it to <var>spliced timed text frame</var>.</dd>
+                      </dl>
                     </li>
                   </ol>
                 </li>
@@ -1450,8 +1486,10 @@
                 </li>
                 <li>
                   <dl class="switch">
-                    <dt>If <var>spliced frame</var> is set:</dt>
-                    <dd>Add <var>spliced frame</var> to the <var>track buffer</var>.</dd>
+                    <dt>If <var>spliced audio frame</var> is set:</dt>
+                    <dd>Add <var>spliced audio frame</var> to the <var>track buffer</var>.</dd>
+                    <dt>If <var>spliced timed text frame</var> is set:</dt>
+                    <dd>Add <var>spliced timed text frame</var> to the <var>track buffer</var>.</dd>
                     <dt>Otherwise:</dt>
                     <dd>Add the <a def-id="coded-frame"></a> with the <var>presentation timestamp</var>, <var>decode timestamp</var>, and <var>frame duration</var> to the
                       <var>track buffer</var>.</dd>
@@ -1617,7 +1655,7 @@
         </section>
         <section id="sourcebuffer-audio-splice-rendering-algorithm">
           <h4>Audio Splice Rendering Algorithm</h4>
-          <p>The following steps are run when a spliced frame, generated by the <a def-id="audio-splice-frame-algorithm"></a>, needs to be rendered by the 
+          <p>The following steps are run when a spliced frame, generated by the <a def-id="audio-splice-frame-algorithm"></a>, needs to be rendered by the
             media element:</p>
           <ol>
             <li>Let <var>fade out coded frames</var> be the <a def-id="coded-frames"></a> that are faded out during the splice.</li>
@@ -1648,6 +1686,32 @@
             <img src="audio_splice.png" alt="Audio splice diagram">
           </div>
         </section>
+        <section id="sourcebuffer-text-splice-frame-algorithm">
+          <h4>Text Splice Frame Algorithm</h4>
+          <p>Follow these steps when the <a def-id="coded-frame-processing-algorithm"></a> needs to generate a splice frame for two overlapping timed text
+            <a def-id="coded-frames"></a>:</p>
+          <ol>
+            <li>Let <var>track buffer</var> be the <a def-id="track-buffer"></a> that will contain the splice.</li>
+            <li>Let <var>new coded frame</var> be the new <a def-id="coded-frame"></a>, that is being added to <var>track buffer</var>, which triggered the need for a splice.</li>
+            <li>Let <var>presentation timestamp</var> be the presentation timestamp for <var>new coded frame</var></li>
+            <li>Let <var>decode timestamp</var> be the decode timestamp for <var>new coded frame</var>.</li>
+            <li>Let <var>frame duration</var> be the duration of <var>new coded frame</var>.</li>
+            <li>Let <var>frame end timestamp</var> equal the sum of <var>presentation timestamp</var> and <var>frame duration</var>.</li>
+            <li>Let <var>first overlapped frame</var> be the <a def-id="coded-frame"></a> in <var>track buffer</var> with a presentation timestamp less than or equal to
+              <var>presentation timestamp</var> and <var>presentation timestamp</var> is less than this coded frame's presentation timestamp plus its frame duration.
+            </li>
+            <li>Let <var>overlapped presentation timestamp</var> be the presentation timestamp of the <var>first overlapped frame</var>.</li>
+            <li>Let <var>overlapped frames</var> equal <var>first overlapped frame</var> as well as any additional frames in <var>track buffer</var> that
+              have a presentation timestamp greater than <var>presentation timestamp</var> and less than <var>frame end timestamp</var>.</li>
+            <li>Remove all the frames included in <var>overlapped frames</var> from <var>track buffer</var>.
+            <li>Update the frame duration 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>Return to caller without providing a splice frame.
+              <p class="note">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>
+            </li>
+          </ol>
+        </section>
       </section>
     </section>
 
@@ -1697,9 +1761,9 @@
       </section>
     </section>
 
-    <section id="mediaplaybackquality">
-      <h2>MediaPlaybackQuality Object</h2>
-      <dl title="interface MediaPlaybackQuality" class="idl">
+    <section id="videoplaybackquality">
+      <h2>VideoPlaybackQuality Object</h2>
+      <dl title="interface VideoPlaybackQuality" class="idl">
         <dt>readonly attribute DOMHighResTimeStamp creationTime</dt>
         <dd>
           <p>The timestamp returned by <a def-id="performance-now"></a> when this object was created.</p>
@@ -1715,6 +1779,11 @@
           <p>The total number of frames dropped predecode or dropped because the frame missed
             its display deadline.</p>
         </dd>
+
+        <dt>readonly attribute unsigned long corruptedVideoFrames</dt>
+        <dd>
+          <p>The total number of corrupted frames that have been detected.</p>
+        </dd>
       </dl>
     </section>
 
@@ -1740,68 +1809,73 @@
 
     <section id="htmlmediaelement-extensions">
       <h2>HTMLMediaElement Extensions</h2>
-
-      <section id="htmlmediaelement-existing-attributes">
-        <h2>Modifications to Existing Attribute Behavior</h2>
-        <p>This section specifies what existing attributes on the <a def-id="htmlmediaelement"></a> should return when a <a>MediaSource</a> is attached to the element.</p>
-
-        <p>The <a def-id="videoref" name="dom-media-seekable">HTMLMediaElement.seekable</a> attribute returns a new static <a def-id="normalized-timeranges-object"></a> created based on the following steps:</p>
-        <dl class="switch">
-          <dt>If <a def-id="duration"></a> equals NaN</dt>
-          <dd>Return an empty <a def-id="timeranges"></a> object.</dd>
-          <dt>If <a def-id="duration"></a> equals positive Infinity</dt>
-          <dd>Return a single range with a start time of 0 and an end time equal to the highest end time reported by the <a def-id="hme-buffered"></a> attribute.</dd>
-          <dt>Otherwise</dt>
-          <dd>Return a single range with a start time of 0 and an end time equal to <a def-id="duration"></a>.</dd>
-        </dl>
+      <p>This section specifies what existing attributes on the <a def-id="htmlmediaelement"></a> must return when a <a>MediaSource</a> is attached to the element.</p>
 
-        <p id="dom-htmlmediaelement.buffered">The <a def-id="hme-buffered"></a> attribute returns a new static <a def-id="normalized-timeranges-object"></a> created based on the following steps:</p>
-        <ol>
-          <li>If <a def-id="activeSourceBuffers"></a>.length equals 0 then return an empty <a def-id="timeranges"></a> object and abort these steps.</li>
-          <li>Let <var>active ranges</var> be the ranges returned by <a def-id="buffered"></a> for each <a>SourceBuffer</a> object in <a def-id="activeSourceBuffers"></a>.</li>
-          <li>Let <var>highest end time</var> be the largest range end time in the <var>active ranges</var>.</li>
-          <li>Let <var>intersection ranges</var> equal a <a def-id="timerange"></a> object containing a single range from 0 to <var>highest end time</var>.</li>
-          <li>For each <a>SourceBuffer</a> object in <a def-id="activeSourceBuffers"></a> run the following steps:
-            <ol>
-              <li>Let <var>source ranges</var> equal the ranges returned by the <a def-id="buffered"></a> attribute on the current <a>SourceBuffer</a>.</li>
-              <li>If <a def-id="readyState"></a> is <a def-id="ended"></a>, then set the end time on the last range in <var>source ranges</var> to
-                <var>highest end time</var>.</li>
-              <li>Let <var>new intersection ranges</var> equal the the intersection between the <var>intersection ranges</var> and the <var>source ranges</var>.</li>
-              <li>Replace the ranges in <var>intersection ranges</var> with the <var>new intersection ranges</var>.</li>
-            </ol>
-          </li>
-          <li>Return the <var>intersection ranges</var>.</li>
-        </ol>
-      </section>
-      <section id="htmlmediaelement-new-attributes">
-        <h2>New Attributes and Behavior</h2>
-        <p>This section specifies new attributes and internal state that are being added to the <a def-id="htmlmediaelement"></a>.</p>
+      <p>The <a def-id="videoref" name="dom-media-seekable">HTMLMediaElement.seekable</a> attribute returns a new static <a def-id="normalized-timeranges-object"></a> created based on the following steps:</p>
+      <dl class="switch">
+        <dt>If <a def-id="duration"></a> equals NaN</dt>
+        <dd>Return an empty <a def-id="timeranges"></a> object.</dd>
+        <dt>If <a def-id="duration"></a> equals positive Infinity</dt>
+        <dd>Return a single range with a start time of 0 and an end time equal to the highest end time reported by the <a def-id="hme-buffered"></a> attribute.</dd>
+        <dt>Otherwise</dt>
+        <dd>Return a single range with a start time of 0 and an end time equal to <a def-id="duration"></a>.</dd>
+      </dl>
 
-        <p>Each <a def-id="htmlmediaelement"></a> will maintain a <dfn id="total-video-frame-count">total video frame count</dfn> variable that keeps
-          track of the total number of frames that have been displayed and dropped. This variable is initialized to 0 when the
-          element is created and whenever the <a def-id="media-element-load-algorithm"></a> is invoked. It is incremented when a video frame is displayed
-          or when the <a def-id="dropped-video-frame-count"></a> is incremented.</p>
-
-        <p>Each <a def-id="htmlmediaelement"></a> will maintain a <dfn id="dropped-video-frame-count">dropped video frame count</dfn> variable that keeps
-          track of the total number of frames that have been dropped. This variable is initialized to 0 when the
-          element is created and whenever the <a def-id="media-element-load-algorithm"></a> is invoked. It is incremented when a video frame is dropped
-          predecode or when a frame is decoded but dropped because it missed a display deadline.</p>
+      <p id="dom-htmlmediaelement.buffered">The <a def-id="hme-buffered"></a> attribute returns a new static <a def-id="normalized-timeranges-object"></a> created based on the following steps:</p>
+      <ol>
+        <li>If <a def-id="activeSourceBuffers"></a>.length equals 0 then return an empty <a def-id="timeranges"></a> object and abort these steps.</li>
+        <li>Let <var>active ranges</var> be the ranges returned by <a def-id="buffered"></a> for each <a>SourceBuffer</a> object in <a def-id="activeSourceBuffers"></a>.</li>
+        <li>Let <var>highest end time</var> be the largest range end time in the <var>active ranges</var>.</li>
+        <li>Let <var>intersection ranges</var> equal a <a def-id="timerange"></a> object containing a single range from 0 to <var>highest end time</var>.</li>
+        <li>For each <a>SourceBuffer</a> object in <a def-id="activeSourceBuffers"></a> run the following steps:
+          <ol>
+            <li>Let <var>source ranges</var> equal the ranges returned by the <a def-id="buffered"></a> attribute on the current <a>SourceBuffer</a>.</li>
+            <li>If <a def-id="readyState"></a> is <a def-id="ended"></a>, then set the end time on the last range in <var>source ranges</var> to
+              <var>highest end time</var>.</li>
+            <li>Let <var>new intersection ranges</var> equal the the intersection between the <var>intersection ranges</var> and the <var>source ranges</var>.</li>
+            <li>Replace the ranges in <var>intersection ranges</var> with the <var>new intersection ranges</var>.</li>
+          </ol>
+        </li>
+        <li>Return the <var>intersection ranges</var>.</li>
+      </ol>
+    </section>
 
-        <dl title="partial interface HTMLMediaElement" class="idl">
-          <dt>readonly attribute MediaPlaybackQuality playbackQuality</dt>
-          <dd>
-            <p>Provides the current the playback quality metrics.</p>
-            <p>On getting, run the following steps:</p>
-            <ol>
-              <li>Let <var>playbackQuality</var> be a new instance of <a>MediaPlaybackQuality</a>.</li>
-              <li>Set <var>playbackQuality</var>.<a def-id="creationTime"></a> to the value returned by a call to <a def-id="performance-now"></a>.</li>
-              <li>Set <var>playbackQuality</var>.<a def-id="totalVideoFrames"></a> to the current value of the <a def-id="total-video-frame-count"></a>.</li>
-              <li>Set <var>playbackQuality</var>.<a def-id="droppedVideoFrames"></a> to the current value of the <a def-id="dropped-video-frame-count"></a>.</li>
-              <li>Return <var>playbackQuality</var>.</li>
-            </ol>
-          </dd>
-        </dl>
-      </section>
+    <section id="htmlvideoelement-extensions">
+      <h2>HTMLVideoElement Extensions</h2>
+      <p>This section specifies new attributes and internal state that are being added to the <a def-id="htmlvideoelement"></a>.</p>
+
+      <p>Each <a def-id="htmlvideoelement"></a> will maintain a <dfn id="total-video-frame-count">total video frame count</dfn> variable that keeps
+        track of the total number of frames that have been displayed and dropped. This variable is initialized to 0 when the
+        element is created and whenever the <a def-id="media-element-load-algorithm"></a> is invoked. It is incremented when a video frame is displayed
+        or when the <a def-id="dropped-video-frame-count"></a> is incremented.</p>
+
+      <p>Each <a def-id="htmlvideoelement"></a> will maintain a <dfn id="dropped-video-frame-count">dropped video frame count</dfn> variable that keeps
+        track of the total number of frames that have been dropped. This variable is initialized to 0 when the
+        element is created and whenever the <a def-id="media-element-load-algorithm"></a> is invoked. It is incremented when a video frame is dropped
+        predecode or when a frame is decoded but dropped because it missed a display deadline.</p>
+
+      <p>Each <a def-id="htmlvideoelement"></a> will maintain a <dfn id="corrupted-video-frame-count">corrupted video frame count</dfn> variable that keeps
+        track of the total number of corrupted frames detected. This variable is initialized to 0 when the element is created and whenever the
+        <a def-id="media-element-load-algorithm"></a> is invoked. It is incremented when a corrupted video frame is detected by the decoder. It is up to
+        the implementation to determine whether to display or drop a corrupted frame. Whichever choice is made, the <a def-id="total-video-frame-count"></a>
+        and <a def-id="dropped-video-frame-count"></a> must be updated appropriately.
+      </p>
+
+      <dl title="partial interface HTMLVideoElement" class="idl">
+        <dt>readonly attribute VideoPlaybackQuality videoPlaybackQuality</dt>
+        <dd>
+          <p>Provides the current the playback quality metrics.</p>
+          <p>On getting, run the following steps:</p>
+          <ol>
+            <li>Let <var>playbackQuality</var> be a new instance of <a>VideoPlaybackQuality</a>.</li>
+            <li>Set <var>playbackQuality</var>.<a def-id="creationTime"></a> to the value returned by a call to <a def-id="performance-now"></a>.</li>
+            <li>Set <var>playbackQuality</var>.<a def-id="totalVideoFrames"></a> to the current value of the <a def-id="total-video-frame-count"></a>.</li>
+            <li>Set <var>playbackQuality</var>.<a def-id="droppedVideoFrames"></a> to the current value of the <a def-id="dropped-video-frame-count"></a>.</li>
+            <li>Set <var>playbackQuality</var>.<a def-id="corruptedVideoFrames"></a> to the current value of the <a def-id="corrupted-video-frame-count"></a>.</li>
+            <li>Return <var>playbackQuality</var>.</li>
+          </ol>
+        </dd>
+      </dl>
     </section>
 
     <section id="audio-track-extensions">
@@ -2267,7 +2341,21 @@
         </thead>
         <tbody>
           <tr>
-            <td>13 May 2013</td>
+            <td>01 June 2013</td>
+            <td>
+              <ul>
+                <li>Bug 21431 - Updated coded frame processing algorithm for text splicing.</li>
+                <li>Bug 22035 - Update addtrack and removetrack event firing text to match HTML5 language.</li>
+                <li>Bug 22111 - Remove useless playback sentence from end of stream algorithm.</li>
+                <li>Bug 22052 - Add corrupted frame metric.</li>
+                <li>Bug 22062 - Added links for filing bugs.</li>
+                <li>Bug 22125 - Add "ended" to "open" transition to remove().</li>
+                <li>Bug 22143 - Move HTMLMediaElement.playbackQuality to HTMLVideoElement.videoPlaybackQuality.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/71968956733e/media-source/media-source.html">13 May 2013</a></td>
             <td>
               <ul>
                 <li>Bug 21954 - Add [EnforceRange] to appendStream's maxSize parameter.</li>
--- a/media-source/media-source.html	Tue May 28 07:57:17 2013 -0700
+++ b/media-source/media-source.html	Sat Jun 01 12:58:28 2013 -0700
@@ -6,6 +6,11 @@
     
     
     
+    <!-- script to register bugs -->
+    <script src="https://dvcs.w3.org/hg/webcomponents/raw-file/tip/assets/scripts/bug-assist.js"></script>
+    <meta name="bug.short_desc" content="[MSE] ">
+    <meta name="bug.product" content="HTML WG">
+    <meta name="bug.component" content="Media Source Extensions">
 
     <style type="text/css">
       .nonnormative { color: green; margin: 2em 0 2em 0em; padding: 0.5em 1em; border: none; background: #DDFFDD; }
@@ -28,6 +33,12 @@
       p + * > li, dd li { margin: 1em 0; }
 
       @media screen { code :link, code :visited { color: inherit; } }
+
+      /* fix bug entry form styling */
+      body > form {
+      padding: 4px;
+      border: 1px solid red;
+      background-color: white;
     </style>
   <style>/*****************************************************************
  * ReSpec 3 CSS
@@ -421,7 +432,7 @@
   </p>
   <h1 class="title" id="title">Media Source Extensions</h1>
   
-  <h2 id="w3c-editor-s-draft-13-may-2013"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft 13 May 2013</h2>
+  <h2 id="w3c-editor-s-draft-01-june-2013"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft 01 June 2013</h2>
   <dl>
     
       <dt>This version:</dt>
@@ -468,15 +479,19 @@
   
   <hr>
 </div>
-    
+
     
 
-    <section id="abstract" class="introductory"><h2>Abstract</h2><p>
-      This specification extends HTMLMediaElement to allow 
-      JavaScript to generate media streams for playback. 
-      Allowing JavaScript to generate streams facilitates a variety of use 
+    <section id="abstract" class="introductory"><h2>Abstract</h2>
+      This specification extends HTMLMediaElement to allow
+      JavaScript to generate media streams for playback.
+      Allowing JavaScript to generate streams facilitates a variety of use
       cases like adaptive streaming and time shifting live streams.
-    </p></section><section id="sotd" class="introductory"><h2>Status of This Document</h2>
+
+      <p>If you wish to make comments or file bugs regarding this document in a manner that is tracked by the <abbr title="World Wide Web Consortium">W3C</abbr>, please submit them via
+        <a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=HTML%20WG&amp;component=Media%20Source%20Extensions&amp;short_desc=%5BMSE%5D%20">our public bug database</a>.
+      </p>
+    </section><section id="sotd" class="introductory"><h2>Status of This Document</h2>
   
     
       
@@ -534,14 +549,14 @@
       
     
   
-</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="#mediasource" class="tocxref"><span class="secno">2. </span>MediaSource Object</a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">2.1 </span>Attributes</a></li><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">2.2 </span>Methods</a></li><li class="tocline"><a href="#mediasource-events" class="tocxref"><span class="secno">2.3 </span>Event Summary</a></li><li class="tocline"><a href="#mediasource-algorithms" class="tocxref"><span class="secno">2.4 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#mediasource-attach" class="tocxref"><span class="secno">2.4.1 </span>Attaching to a media element</a></li><li class="tocline"><a href="#mediasource-detach" class="tocxref"><span class="secno">2.4.2 </span>Detaching from a media element</a></li><li class="tocline"><a href="#mediasource-seeking" class="tocxref"><span class="secno">2.4.3 </span>Seeking</a></li><li class="tocline"><a href="#buffer-monitoring" class="tocxref"><span class="secno">2.4.4 </span>SourceBuffer Monitoring</a></li><li class="tocline"><a href="#active-source-buffer-changes" class="tocxref"><span class="secno">2.4.5 </span>Changes to selected/enabled track state</a></li><li class="tocline"><a href="#duration-change-algorithm" class="tocxref"><span class="secno">2.4.6 </span>Duration change</a></li><li class="tocline"><a href="#end-of-stream-algorithm" class="tocxref"><span class="secno">2.4.7 </span>End of stream algorithm</a></li></ul></li></ul></li><li class="tocline"><a href="#sourcebuffer" class="tocxref"><span class="secno">3. </span>SourceBuffer Object</a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno">3.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">3.2 </span>Methods</a></li><li class="tocline"><a href="#track-buffers" class="tocxref"><span class="secno">3.3 </span>Track Buffers</a></li><li class="tocline"><a href="#sourcebuffer-events" class="tocxref"><span class="secno">3.4 </span>Event Summary</a></li><li class="tocline"><a href="#sourcebuffer-algorithms" class="tocxref"><span class="secno">3.5 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#sourcebuffer-segment-parser-loop" class="tocxref"><span class="secno">3.5.1 </span>Segment Parser Loop</a></li><li class="tocline"><a href="#sourcebuffer-reset-parser-state" class="tocxref"><span class="secno">3.5.2 </span>Reset Parser State</a></li><li class="tocline"><a href="#sourcebuffer-append-error" class="tocxref"><span class="secno">3.5.3 </span>Append Error</a></li><li class="tocline"><a href="#sourcebuffer-buffer-append" class="tocxref"><span class="secno">3.5.4 </span>Buffer Append Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-stream-append-loop" class="tocxref"><span class="secno">3.5.5 </span>Stream Append Loop</a></li><li class="tocline"><a href="#sourcebuffer-init-segment-received" class="tocxref"><span class="secno">3.5.6 </span>Initialization Segment Received</a></li><li class="tocline"><a href="#sourcebuffer-coded-frame-processing" class="tocxref"><span class="secno">3.5.7 </span>Coded Frame Processing</a></li><li class="tocline"><a href="#sourcebuffer-coded-frame-removal" class="tocxref"><span class="secno">3.5.8 </span>Coded Frame Removal Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-coded-frame-eviction" class="tocxref"><span class="secno">3.5.9 </span>Coded Frame Eviction Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-audio-splice-frame-algorithm" class="tocxref"><span class="secno">3.5.10 </span>Audio Splice Frame Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-audio-splice-rendering-algorithm" class="tocxref"><span class="secno">3.5.11 </span>Audio Splice Rendering Algorithm</a></li></ul></li></ul></li><li class="tocline"><a href="#sourcebufferlist" class="tocxref"><span class="secno">4. </span>SourceBufferList Object</a><ul class="toc"><li class="tocline"><a href="#attributes-2" class="tocxref"><span class="secno">4.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">4.2 </span>Methods</a></li><li class="tocline"><a href="#sourcebufferlist-events" class="tocxref"><span class="secno">4.3 </span>Event Summary</a></li></ul></li><li class="tocline"><a href="#mediaplaybackquality" class="tocxref"><span class="secno">5. </span>MediaPlaybackQuality Object</a><ul class="toc"><li class="tocline"><a href="#attributes-3" class="tocxref"><span class="secno">5.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#url" class="tocxref"><span class="secno">6. </span>URL Object Extensions</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-extensions" class="tocxref"><span class="secno">7. </span>HTMLMediaElement Extensions</a><ul class="toc"><li class="tocline"><a href="#htmlmediaelement-existing-attributes" class="tocxref"><span class="secno">7.1 </span>Modifications to Existing Attribute Behavior</a></li><li class="tocline"><a href="#htmlmediaelement-new-attributes" class="tocxref"><span class="secno">7.2 </span>New Attributes and Behavior</a><ul class="toc"><li class="tocline"><a href="#attributes-4" class="tocxref"><span class="secno">7.2.1 </span>Attributes</a></li></ul></li></ul></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-5" 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-6" 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-7" 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="#acknowledgements" class="tocxref"><span class="secno">13. </span>Acknowledgments</a></li><li class="tocline"><a href="#revision-history" class="tocxref"><span class="secno">14. </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>
+</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="#mediasource" class="tocxref"><span class="secno">2. </span>MediaSource Object</a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">2.1 </span>Attributes</a></li><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">2.2 </span>Methods</a></li><li class="tocline"><a href="#mediasource-events" class="tocxref"><span class="secno">2.3 </span>Event Summary</a></li><li class="tocline"><a href="#mediasource-algorithms" class="tocxref"><span class="secno">2.4 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#mediasource-attach" class="tocxref"><span class="secno">2.4.1 </span>Attaching to a media element</a></li><li class="tocline"><a href="#mediasource-detach" class="tocxref"><span class="secno">2.4.2 </span>Detaching from a media element</a></li><li class="tocline"><a href="#mediasource-seeking" class="tocxref"><span class="secno">2.4.3 </span>Seeking</a></li><li class="tocline"><a href="#buffer-monitoring" class="tocxref"><span class="secno">2.4.4 </span>SourceBuffer Monitoring</a></li><li class="tocline"><a href="#active-source-buffer-changes" class="tocxref"><span class="secno">2.4.5 </span>Changes to selected/enabled track state</a></li><li class="tocline"><a href="#duration-change-algorithm" class="tocxref"><span class="secno">2.4.6 </span>Duration change</a></li><li class="tocline"><a href="#end-of-stream-algorithm" class="tocxref"><span class="secno">2.4.7 </span>End of stream algorithm</a></li></ul></li></ul></li><li class="tocline"><a href="#sourcebuffer" class="tocxref"><span class="secno">3. </span>SourceBuffer Object</a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno">3.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">3.2 </span>Methods</a></li><li class="tocline"><a href="#track-buffers" class="tocxref"><span class="secno">3.3 </span>Track Buffers</a></li><li class="tocline"><a href="#sourcebuffer-events" class="tocxref"><span class="secno">3.4 </span>Event Summary</a></li><li class="tocline"><a href="#sourcebuffer-algorithms" class="tocxref"><span class="secno">3.5 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#sourcebuffer-segment-parser-loop" class="tocxref"><span class="secno">3.5.1 </span>Segment Parser Loop</a></li><li class="tocline"><a href="#sourcebuffer-reset-parser-state" class="tocxref"><span class="secno">3.5.2 </span>Reset Parser State</a></li><li class="tocline"><a href="#sourcebuffer-append-error" class="tocxref"><span class="secno">3.5.3 </span>Append Error</a></li><li class="tocline"><a href="#sourcebuffer-buffer-append" class="tocxref"><span class="secno">3.5.4 </span>Buffer Append Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-stream-append-loop" class="tocxref"><span class="secno">3.5.5 </span>Stream Append Loop</a></li><li class="tocline"><a href="#sourcebuffer-init-segment-received" class="tocxref"><span class="secno">3.5.6 </span>Initialization Segment Received</a></li><li class="tocline"><a href="#sourcebuffer-coded-frame-processing" class="tocxref"><span class="secno">3.5.7 </span>Coded Frame Processing</a></li><li class="tocline"><a href="#sourcebuffer-coded-frame-removal" class="tocxref"><span class="secno">3.5.8 </span>Coded Frame Removal Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-coded-frame-eviction" class="tocxref"><span class="secno">3.5.9 </span>Coded Frame Eviction Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-audio-splice-frame-algorithm" class="tocxref"><span class="secno">3.5.10 </span>Audio Splice Frame Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-audio-splice-rendering-algorithm" class="tocxref"><span class="secno">3.5.11 </span>Audio Splice Rendering Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-text-splice-frame-algorithm" class="tocxref"><span class="secno">3.5.12 </span>Text Splice Frame Algorithm</a></li></ul></li></ul></li><li class="tocline"><a href="#sourcebufferlist" class="tocxref"><span class="secno">4. </span>SourceBufferList Object</a><ul class="toc"><li class="tocline"><a href="#attributes-2" class="tocxref"><span class="secno">4.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">4.2 </span>Methods</a></li><li class="tocline"><a href="#sourcebufferlist-events" class="tocxref"><span class="secno">4.3 </span>Event Summary</a></li></ul></li><li class="tocline"><a href="#videoplaybackquality" class="tocxref"><span class="secno">5. </span>VideoPlaybackQuality Object</a><ul class="toc"><li class="tocline"><a href="#attributes-3" class="tocxref"><span class="secno">5.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#url" class="tocxref"><span class="secno">6. </span>URL Object Extensions</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-extensions" class="tocxref"><span class="secno">7. </span>HTMLMediaElement Extensions</a></li><li class="tocline"><a href="#htmlvideoelement-extensions" class="tocxref"><span class="secno">8. </span>HTMLVideoElement Extensions</a><ul class="toc"><li class="tocline"><a href="#attributes-4" class="tocxref"><span class="secno">8.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#audio-track-extensions" class="tocxref"><span class="secno">9. </span>AudioTrack Extensions</a><ul class="toc"><li class="tocline"><a href="#attributes-5" class="tocxref"><span class="secno">9.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#video-track-extensions" class="tocxref"><span class="secno">10. </span>VideoTrack Extensions</a><ul class="toc"><li class="tocline"><a href="#attributes-6" class="tocxref"><span class="secno">10.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#text-track-extensions" class="tocxref"><span class="secno">11. </span>TextTrack Extensions</a><ul class="toc"><li class="tocline"><a href="#attributes-7" class="tocxref"><span class="secno">11.1 </span>Attributes</a></li></ul></li><li class="tocline"><a href="#byte-stream-formats" class="tocxref"><span class="secno">12. </span>Byte Stream Formats</a><ul class="toc"><li class="tocline"><a href="#webm" class="tocxref"><span class="secno">12.1 </span>WebM Byte Streams</a><ul class="toc"><li class="tocline"><a href="#webm-init-segments" class="tocxref"><span class="secno">12.1.1 </span>Initialization Segments</a></li><li class="tocline"><a href="#webm-media-segments" class="tocxref"><span class="secno">12.1.2 </span>Media Segments</a></li><li class="tocline"><a href="#webm-random-access-points" class="tocxref"><span class="secno">12.1.3 </span>Random Access Points</a></li></ul></li><li class="tocline"><a href="#iso" class="tocxref"><span class="secno">12.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">12.2.1 </span>Initialization Segments</a></li><li class="tocline"><a href="#iso-media-segments" class="tocxref"><span class="secno">12.2.2 </span>Media Segments</a></li><li class="tocline"><a href="#iso-random-access-points" class="tocxref"><span class="secno">12.2.3 </span>Random Access Points</a></li></ul></li><li class="tocline"><a href="#mpeg2ts" class="tocxref"><span class="secno">12.3 </span>MPEG-2 Transport Stream Byte Streams</a><ul class="toc"><li class="tocline"><a href="#mpeg2ts-general" class="tocxref"><span class="secno">12.3.1 </span>General</a></li><li class="tocline"><a href="#mpeg2ts-init-segments" class="tocxref"><span class="secno">12.3.2 </span>Initialization Segments</a></li><li class="tocline"><a href="#mpeg2ts-media-segments" class="tocxref"><span class="secno">12.3.3 </span>Media Segments</a></li><li class="tocline"><a href="#mpeg2ts-random-access-points" class="tocxref"><span class="secno">12.3.4 </span>Random Access Points</a></li><li class="tocline"><a href="#mpeg2ts-discontinuities" class="tocxref"><span class="secno">12.3.5 </span>Timestamp Rollover &amp; Discontinuities</a></li></ul></li></ul></li><li class="tocline"><a href="#examples" class="tocxref"><span class="secno">13. </span>Examples</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">14. </span>Acknowledgments</a></li><li class="tocline"><a href="#revision-history" class="tocxref"><span class="secno">15. </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>
 
 
     <section id="introduction">
       <!--OddPage--><h2><span class="secno">1. </span>Introduction</h2>
-      <p>This specification allows JavaScript to dynamically construct media streams for &lt;audio&gt; and &lt;video&gt;. 
+      <p>This specification allows JavaScript to dynamically construct media streams for &lt;audio&gt; and &lt;video&gt;.
         It defines objects that allow JavaScript to pass media segments to an <a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a> [<cite><a class="bibref" href="#bib-HTML5">HTML5</a></cite>].
-        A buffering model is also included to describe how the user agent should act when different media segments are 
+        A buffering model is also included to describe how the user agent acts when different media segments are
         appended at different times. Byte stream specifications for WebM, ISO Base Media File Format, and MPEG-2 Transport Streams are given to specify the
         expected format of byte streams used with these extensions.</p>
       <img src="pipeline_model.png" alt="Media Source Pipeline Model Diagram">
@@ -577,7 +592,7 @@
             the <code><a href="#widl-SourceBuffer-appendWindowStart">appendWindowStart</a></code> and <code><a href="#widl-SourceBuffer-appendWindowEnd">appendWindowEnd</a></code> attributes respectively.</p></dd>
 
           <dt id="coded-frame">Coded Frame</dt>
-          <dd><p>A unit of media data that has a presentation timestamp and decode timestamp. The presentation timestamp indicates when the frame should be rendered. The decode timestamp indicates when the frame needs to be decoded. If frames can be decoded out of order, then the decode timestamp must be present in the bytestream. If frames cannot be decoded out of order and a decode timestamp is not present in the bytestream, then the decode timestamp is equal to the presentation timestamp.</p></dd>
+          <dd><p>A unit of media data that has a presentation timestamp and decode timestamp. The presentation timestamp indicates when the frame must be rendered. The decode timestamp indicates when the frame needs to be decoded. If frames can be decoded out of order, then the decode timestamp must be present in the bytestream. If frames cannot be decoded out of order and a decode timestamp is not present in the bytestream, then the decode timestamp is equal to the presentation timestamp.</p></dd>
 
           <dt id="coded-frame-sequence">Coded Frame Sequence</dt>
           <dd><p>A sequence of <a href="#coded-frame">coded frames</a> that are adjacent and monotonically increasing in decode time without any gaps. Discontinuities detected by the
@@ -756,9 +771,9 @@
                     <li>If the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-audiotrack-enabled">enabled</a></code> attribute on the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotrack">AudioTrack</a></code> object is true, then
                       set the <var>removed enabled audio track flag</var> to true.</li>
                     <li>Remove the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotrack">AudioTrack</a></code> object from the <var>HTMLMediaElement audioTracks list</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onremovetrack">removetrack</a></code> at the <var>HTMLMediaElement audioTracks list</var>.</li>
+                    <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to fire a <a href="http://www.w3.org/TR/html5/webappapis.html#concept-events-trusted">trusted event</a> named <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onremovetrack">removetrack</a></code>, that does not bubble and is not cancelable, and that uses the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#trackevent">TrackEvent</a></code> interface, at the <var>HTMLMediaElement audioTracks list</var>.</li>
                     <li>Remove the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotrack">AudioTrack</a></code> object from the <var>SourceBuffer audioTracks list</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onremovetrack">removetrack</a></code> at the <var>SourceBuffer audioTracks list</var>.</li>
+                    <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to fire a <a href="http://www.w3.org/TR/html5/webappapis.html#concept-events-trusted">trusted event</a> named <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onremovetrack">removetrack</a></code>, that does not bubble and is not cancelable, and that uses the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#trackevent">TrackEvent</a></code> interface, at the <var>SourceBuffer audioTracks list</var>.</li>
                   </ol>
                 </li>
                 <li>If the <var>removed enabled audio track flag</var> equals true, then <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#handler-tracklist-onchange">change</a></code> at the
@@ -777,9 +792,9 @@
                     <li>If the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-videotrack-selected">selected</a></code> attribute on the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotrack">VideoTrack</a></code> object is true, then
                       set the <var>removed selected video track flag</var> to true.</li>
                     <li>Remove the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotrack">VideoTrack</a></code> object from the <var>HTMLMediaElement videoTracks list</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onremovetrack">removetrack</a></code> at the <var>HTMLMediaElement videoTracks list</var>.</li>
+                    <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to fire a <a href="http://www.w3.org/TR/html5/webappapis.html#concept-events-trusted">trusted event</a> named <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onremovetrack">removetrack</a></code>, that does not bubble and is not cancelable, and that uses the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#trackevent">TrackEvent</a></code> interface, at the <var>HTMLMediaElement videoTracks list</var>.</li>
                     <li>Remove the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotrack">VideoTrack</a></code> object from the <var>SourceBuffer videoTracks list</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onremovetrack">removetrack</a></code> at the <var>SourceBuffer videoTracks list</var>.</li>
+                    <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to fire a <a href="http://www.w3.org/TR/html5/webappapis.html#concept-events-trusted">trusted event</a> named <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onremovetrack">removetrack</a></code>, that does not bubble and is not cancelable, and that uses the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#trackevent">TrackEvent</a></code> interface, at the <var>SourceBuffer videoTracks list</var>.</li>
                   </ol>
                 </li>
                 <li>If the <var>removed selected video track flag</var> equals true, then <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#handler-tracklist-onchange">change</a></code> at the
@@ -799,9 +814,9 @@
                     <li>If the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-mode">mode</a></code> attribute on the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#texttrack">TextTrack</a></code> object is set to  <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-showing">"showing"</a></code> or
                       <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-hidden">"hidden"</a></code> , then set the <var>removed enabled text track flag</var> to true.</li>
                     <li>Remove the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#texttrack">TextTrack</a></code> object from the <var>HTMLMediaElement textTracks list</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onremovetrack">removetrack</a></code> at the <var>HTMLMediaElement textTracks list</var>.</li>
+                    <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to fire a <a href="http://www.w3.org/TR/html5/webappapis.html#concept-events-trusted">trusted event</a> named <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onremovetrack">removetrack</a></code>, that does not bubble and is not cancelable, and that uses the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#trackevent">TrackEvent</a></code> interface, at the <var>HTMLMediaElement textTracks list</var>.</li>
                     <li>Remove the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#texttrack">TextTrack</a></code> object from the <var>SourceBuffer textTracks list</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onremovetrack">removetrack</a></code> at the <var>SourceBuffer textTracks list</var>.</li>
+                    <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to fire a <a href="http://www.w3.org/TR/html5/webappapis.html#concept-events-trusted">trusted event</a> named <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onremovetrack">removetrack</a></code>, that does not bubble and is not cancelable, and that uses the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#trackevent">TrackEvent</a></code> interface, at the <var>SourceBuffer textTracks list</var>.</li>
                   </ol>
                 </li>
                 <li>If the <var>removed enabled text track flag</var> equals true, then <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#handler-tracklist-onchange">change</a></code> at the
@@ -874,7 +889,7 @@
 
         <section id="mediasource-detach">
           <h4><span class="secno">2.4.2 </span>Detaching from a media element</h4>
-          <p>The following steps are run in any case where the media element is going to transition to <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-network_empty">NETWORK_EMPTY</a> and <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 <a href="http://www.w3.org/TR/html5/embedded-content-0.html#event-mediacontroller-emptied">emptied</a> at the media element. These steps should be run right before the transition.</p>
+          <p>The following steps are run in any case where the media element is going to transition to <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-network_empty">NETWORK_EMPTY</a> and <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 <a href="http://www.w3.org/TR/html5/embedded-content-0.html#event-mediacontroller-emptied">emptied</a> at the media element. These steps must be run right before the transition.</p>
           <ol>
             <li>Set the <code><a href="#widl-MediaSource-readyState">readyState</a></code> attribute to <code><a href="#idl-def-ReadyState.closed">"closed"</a></code>.</li>
             <li>Set the <code><a href="#widl-MediaSource-duration">duration</a></code> attribute to NaN.</li>
@@ -929,7 +944,7 @@
             determine when it has enough data. The metrics used may change during playback so web applications should only rely on the value of
             <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> to determine whether more data is needed or not.</p></div>
 
-          <div class="note"><div class="note-title"><span>Note</span></div><p class="">When the media element needs more data, it should transition from <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_enough_data">HAVE_ENOUGH_DATA</a></code> to
+          <div class="note"><div class="note-title"><span>Note</span></div><p class="">When the media element needs more data, it must transition from <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_enough_data">HAVE_ENOUGH_DATA</a></code> to
             <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_future_data">HAVE_FUTURE_DATA</a></code> early enough for a web application to be able to respond without causing an interruption in playback.
             For example, transitioning when the current playback position is 500ms before the end of the buffered data gives the application roughly
             500ms to append more data before playback stalls.</p></div>
@@ -1066,7 +1081,7 @@
         <section id="end-of-stream-algorithm">
           <h4><span class="secno">2.4.7 </span>End of stream algorithm</h4>
           <p>This algorithm gets called when the application signals the end of stream via an <code><a href="#widl-MediaSource-endOfStream-void-EndOfStreamError-error">endOfStream()</a></code> call or an algorithm needs to
-            signal a decode error. This algorithm takes an <var>error</var> parameter that indicates whether an error should be signalled.</p>
+            signal a decode error. This algorithm takes an <var>error</var> parameter that indicates whether an error will be signalled.</p>
           <ol>
             <li>Change the <code><a href="#widl-MediaSource-readyState">readyState</a></code> attribute value to <code><a href="#idl-def-ReadyState.ended">"ended"</a></code>.</li>
             <li>
@@ -1078,7 +1093,7 @@
 	            <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>
 		      <div class="note"><div class="note-title"><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. Playback should continue until all the media passed in via <code><a href="#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data">appendBuffer()</a></code> and <code><a href="#widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize">appendStream()</a></code> has been played.</li>
+	            <li>Notify the media element that it now has all of the media data.</li>
 	          </ol>
 	        </dd>
                 <dt>If <var>error</var> is set to <code><a href="#idl-def-EndOfStreamError.network">"network"</a></code>
@@ -1315,7 +1330,14 @@
             <li>If <var>end</var> is less than or equal to <var>start</var>, 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>
             <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>
             <li>If the <code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute equals true, 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-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>
+              <p>If the <code><a href="#widl-MediaSource-readyState">readyState</a></code> attribute of the <a href="#parent-media-source">parent media source</a> is in the <code><a href="#idl-def-ReadyState.ended">"ended"</a></code> state then run
+                the following steps:</p>
+              <ol>
+	        <li>Set the <code><a href="#widl-MediaSource-readyState">readyState</a></code> attribute of the <a href="#parent-media-source">parent media source</a> to <code><a href="#idl-def-ReadyState.open">"open"</a></code></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-sourceopen">sourceopen</a></code> at the <a href="#parent-media-source">parent media source</a> .</li>
+              </ol>
+            </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>Return control to the caller and run the rest of the steps asynchronously.</li>
@@ -1442,7 +1464,7 @@
             <li><i>Loop Top:</i> If the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var> is empty, 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> starts with bytes that violate the <a href="#byte-stream-formats">byte stream format specifications</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 this algorithm.</li>
-            <li>Remove any bytes that the <a href="#byte-stream-formats">byte stream format specifications</a> say should be ignored from the start of the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var>.</li>
+            <li>Remove any bytes that the <a href="#byte-stream-formats">byte stream format specifications</a> say must be ignored from the start of the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var>.</li>
             <li>
 	      <p>If the <var><a href="#sourcebuffer-append-state">append state</a></var> equals <a href="#sourcebuffer-waiting-for-segment">WAITING_FOR_SEGMENT</a>, then run the following steps:</p>
 	      <ol>
@@ -1617,11 +1639,10 @@
                       </ol>
                     </li>
                     <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>
-                    <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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onaddtrack">addtrack</a></code> at the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotracklist">AudioTrackList</a></code> object referenced by 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>
+                    <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to fire a <a href="http://www.w3.org/TR/html5/webappapis.html#concept-events-trusted">trusted event</a> named <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onaddtrack">addtrack</a></code>, that does not bubble and is not cancelable, and that uses the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#trackevent">TrackEvent</a></code> interface, at the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotracklist">AudioTrackList</a></code> object referenced by 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>
                     <li>Add <var>new audio track</var> to the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-audiotracks">audioTracks</a></code> attribute on the HTMLMediaElement.</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onaddtrack">addtrack</a></code> at the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotracklist">AudioTrackList</a></code> object referenced by the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-audiotracks">audioTracks</a></code> 
+                    <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to fire a <a href="http://www.w3.org/TR/html5/webappapis.html#concept-events-trusted">trusted event</a> named <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onaddtrack">addtrack</a></code>, that does not bubble and is not cancelable, and that uses the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#trackevent">TrackEvent</a></code> interface, at the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotracklist">AudioTrackList</a></code> object referenced by the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-audiotracks">audioTracks</a></code>
                       attribute on the HTMLMediaElement.</li>
                     <li>Create a new <a href="#track-buffer">track buffer</a> to store <a href="#coded-frame">coded frames</a> for this track.</li>
                     <li>Add the <a href="#track-description">track description</a> for this track to the <a href="#track-buffer">track buffer</a>.</li>
@@ -1643,10 +1664,10 @@
                       </ol>
                     </li>
                     <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>
-                    <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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onaddtrack">addtrack</a></code> at the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotracklist">VideoTrackList</a></code> object referenced by the <code><a href="#widl-SourceBuffer-videoTracks">videoTracks</a></code> attribute 
+                    <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to fire a <a href="http://www.w3.org/TR/html5/webappapis.html#concept-events-trusted">trusted event</a> named <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onaddtrack">addtrack</a></code>, that does not bubble and is not cancelable, and that uses the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#trackevent">TrackEvent</a></code> interface, at the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotracklist">VideoTrackList</a></code> object referenced by 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>
                     <li>Add <var>new video track</var> to the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-videotracks">videoTracks</a></code> attribute on the HTMLMediaElement.</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onaddtrack">addtrack</a></code> at the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotracklist">VideoTrackList</a></code> object referenced by the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-videotracks">videoTracks</a></code> attribute on the 
+                    <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to fire a <a href="http://www.w3.org/TR/html5/webappapis.html#concept-events-trusted">trusted event</a> named <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onaddtrack">addtrack</a></code>, that does not bubble and is not cancelable, and that uses the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#trackevent">TrackEvent</a></code> interface, at the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotracklist">VideoTrackList</a></code> object referenced by the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-videotracks">videoTracks</a></code> attribute on the
                       HTMLMediaElement.</li>
                     <li>Create a new <a href="#track-buffer">track buffer</a> to store <a href="#coded-frame">coded frames</a> for this track.</li>
                     <li>Add the <a href="#track-description">track description</a> for this track to the <a href="#track-buffer">track buffer</a>.</li>
@@ -1663,10 +1684,10 @@
                       <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-hidden">"hidden"</a></code>, then set <var>active track flag</var> to true.
                     </li>
                     <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>
-                    <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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onaddtrack">addtrack</a></code> at <code><a href="#widl-SourceBuffer-textTracks">textTracks</a></code> attribute 
+                    <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to fire a <a href="http://www.w3.org/TR/html5/webappapis.html#concept-events-trusted">trusted event</a> named <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onaddtrack">addtrack</a></code>, that does not bubble and is not cancelable, and that uses the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#trackevent">TrackEvent</a></code> interface, at <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>
                     <li>Add <var>new text track</var> to the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-texttracks">textTracks</a></code> attribute on the HTMLMediaElement.</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onaddtrack">addtrack</a></code> at the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#texttracklist">TextTrackList</a></code> object referenced by the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-texttracks">textTracks</a></code> attribute on the 
+                    <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to fire a <a href="http://www.w3.org/TR/html5/webappapis.html#concept-events-trusted">trusted event</a> named <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onaddtrack">addtrack</a></code>, that does not bubble and is not cancelable, and that uses the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#trackevent">TrackEvent</a></code> interface, at the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#texttracklist">TextTrackList</a></code> object referenced by the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-texttracks">textTracks</a></code> attribute on the
                       HTMLMediaElement.</li>
                     <li>Create a new <a href="#track-buffer">track buffer</a> to store <a href="#coded-frame">coded frames</a> for this track.</li>
                     <li>Add the <a href="#track-description">track description</a> for this track to the <a href="#track-buffer">track buffer</a>.</li>
@@ -1705,7 +1726,11 @@
             <li>
 	      <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 presentation timestamp in seconds.</li>
+	        <li><i>Loop Top: </i>Let <var>presentation timestamp</var> be a double precision floating point representation of the coded frame's presentation timestamp in seconds.
+                  <div class="note"><div class="note-title"><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-formats">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"><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
@@ -1734,7 +1759,7 @@
                       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 should be added to.</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>
                 <li>
                   <dl class="switch">
                     <dt>If <var>discontinuity flag</var> equals true:</dt>
@@ -1781,25 +1806,36 @@
                     <li>Set the <var><a href="#need-RAP-flag">need random access point flag</a></var> on <var>track buffer</var> to false.</li>
                   </ol>
                 </li>
-                <li>Let <var>spliced frame</var> be an unset variable for holding audio splice information</li>
+                <li>Let <var>spliced audio frame</var> be an unset variable for holding audio splice information</li>
+                <li>Let <var>spliced timed text frame</var> be an unset variable for holding timed text splice information</li>
                 <li>If <var><a href="#last-decode-timestamp">last decode timestamp</a></var> for <var>track buffer</var> is unset and there is a <a href="#coded-frame">coded frame</a> in
                   <var>track buffer</var> with a presentation timestamp less than or equal to <var>presentation timestamp</var> and
                   <var>presentation timestamp</var> is less than this coded frame's presentation timestamp plus its frame duration, then run the
                   following steps:
                   <ol>
                     <li>Let <var>overlapped frame</var> be the <a href="#coded-frame">coded frame</a> in <var>track buffer</var> that matches the condition above.</li>
-                    <li>If <var>track buffer</var> contains audio <a href="#coded-frame">coded frames</a>, then run the <a href="#sourcebuffer-audio-splice-frame-algorithm">audio splice frame algorithm</a> and if a splice 
-                      frame is returned, assign it to <var>spliced frame</var>.</li>
-                    <li>Let <var>overlapped frame presentation timestamp</var> equal the presentation timestamp of <var>overlapped frame</var>.</li>
-                    <li>Let <var>remove window timestamp</var> equal <var>overlapped frame presentation timestamp</var> plus 1 microsecond.</li>
-                    <li>If <var>track buffer</var> contains video <a href="#coded-frame">coded frames</a> and 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"><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.
-                      </p></div>
+                    <li>
+                      <dl class="switch">
+                        <dt>If <var>track buffer</var> contains audio <a href="#coded-frame">coded frames</a>:</dt>
+                        <dd>Run the <a href="#sourcebuffer-audio-splice-frame-algorithm">audio splice frame algorithm</a> and if a splice frame is returned, assign it to <var>spliced audio frame</var>.</dd>
+                        <dt>If <var>track buffer</var> contains video <a href="#coded-frame">coded frames</a>:</dt>
+                        <dd>
+                          <ol>
+                            <li>Let <var>overlapped frame presentation timestamp</var> equal the presentation timestamp of <var>overlapped frame</var>.</li>
+                            <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"><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.
+                              </p></div>
+                            </li>
+                          </ol>
+                        </dd>
+                        <dt>If <var>track buffer</var> contains timed text <a href="#coded-frame">coded frames</a>:</dt>
+                        <dd>Run the <a href="#sourcebuffer-text-splice-frame-algorithm">text splice frame algorithm</a> and if a splice frame is returned, assign it to <var>spliced timed text frame</var>.</dd>
+                      </dl>
                     </li>
                   </ol>
                 </li>
@@ -1833,8 +1869,10 @@
                 </dl></li>
                 <li>
                   <dl class="switch">
-                    <dt>If <var>spliced frame</var> is set:</dt>
-                    <dd>Add <var>spliced frame</var> to the <var>track buffer</var>.</dd>
+                    <dt>If <var>spliced audio frame</var> is set:</dt>
+                    <dd>Add <var>spliced audio frame</var> to the <var>track buffer</var>.</dd>
+                    <dt>If <var>spliced timed text frame</var> is set:</dt>
+                    <dd>Add <var>spliced timed text frame</var> to the <var>track buffer</var>.</dd>
                     <dt>Otherwise:</dt>
                     <dd>Add the <a href="#coded-frame">coded frame</a> with the <var>presentation timestamp</var>, <var>decode timestamp</var>, and <var>frame duration</var> to the
                       <var>track buffer</var>.</dd>
@@ -2000,7 +2038,7 @@
         </section>
         <section id="sourcebuffer-audio-splice-rendering-algorithm">
           <h4><span class="secno">3.5.11 </span>Audio Splice Rendering Algorithm</h4>
-          <p>The following steps are run when a spliced frame, generated by the <a href="#sourcebuffer-audio-splice-frame-algorithm">audio splice frame algorithm</a>, needs to be rendered by the 
+          <p>The following steps are run when a spliced frame, generated by the <a href="#sourcebuffer-audio-splice-frame-algorithm">audio splice frame algorithm</a>, needs to be rendered by the
             media element:</p>
           <ol>
             <li>Let <var>fade out coded frames</var> be the <a href="#coded-frame">coded frames</a> that are faded out during the splice.</li>
@@ -2031,6 +2069,32 @@
             <img src="audio_splice.png" alt="Audio splice diagram">
           </div></div>
         </section>
+        <section id="sourcebuffer-text-splice-frame-algorithm">
+          <h4><span class="secno">3.5.12 </span>Text Splice Frame Algorithm</h4>
+          <p>Follow these steps when the <a href="#sourcebuffer-coded-frame-processing">coded frame processing algorithm</a> needs to generate a splice frame for two overlapping timed text
+            <a href="#coded-frame">coded frames</a>:</p>
+          <ol>
+            <li>Let <var>track buffer</var> be the <a href="#track-buffer">track buffer</a> that will contain the splice.</li>
+            <li>Let <var>new coded frame</var> be the new <a href="#coded-frame">coded frame</a>, that is being added to <var>track buffer</var>, which triggered the need for a splice.</li>
+            <li>Let <var>presentation timestamp</var> be the presentation timestamp for <var>new coded frame</var></li>
+            <li>Let <var>decode timestamp</var> be the decode timestamp for <var>new coded frame</var>.</li>
+            <li>Let <var>frame duration</var> be the duration of <var>new coded frame</var>.</li>
+            <li>Let <var>frame end timestamp</var> equal the sum of <var>presentation timestamp</var> and <var>frame duration</var>.</li>
+            <li>Let <var>first overlapped frame</var> be the <a href="#coded-frame">coded frame</a> in <var>track buffer</var> with a presentation timestamp less than or equal to
+              <var>presentation timestamp</var> and <var>presentation timestamp</var> is less than this coded frame's presentation timestamp plus its frame duration.
+            </li>
+            <li>Let <var>overlapped presentation timestamp</var> be the presentation timestamp of the <var>first overlapped frame</var>.</li>
+            <li>Let <var>overlapped frames</var> equal <var>first overlapped frame</var> as well as any additional frames in <var>track buffer</var> that
+              have a presentation timestamp greater than <var>presentation timestamp</var> and less than <var>frame end timestamp</var>.</li>
+            <li>Remove all the frames included in <var>overlapped frames</var> from <var>track buffer</var>.
+            </li><li>Update the frame duration 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"><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>
+        </section>
       </section>
     </section>
 
@@ -2078,18 +2142,21 @@
       </section>
     </section>
 
-    <section id="mediaplaybackquality">
-      <!--OddPage--><h2><span class="secno">5. </span>MediaPlaybackQuality Object</h2>
-      <pre class="idl"><span class="idlInterface" id="idl-def-MediaPlaybackQuality">interface <span class="idlInterfaceID">MediaPlaybackQuality</span> {
-<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><code><a href="http://www.w3.org/TR/hr-time/#sec-DOMHighResTimeStamp" class="idlType">DOMHighResTimeStamp</a></code></span> <span class="idlAttrName"><a href="#widl-MediaPlaybackQuality-creationTime">creationTime</a></span>;</span>
-<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unsigned-long" class="idlType">unsigned long</a></code></span>       <span class="idlAttrName"><a href="#widl-MediaPlaybackQuality-totalVideoFrames">totalVideoFrames</a></span>;</span>
-<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unsigned-long" class="idlType">unsigned long</a></code></span>       <span class="idlAttrName"><a href="#widl-MediaPlaybackQuality-droppedVideoFrames">droppedVideoFrames</a></span>;</span>
-};</span></pre><section id="attributes-3"><h3><span class="secno">5.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-MediaPlaybackQuality-creationTime"><code>creationTime</code> of type <span class="idlAttrType"><code><a href="http://www.w3.org/TR/hr-time/#sec-DOMHighResTimeStamp" class="idlType">DOMHighResTimeStamp</a></code></span>, readonly   </dt><dd>
+    <section id="videoplaybackquality">
+      <!--OddPage--><h2><span class="secno">5. </span>VideoPlaybackQuality Object</h2>
+      <pre class="idl"><span class="idlInterface" id="idl-def-VideoPlaybackQuality">interface <span class="idlInterfaceID">VideoPlaybackQuality</span> {
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><code><a href="http://www.w3.org/TR/hr-time/#sec-DOMHighResTimeStamp" class="idlType">DOMHighResTimeStamp</a></code></span> <span class="idlAttrName"><a href="#widl-VideoPlaybackQuality-creationTime">creationTime</a></span>;</span>
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unsigned-long" class="idlType">unsigned long</a></code></span>       <span class="idlAttrName"><a href="#widl-VideoPlaybackQuality-totalVideoFrames">totalVideoFrames</a></span>;</span>
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unsigned-long" class="idlType">unsigned long</a></code></span>       <span class="idlAttrName"><a href="#widl-VideoPlaybackQuality-droppedVideoFrames">droppedVideoFrames</a></span>;</span>
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unsigned-long" class="idlType">unsigned long</a></code></span>       <span class="idlAttrName"><a href="#widl-VideoPlaybackQuality-corruptedVideoFrames">corruptedVideoFrames</a></span>;</span>
+};</span></pre><section id="attributes-3"><h3><span class="secno">5.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-VideoPlaybackQuality-corruptedVideoFrames"><code>corruptedVideoFrames</code> of type <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unsigned-long" class="idlType">unsigned long</a></code></span>, readonly   </dt><dd>
+          <p>The total number of corrupted frames that have been detected.</p>
+        </dd><dt id="widl-VideoPlaybackQuality-creationTime"><code>creationTime</code> of type <span class="idlAttrType"><code><a href="http://www.w3.org/TR/hr-time/#sec-DOMHighResTimeStamp" class="idlType">DOMHighResTimeStamp</a></code></span>, readonly   </dt><dd>
           <p>The timestamp returned by <a href="http://www.w3.org/TR/hr-time/#dom-performance-now">Performance.now()</a> when this object was created.</p>
-        </dd><dt id="widl-MediaPlaybackQuality-droppedVideoFrames"><code>droppedVideoFrames</code> of type <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unsigned-long" class="idlType">unsigned long</a></code></span>, readonly   </dt><dd>
+        </dd><dt id="widl-VideoPlaybackQuality-droppedVideoFrames"><code>droppedVideoFrames</code> of type <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unsigned-long" class="idlType">unsigned long</a></code></span>, readonly   </dt><dd>
           <p>The total number of frames dropped predecode or dropped because the frame missed
             its display deadline.</p>
-        </dd><dt id="widl-MediaPlaybackQuality-totalVideoFrames"><code>totalVideoFrames</code> of type <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unsigned-long" class="idlType">unsigned long</a></code></span>, readonly   </dt><dd>
+        </dd><dt id="widl-VideoPlaybackQuality-totalVideoFrames"><code>totalVideoFrames</code> of type <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unsigned-long" class="idlType">unsigned long</a></code></span>, readonly   </dt><dd>
           <p>The total number of frames that would have been displayed if no frames are dropped.</p>
         </dd></dl></section>
     </section>
@@ -2115,78 +2182,83 @@
 
     <section id="htmlmediaelement-extensions">
       <!--OddPage--><h2><span class="secno">7. </span>HTMLMediaElement Extensions</h2>
-
-      <section id="htmlmediaelement-existing-attributes">
-        <h3><span class="secno">7.1 </span>Modifications to Existing Attribute Behavior</h3>
-        <p>This section specifies what existing attributes on the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a></code> should return when a <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> is attached to the element.</p>
-
-        <p>The <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seekable">HTMLMediaElement.seekable</a> attribute returns a new static <a href="http://www.w3.org/TR/html5/embedded-content-0.html#normalized-timeranges-object">normalized TimeRanges object</a> created based on the following steps:</p>
-        <dl class="switch">
-          <dt>If <code><a href="#widl-MediaSource-duration">duration</a></code> equals NaN</dt>
-          <dd>Return an empty <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#timeranges">TimeRanges</a></code> object.</dd>
-          <dt>If <code><a href="#widl-MediaSource-duration">duration</a></code> equals positive Infinity</dt>
-          <dd>Return a single range with a start time of 0 and an end time equal to the highest end time reported by the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-buffered">HTMLMediaElement.buffered</a></code> attribute.</dd>
-          <dt>Otherwise</dt>
-          <dd>Return a single range with a start time of 0 and an end time equal to <code><a href="#widl-MediaSource-duration">duration</a></code>.</dd>
-        </dl>
+      <p>This section specifies what existing attributes on the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a></code> must return when a <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> is attached to the element.</p>
 
-        <p id="dom-htmlmediaelement.buffered">The <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-buffered">HTMLMediaElement.buffered</a></code> attribute returns a new static <a href="http://www.w3.org/TR/html5/embedded-content-0.html#normalized-timeranges-object">normalized TimeRanges object</a> created based on the following steps:</p>
-        <ol>
-          <li>If <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>.length equals 0 then return an empty <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#timeranges">TimeRanges</a></code> object and abort these steps.</li>
-          <li>Let <var>active ranges</var> be the ranges returned by <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> for each <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>.</li>
-          <li>Let <var>highest end time</var> be the largest range end time in the <var>active ranges</var>.</li>
-          <li>Let <var>intersection ranges</var> equal a <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#timeranges">TimeRange</a></code> object containing a single range from 0 to <var>highest end time</var>.</li>
-          <li>For each <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> run the following steps:
-            <ol>
-              <li>Let <var>source ranges</var> equal the ranges returned by the <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> attribute on the current <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>.</li>
-              <li>If <code><a href="#widl-MediaSource-readyState">readyState</a></code> is <code><a href="#idl-def-ReadyState.ended">"ended"</a></code>, then set the end time on the last range in <var>source ranges</var> to
-                <var>highest end time</var>.</li>
-              <li>Let <var>new intersection ranges</var> equal the the intersection between the <var>intersection ranges</var> and the <var>source ranges</var>.</li>
-              <li>Replace the ranges in <var>intersection ranges</var> with the <var>new intersection ranges</var>.</li>
-            </ol>
-          </li>
-          <li>Return the <var>intersection ranges</var>.</li>
-        </ol>
-      </section>
-      <section id="htmlmediaelement-new-attributes">
-        <h3><span class="secno">7.2 </span>New Attributes and Behavior</h3>
-        <p>This section specifies new attributes and internal state that are being added to the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a></code>.</p>
+      <p>The <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seekable">HTMLMediaElement.seekable</a> attribute returns a new static <a href="http://www.w3.org/TR/html5/embedded-content-0.html#normalized-timeranges-object">normalized TimeRanges object</a> created based on the following steps:</p>
+      <dl class="switch">
+        <dt>If <code><a href="#widl-MediaSource-duration">duration</a></code> equals NaN</dt>
+        <dd>Return an empty <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#timeranges">TimeRanges</a></code> object.</dd>
+        <dt>If <code><a href="#widl-MediaSource-duration">duration</a></code> equals positive Infinity</dt>
+        <dd>Return a single range with a start time of 0 and an end time equal to the highest end time reported by the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-buffered">HTMLMediaElement.buffered</a></code> attribute.</dd>
+        <dt>Otherwise</dt>
+        <dd>Return a single range with a start time of 0 and an end time equal to <code><a href="#widl-MediaSource-duration">duration</a></code>.</dd>
+      </dl>
 
-        <p>Each <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a></code> will maintain a <dfn id="total-video-frame-count">total video frame count</dfn> variable that keeps
-          track of the total number of frames that have been displayed and dropped. This variable is initialized to 0 when the
-          element is created and whenever the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-element-load-algorithm">media element load algorithm</a> is invoked. It is incremented when a video frame is displayed
-          or when the <var><a href="#dropped-video-frame-count">dropped video frame count</a></var> is incremented.</p>
-
-        <p>Each <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a></code> will maintain a <dfn id="dropped-video-frame-count">dropped video frame count</dfn> variable that keeps
-          track of the total number of frames that have been dropped. This variable is initialized to 0 when the
-          element is created and whenever the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-element-load-algorithm">media element load algorithm</a> is invoked. It is incremented when a video frame is dropped
-          predecode or when a frame is decoded but dropped because it missed a display deadline.</p>
+      <p id="dom-htmlmediaelement.buffered">The <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-buffered">HTMLMediaElement.buffered</a></code> attribute returns a new static <a href="http://www.w3.org/TR/html5/embedded-content-0.html#normalized-timeranges-object">normalized TimeRanges object</a> created based on the following steps:</p>
+      <ol>
+        <li>If <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>.length equals 0 then return an empty <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#timeranges">TimeRanges</a></code> object and abort these steps.</li>
+        <li>Let <var>active ranges</var> be the ranges returned by <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> for each <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>.</li>
+        <li>Let <var>highest end time</var> be the largest range end time in the <var>active ranges</var>.</li>
+        <li>Let <var>intersection ranges</var> equal a <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#timeranges">TimeRange</a></code> object containing a single range from 0 to <var>highest end time</var>.</li>
+        <li>For each <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> run the following steps:
+          <ol>
+            <li>Let <var>source ranges</var> equal the ranges returned by the <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> attribute on the current <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>.</li>
+            <li>If <code><a href="#widl-MediaSource-readyState">readyState</a></code> is <code><a href="#idl-def-ReadyState.ended">"ended"</a></code>, then set the end time on the last range in <var>source ranges</var> to
+              <var>highest end time</var>.</li>
+            <li>Let <var>new intersection ranges</var> equal the the intersection between the <var>intersection ranges</var> and the <var>source ranges</var>.</li>
+            <li>Replace the ranges in <var>intersection ranges</var> with the <var>new intersection ranges</var>.</li>
+          </ol>
+        </li>
+        <li>Return the <var>intersection ranges</var>.</li>
+      </ol>
+    </section>
 
-        <pre class="idl"><span class="idlInterface" id="idl-def-HTMLMediaElement">partial interface <span class="idlInterfaceID">HTMLMediaElement</span> {
-<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><a href="#idl-def-MediaPlaybackQuality" class="idlType"><code>MediaPlaybackQuality</code></a></span> <span class="idlAttrName"><a href="#widl-HTMLMediaElement-playbackQuality">playbackQuality</a></span>;</span>
-};</span></pre><section id="attributes-4"><h4><span class="secno">7.2.1 </span>Attributes</h4><dl class="attributes"><dt id="widl-HTMLMediaElement-playbackQuality"><code>playbackQuality</code> of type <span class="idlAttrType"><a href="#idl-def-MediaPlaybackQuality" class="idlType"><code>MediaPlaybackQuality</code></a></span>, readonly   </dt><dd>
-            <p>Provides the current the playback quality metrics.</p>
-            <p>On getting, run the following steps:</p>
-            <ol>
-              <li>Let <var>playbackQuality</var> be a new instance of <a href="#idl-def-MediaPlaybackQuality" class="idlType"><code>MediaPlaybackQuality</code></a>.</li>
-              <li>Set <var>playbackQuality</var>.<code><a href="#widl-MediaPlaybackQuality-creationTime">creationTime</a></code> to the value returned by a call to <a href="http://www.w3.org/TR/hr-time/#dom-performance-now">Performance.now()</a>.</li>
-              <li>Set <var>playbackQuality</var>.<code><a href="#widl-MediaPlaybackQuality-totalVideoFrames">totalVideoFrames</a></code> to the current value of the <var><a href="#total-video-frame-count">total video frame count</a></var>.</li>
-              <li>Set <var>playbackQuality</var>.<code><a href="#widl-MediaPlaybackQuality-droppedVideoFrames">droppedVideoFrames</a></code> to the current value of the <var><a href="#dropped-video-frame-count">dropped video frame count</a></var>.</li>
-              <li>Return <var>playbackQuality</var>.</li>
-            </ol>
-          </dd></dl></section>
-      </section>
+    <section id="htmlvideoelement-extensions">
+      <!--OddPage--><h2><span class="secno">8. </span>HTMLVideoElement Extensions</h2>
+      <p>This section specifies new attributes and internal state that are being added to the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlvideoelement">HTMLVideoElement</a></code>.</p>
+
+      <p>Each <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlvideoelement">HTMLVideoElement</a></code> will maintain a <dfn id="total-video-frame-count">total video frame count</dfn> variable that keeps
+        track of the total number of frames that have been displayed and dropped. This variable is initialized to 0 when the
+        element is created and whenever the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-element-load-algorithm">media element load algorithm</a> is invoked. It is incremented when a video frame is displayed
+        or when the <var><a href="#dropped-video-frame-count">dropped video frame count</a></var> is incremented.</p>
+
+      <p>Each <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlvideoelement">HTMLVideoElement</a></code> will maintain a <dfn id="dropped-video-frame-count">dropped video frame count</dfn> variable that keeps
+        track of the total number of frames that have been dropped. This variable is initialized to 0 when the
+        element is created and whenever the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-element-load-algorithm">media element load algorithm</a> is invoked. It is incremented when a video frame is dropped
+        predecode or when a frame is decoded but dropped because it missed a display deadline.</p>
+
+      <p>Each <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlvideoelement">HTMLVideoElement</a></code> will maintain a <dfn id="corrupted-video-frame-count">corrupted video frame count</dfn> variable that keeps
+        track of the total number of corrupted frames detected. This variable is initialized to 0 when the element is created and whenever the
+        <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-element-load-algorithm">media element load algorithm</a> is invoked. It is incremented when a corrupted video frame is detected by the decoder. It is up to
+        the implementation to determine whether to display or drop a corrupted frame. Whichever choice is made, the <var><a href="#total-video-frame-count">total video frame count</a></var>
+        and <var><a href="#dropped-video-frame-count">dropped video frame count</a></var> must be updated appropriately.
+      </p>
+
+      <pre class="idl"><span class="idlInterface" id="idl-def-HTMLVideoElement">partial interface <span class="idlInterfaceID">HTMLVideoElement</span> {
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><a href="#idl-def-VideoPlaybackQuality" class="idlType"><code>VideoPlaybackQuality</code></a></span> <span class="idlAttrName"><a href="#widl-HTMLVideoElement-videoPlaybackQuality">videoPlaybackQuality</a></span>;</span>
+};</span></pre><section id="attributes-4"><h3><span class="secno">8.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-HTMLVideoElement-videoPlaybackQuality"><code>videoPlaybackQuality</code> of type <span class="idlAttrType"><a href="#idl-def-VideoPlaybackQuality" class="idlType"><code>VideoPlaybackQuality</code></a></span>, readonly   </dt><dd>
+          <p>Provides the current the playback quality metrics.</p>
+          <p>On getting, run the following steps:</p>
+          <ol>
+            <li>Let <var>playbackQuality</var> be a new instance of <a href="#idl-def-VideoPlaybackQuality" class="idlType"><code>VideoPlaybackQuality</code></a>.</li>
+            <li>Set <var>playbackQuality</var>.<code><a href="#widl-VideoPlaybackQuality-creationTime">creationTime</a></code> to the value returned by a call to <a href="http://www.w3.org/TR/hr-time/#dom-performance-now">Performance.now()</a>.</li>
+            <li>Set <var>playbackQuality</var>.<code><a href="#widl-VideoPlaybackQuality-totalVideoFrames">totalVideoFrames</a></code> to the current value of the <var><a href="#total-video-frame-count">total video frame count</a></var>.</li>
+            <li>Set <var>playbackQuality</var>.<code><a href="#widl-VideoPlaybackQuality-droppedVideoFrames">droppedVideoFrames</a></code> to the current value of the <var><a href="#dropped-video-frame-count">dropped video frame count</a></var>.</li>
+            <li>Set <var>playbackQuality</var>.<code><a href="#widl-VideoPlaybackQuality-corruptedVideoFrames">corruptedVideoFrames</a></code> to the current value of the <var><a href="#corrupted-video-frame-count">corrupted video frame count</a></var>.</li>
+            <li>Return <var>playbackQuality</var>.</li>
+          </ol>
+        </dd></dl></section>
     </section>
 
     <section id="audio-track-extensions">
-      <!--OddPage--><h2><span class="secno">8. </span>AudioTrack Extensions</h2>
+      <!--OddPage--><h2><span class="secno">9. </span>AudioTrack Extensions</h2>
       <p>This section specifies extensions to the HTML <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotrack">AudioTrack</a></code> definition.</p>
 
       <pre class="idl"><span class="idlInterface" id="idl-def-AudioTrack">partial interface <span class="idlInterfaceID">AudioTrack</span> {
 <span class="idlAttribute">                attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span>     <span class="idlAttrName"><a href="#widl-AudioTrack-kind">kind</a></span>;</span>
 <span class="idlAttribute">                attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span>     <span class="idlAttrName"><a href="#widl-AudioTrack-language">language</a></span>;</span>
 <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>
-};</span></pre><section id="attributes-5"><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"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span>,            </dt><dd>
+};</span></pre><section id="attributes-5"><h3><span class="secno">9.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-AudioTrack-kind"><code>kind</code> of type <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span>,            </dt><dd>
           <p>Allows the web application to get and update the track <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-audiotrack-kind">kind</a></code>.</p>
           <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
             the last successful set operation.</p><p>
@@ -2224,14 +2296,14 @@
     </section>
 
     <section id="video-track-extensions">
-      <!--OddPage--><h2><span class="secno">9. </span>VideoTrack Extensions</h2>
+      <!--OddPage--><h2><span class="secno">10. </span>VideoTrack Extensions</h2>
       <p>This section specifies extensions to the HTML <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotrack">VideoTrack</a></code> definition.</p>
 
       <pre class="idl"><span class="idlInterface" id="idl-def-VideoTrack">partial interface <span class="idlInterfaceID">VideoTrack</span> {
 <span class="idlAttribute">                attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span>     <span class="idlAttrName"><a href="#widl-VideoTrack-kind">kind</a></span>;</span>
 <span class="idlAttribute">                attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span>     <span class="idlAttrName"><a href="#widl-VideoTrack-language">language</a></span>;</span>
 <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>
-};</span></pre><section id="attributes-6"><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"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span>,            </dt><dd>
+};</span></pre><section id="attributes-6"><h3><span class="secno">10.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-VideoTrack-kind"><code>kind</code> of type <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span>,            </dt><dd>
           <p>Allows the web application to get and update the track <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-videotrack-kind">kind</a></code>.</p>
           <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
             the last successful set operation.</p><p>
@@ -2268,14 +2340,14 @@
         </dd></dl></section></section>
 
     <section id="text-track-extensions">
-      <!--OddPage--><h2><span class="secno">10. </span>TextTrack Extensions</h2>
+      <!--OddPage--><h2><span class="secno">11. </span>TextTrack Extensions</h2>
       <p>This section specifies extensions to the HTML <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#texttrack">TextTrack</a></code> definition.</p>
 
       <pre class="idl"><span class="idlInterface" id="idl-def-TextTrack">partial interface <span class="idlInterfaceID">TextTrack</span> {
 <span class="idlAttribute">                attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span>     <span class="idlAttrName"><a href="#widl-TextTrack-kind">kind</a></span>;</span>
 <span class="idlAttribute">                attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span>     <span class="idlAttrName"><a href="#widl-TextTrack-language">language</a></span>;</span>
 <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>
-};</span></pre><section id="attributes-7"><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"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span>,            </dt><dd>
+};</span></pre><section id="attributes-7"><h3><span class="secno">11.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-TextTrack-kind"><code>kind</code> of type <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span>,            </dt><dd>
           <p>Allows the web application to get and update the track <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-kind">kind</a></code>.</p>
           <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
             the last successful set operation.</p><p>
@@ -2313,7 +2385,7 @@
         </dd></dl></section></section>
 
     <section id="byte-stream-formats">
-      <!--OddPage--><h2><span class="secno">11. </span>Byte Stream Formats</h2>
+      <!--OddPage--><h2><span class="secno">12. </span>Byte Stream Formats</h2>
       <p>The bytes provided through <code><a href="#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data">appendBuffer()</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>
       <p>This section provides general requirements for all byte stream formats:</p>
       <ul>
@@ -2371,11 +2443,11 @@
       <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>
 
       <section id="webm" class="nonnormative">
-        <h3><span class="secno">11.1 </span>WebM Byte Streams</h3>
+        <h3><span class="secno">12.1 </span>WebM Byte Streams</h3>
         <p>This section defines segment formats for implementations that choose to support WebM.</p>
 
         <section id="webm-init-segments">
-          <h4><span class="secno">11.1.1 </span>Initialization Segments</h4>
+          <h4><span class="secno">12.1.1 </span>Initialization Segments</h4>
           <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>
           <p>The following rules apply to WebM initialization segments:</p>
           <ol>
@@ -2387,7 +2459,7 @@
         </section>
 
         <section id="webm-media-segments">
-          <h4><span class="secno">11.1.2 </span>Media Segments</h4>
+          <h4><span class="secno">12.1.2 </span>Media Segments</h4>
           <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>
           <p>The following rules apply to WebM media segments:</p>
           <ol>
@@ -2403,18 +2475,18 @@
         </section>
 
         <section id="webm-random-access-points">
-          <h4><span class="secno">11.1.3 </span>Random Access Points</h4>
+          <h4><span class="secno">12.1.3 </span>Random Access Points</h4>
           <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>
         </section>
       </section>
       
       <section id="iso" class="nonnormative">
-        <h3><span class="secno">11.2 </span>ISO Base Media File Format Byte Streams</h3>
+        <h3><span class="secno">12.2 </span>ISO Base Media File Format Byte Streams</h3>
         <p>This section defines segment formats for implementations that choose to support the ISO Base Media File Format
 	  <a href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c061988_ISO_IEC_14496-12_2012.zip">ISO/IEC 14496-12</a> (ISO BMFF).</p> 
 
 	<section id="iso-init-segments">
-          <h4><span class="secno">11.2.1 </span>Initialization Segments</h4>
+          <h4><span class="secno">12.2.1 </span>Initialization Segments</h4>
           <p>An ISO BMFF <a href="#init-segment">initialization segment</a> is defined in this specification as 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
@@ -2427,7 +2499,7 @@
 	</section>
         
 	<section id="iso-media-segments">
-          <h4><span class="secno">11.2.2 </span>Media Segments</h4>
+          <h4><span class="secno">12.2.2 </span>Media Segments</h4>
           <p>An ISO BMFF <a href="#media-segment">media segment</a> is defined in this specification as 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>
           <p>Valid top-level boxes defined in <a href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c061988_ISO_IEC_14496-12_2012.zip">ISO/IEC 14496-12</a> other than <span class="iso-box">moov</span>, 
@@ -2448,18 +2520,18 @@
 	</section>
 
 	<section id="iso-random-access-points">
-          <h4><span class="secno">11.2.3 </span>Random Access Points</h4>
+          <h4><span class="secno">12.2.3 </span>Random Access Points</h4>
           <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>
 	</section>
       </section>
 
       <section id="mpeg2ts" class="nonnormative">
-        <h3><span class="secno">11.3 </span>MPEG-2 Transport Stream Byte Streams</h3>
+        <h3><span class="secno">12.3 </span>MPEG-2 Transport Stream Byte Streams</h3>
         <p>This section defines segment formats for implementations that choose to support MPEG-2 Transport Streams
           (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>
         
         <section id="mpeg2ts-general">
-          <h4><span class="secno">11.3.1 </span>General</h4>
+          <h4><span class="secno">12.3.1 </span>General</h4>
           <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>
           <p>The following rules must apply to all MPEG-2 TS segments:</p>
           <ol>
@@ -2470,13 +2542,13 @@
           </ol>
         </section>
         <section id="mpeg2ts-init-segments">
-          <h4><span class="secno">11.3.2 </span>Initialization Segments</h4>
+          <h4><span class="secno">12.3.2 </span>Initialization Segments</h4>
           <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
             media segments, may be present.</p>
         </section>
   
         <section id="mpeg2ts-media-segments">
-          <h4><span class="secno">11.3.3 </span>Media Segments</h4>
+          <h4><span class="secno">12.3.3 </span>Media Segments</h4>
           <p>The following rules apply to all MPEG-2 TS media segments:</p>
           <ol>
             <li>PSI that is identical to the information in the initialization segment may appear repeatedly throughout the segment.</li>
@@ -2489,12 +2561,12 @@
         </section>
 
         <section id="mpeg2ts-random-access-points">
-          <h4><span class="secno">11.3.4 </span>Random Access Points</h4>
+          <h4><span class="secno">12.3.4 </span>Random Access Points</h4>
           <p>A random access point as defined in this specification corresponds to Elementary Stream Random Access Point as defined in 
             <a href="http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=44169">ISO/IEC 13818-1</a>.</p>
         </section>
         <section id="mpeg2ts-discontinuities">
-          <h4><span class="secno">11.3.5 </span>Timestamp Rollover &amp; Discontinuities</h4>
+          <h4><span class="secno">12.3.5 </span>Timestamp Rollover &amp; Discontinuities</h4>
           <p>Timestamp rollovers and discontinuities must be handled by the UA. The UA's MPEG-2 TS implementation must maintain an internal offset
           variable, <dfn id="mpeg2ts-timestampOffset">MPEG2TS_timestampOffset</dfn>, to keep track of the offset that needs to be applied to timestamps
           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 
@@ -2519,7 +2591,7 @@
 
 
     <section id="examples">
-      <!--OddPage--><h2><span class="secno">12. </span>Examples</h2>
+      <!--OddPage--><h2><span class="secno">13. </span>Examples</h2>
       <p>Example use of the Media Source Extensions</p>
       <div class="block">
         <div class="blockContent">
@@ -2609,12 +2681,12 @@
     </section>
 
     <section id="acknowledgements">
-      <!--OddPage--><h2><span class="secno">13. </span>Acknowledgments</h2>
+      <!--OddPage--><h2><span class="secno">14. </span>Acknowledgments</h2>
       The editors would like to thank Alex Giladi, Bob Lund, Cyril Concolato, David Dorwin, David Singer, Duncan Rowden, Frank Galligan, Glenn Adams, Jerry Smith, Joe Steele, John Simmons, Kevin Streeter, Mark Vickers, Matt Ward, Michael Thornburgh, Philip J├Ągenstedt, Pierre Lemieux, Ralph Giles, and Steven Robertson for their contributions to this specification.
     </section>
 
     <section id="revision-history">
-      <!--OddPage--><h2><span class="secno">14. </span>Revision History</h2>
+      <!--OddPage--><h2><span class="secno">15. </span>Revision History</h2>
       <table class="old-table">
         <thead>
           <tr>
@@ -2624,7 +2696,21 @@
         </thead>
         <tbody>
           <tr>
-            <td>13 May 2013</td>
+            <td>01 June 2013</td>
+            <td>
+              <ul>
+                <li>Bug 21431 - Updated coded frame processing algorithm for text splicing.</li>
+                <li>Bug 22035 - Update addtrack and removetrack event firing text to match HTML5 language.</li>
+                <li>Bug 22111 - Remove useless playback sentence from end of stream algorithm.</li>
+                <li>Bug 22052 - Add corrupted frame metric.</li>
+                <li>Bug 22062 - Added links for filing bugs.</li>
+                <li>Bug 22125 - Add "ended" to "open" transition to remove().</li>
+                <li>Bug 22143 - Move HTMLMediaElement.playbackQuality to HTMLVideoElement.videoPlaybackQuality.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/71968956733e/media-source/media-source.html">13 May 2013</a></td>
             <td>
               <ul>
                 <li>Bug 21954 - Add [EnforceRange] to appendStream's maxSize parameter.</li>
@@ -2944,4 +3030,4 @@
 </dd><dt id="bib-HTML5">[HTML5]</dt><dd>Robin Berjon et al. <a href="http://www.w3.org/TR/html5/"><cite>HTML5</cite></a>. 17 December 2012. W3C Candidate Recommendation. URL: <a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a>
 </dd><dt id="bib-STREAMS-API">[STREAMS-API]</dt><dd>Feras Moussa. <a href="http://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm"><cite>Streams API</cite></a>. 25 October 2012. W3C Editor's Draft. URL: <a href="http://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm">http://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm</a>
 </dd><dt id="bib-TYPED-ARRAYS">[TYPED-ARRAYS]</dt><dd>David Herman, Kenneth Russell. <a href="https://www.khronos.org/registry/typedarray/specs/latest/"><cite>Typed Arrays</cite></a> Khronos Working Draft. (Work in progress.) URL: <a href="https://www.khronos.org/registry/typedarray/specs/latest/">https://www.khronos.org/registry/typedarray/specs/latest/</a> 
-</dd></dl></section></section></body></html>
+</dd></dl></section></section><form action="//www.w3.org/Bugs/Public/enter_bug.cgi" target="_blank" style="position: fixed; width: 10em; top: 1em; right: 1em; font-family: Tahoma, sans-serif; font-size: 11px; opacity: 0.8; text-align: right;">See a problem? Select text and <input type="submit" accesskey="f" value="file a bug" style="font-family: Tahoma, sans-serif; font-size: 10px;"><input type="hidden" name="comment" value=""><input type="hidden" name="short_desc" value="[MSE] "><input type="hidden" name="product" value="HTML WG"><input type="hidden" name="component" value="Media Source Extensions">.</form></body></html>
--- a/media-source/media-source.js	Tue May 28 07:57:17 2013 -0700
+++ b/media-source/media-source.js	Sat Jun 01 12:58:28 2013 -0700
@@ -67,6 +67,17 @@
     df.appendChild(doc.createTextNode(' named'));
   }
 
+  function queue_and_fire_track_event_helper(doc, df, id, text) {
+    webappapis_helper(doc, df, 'queue-a-task', 'Queue a task');
+    df.appendChild(doc.createTextNode(' to fire a '));
+    webappapis_helper(doc, df, 'concept-events-trusted', 'trusted event');
+    df.appendChild(doc.createTextNode(' named '));
+    code_videoref_helper(doc, df, 'handler-tracklist-on' + text, text);
+    df.appendChild(doc.createTextNode(', that does not bubble and is not cancelable, and that uses the '));
+    code_videoref_helper(doc, df, 'trackevent', 'TrackEvent');
+    df.appendChild(doc.createTextNode(' interface,'));
+  }
+
   function fragment_helper(doc, df, id, text) {
     var f = doc.createElement('span')
     f.innerHTML = text;
@@ -144,9 +155,10 @@
     'mode': { func: idlref_helper, fragment: 'widl-SourceBuffer-mode', link_text: 'mode',  },
 
     'length': { func: idlref_helper, fragment: 'widl-SourceBufferList-length', link_text: 'length',  },
-    'creationTime': { func: idlref_helper, fragment: 'widl-MediaPlaybackQuality-creationTime', link_text: 'creationTime',  },
-    'totalVideoFrames': { func: idlref_helper, fragment: 'widl-MediaPlaybackQuality-totalVideoFrames', link_text: 'totalVideoFrames',  },
-    'droppedVideoFrames': { func: idlref_helper, fragment: 'widl-MediaPlaybackQuality-droppedVideoFrames', link_text: 'droppedVideoFrames',  },
+    'creationTime': { func: idlref_helper, fragment: 'widl-VideoPlaybackQuality-creationTime', link_text: 'creationTime',  },
+    'totalVideoFrames': { func: idlref_helper, fragment: 'widl-VideoPlaybackQuality-totalVideoFrames', link_text: 'totalVideoFrames',  },
+    'droppedVideoFrames': { func: idlref_helper, fragment: 'widl-VideoPlaybackQuality-droppedVideoFrames', link_text: 'droppedVideoFrames',  },
+    'corruptedVideoFrames': { func: idlref_helper, fragment: 'widl-VideoPlaybackQuality-corruptedVideoFrames', link_text: 'corruptedVideoFrames',  },
     'createObjectURL': { func: idlref_helper, fragment: 'widl-URL-createObjectURL-DOMString-MediaSource-mediaSource', link_text: 'createObjectURL()',  },
     'open': { func: idlref_helper, fragment: 'idl-def-ReadyState.open', link_text: '"open"',  },
     'closed': { func: idlref_helper, fragment: 'idl-def-ReadyState.closed', link_text: '"closed"',  },
@@ -202,6 +214,7 @@
     'coded-frame-eviction-algorithm': { func: link_helper, fragment: '#sourcebuffer-coded-frame-eviction', link_text: 'coded frame eviction algorithm', },
     'audio-splice-frame-algorithm': { func: link_helper, fragment: '#sourcebuffer-audio-splice-frame-algorithm', link_text: 'audio splice frame algorithm', },
     'audio-splice-rendering-algorithm': { func: link_helper, fragment: '#sourcebuffer-audio-splice-rendering-algorithm', link_text: 'audio splice rendering algorithm', },
+    'text-splice-frame-algorithm': { func: link_helper, fragment: '#sourcebuffer-text-splice-frame-algorithm', link_text: 'text splice frame algorithm', },
     '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', },
     'sequence-start-timestamp': { func: var_helper, fragment: '#sourcebuffer-sequence-start-timestamp', link_text: 'sequence start timestamp', },
@@ -238,8 +251,6 @@
     'timerange': { func: code_videoref_helper, fragment: 'timeranges', link_text: 'TimeRange',  },
     'timeranges': { func: code_videoref_helper, fragment: 'timeranges', link_text: 'TimeRanges',  },
     'tracklist-change': { func: code_videoref_helper, fragment: 'handler-tracklist-onchange', link_text: 'change',  },
-    'tracklist-addtrack': { func: code_videoref_helper, fragment: 'handler-tracklist-onaddtrack', link_text: 'addtrack',  },
-    'tracklist-removetrack': { func: code_videoref_helper, fragment: 'handler-tracklist-onremovetrack', link_text: 'removetrack',  },
     'video-track': { func: code_videoref_helper, fragment: 'videotrack', link_text: 'VideoTrack',  },
     'video-track-list': { func: code_videoref_helper, fragment: 'videotracklist', link_text: 'VideoTrackList', },
     'videotrack-id': { func: code_videoref_helper, fragment: 'dom-videotrack-id', link_text: 'id', },
@@ -282,9 +293,11 @@
     'hme-buffered': { func: code_videoref_helper, fragment: 'dom-media-buffered', link_text: 'HTMLMediaElement.buffered',  },
     'hme-seek-algorithm': { func: videoref_helper, fragment: 'dom-media-seek', link_text: 'seek algorithm',  },
     'hme-duration-change-algorithm': { func: videoref_helper, fragment: 'durationChange', link_text: 'HTMLMediaElement duration change algorithm',  },
+    'htmlvideoelement': { func: code_videoref_helper, fragment: 'htmlvideoelement', link_text: 'HTMLVideoElement',  },
 
     'total-video-frame-count': { func: var_helper, fragment: '#total-video-frame-count', link_text: 'total video frame count', },
     'dropped-video-frame-count': { func: var_helper, fragment: '#dropped-video-frame-count', link_text: 'dropped video frame count', },
+    'corrupted-video-frame-count': { func: var_helper, fragment: '#corrupted-video-frame-count', link_text: 'corrupted video frame count', },
 
     'invalid-access-err': { func: exception_helper, fragment: 'invalid_access_err', link_text: 'INVALID_ACCESS_ERR',  },
     'invalid-state-err': { func: exception_helper, fragment: 'invalid_state_err', link_text: 'INVALID_STATE_ERR',  },
@@ -294,6 +307,8 @@
 
     'queue-a-task-to-fire-an-event-named': { func: queue_and_fire_helper, fragment: '', link_text: 'queue a task',  },
     'Queue-a-task-to-fire-an-event-named': { func: queue_and_fire_helper, fragment: '', link_text: 'Queue a task',  },
+    'Queue-and-fire-addtrack': { func: queue_and_fire_track_event_helper, fragment: '', link_text: 'addtrack',  },
+    'Queue-and-fire-removetrack': { func: queue_and_fire_track_event_helper, fragment: '', link_text: 'removetrack',  },
     'provide-a-stable-state': { func: webappapis_helper, fragment: 'provide-a-stable-state', link_text: 'provide a stable state',  },
 
     'origin': { func: browsers_helper, fragment: 'origin-0', link_text: 'origin', },