MSE - Fixed CSS Validator error and created preliminary media-source-lc.html.
authorAaron Colwell <acolwell@google.com>
Fri, 26 Jul 2013 08:57:16 -0700
changeset 144 b5e417bda8f8
parent 143 85c4716ce2f3
child 145 da10a47a2129
MSE - Fixed CSS Validator error and created preliminary media-source-lc.html.
media-source/media-source-lc.html
media-source/media-source-respec.html
media-source/media-source.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/media-source/media-source-lc.html	Fri Jul 26 08:57:16 2013 -0700
@@ -0,0 +1,3142 @@
+<!DOCTYPE html>
+<html lang="en" dir="ltr">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>Media Source Extensions</title>
+    
+    
+    
+    <!-- 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; }
+      .nonnormative h3 { color: inherit; background: inherit; }
+      .nonnormative:before { display: table; margin: -1em -0.5em -0.5em auto; width: auto; content: 'This section is non-normative.'; color: black; font-style: italic; border: solid 2px; background: white; padding: 0 0.25em; }
+
+      .iso-box { font-weight: bold; }
+      .iso-var { font-style: italic; }
+
+      table.old-table { border-collapse: collapse; border-style: hidden hidden none hidden; }
+      table.old-table thead, table tbody { border-bottom: solid; }
+      table.old-table tbody th:first-child { border-left: solid; }
+      table.old-table tbody th { text-align: left; }
+      table.old-table td, table th { border-left: solid; border-right: solid; border-bottom: solid thin; vertical-align: top; padding: 0.2em; }
+
+      dl.switch { padding-left: 2em; }
+      dl.switch > dt { text-indent: -1.5em; }
+      dl.switch > dt:before { content: '\21AA'; padding: 0 0.5em 0 0; display: inline-block; width: 1em; text-align: right; line-height: 0.5em; }
+
+      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
+ * Robin Berjon - http://berjon.com/
+ *****************************************************************/
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  1px solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  1px dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+cite .bibref {
+    font-style: normal;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- --- */
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+/* --- TOC --- */
+.toc a, .tof a {
+    text-decoration:    none;
+}
+
+a .secno, a .figno {
+    color:  #000;
+}
+
+ul.tof, ol.tof {
+    list-style: none outside none;
+}
+
+.caption {
+    margin-top: 0.5em;
+    font-style:   italic;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+</style><style>/* --- ISSUES/NOTES --- */
+div.issue-title, div.note-title {
+    padding-right:  1em;
+    min-width: 7.5em;
+    color: #b9ab2d;
+}
+div.issue-title { color: #e05252; }
+div.note-title { color: #52e052; }
+div.issue-title span, div.note-title span {
+    text-transform: uppercase;
+}
+div.note, div.issue {
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+.note > p:first-child, .issue > p:first-child { margin-top: 0 }
+.issue, .note {
+    padding: .5em;
+    border-left-width: .5em;
+    border-left-style: solid;
+}
+div.issue, div.note {
+    padding: 0.5em;
+    margin: 1em 0;
+    position: relative;
+    clear: both;
+}
+span.note, span.issue { padding: .1em .5em .15em; }
+
+.issue {
+    border-color: #e05252;
+    background: #fbe9e9;
+}
+.note {
+    border-color: #52e052;
+    background: #e9fbe9;
+}
+
+
+</style><style>/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID, .idlDictionaryID, .idlCallbackID, .idlEnumID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+a.idlEnumItem {
+    color:  #000;
+    border-bottom:  1px dotted #ccc;
+    text-decoration: none;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType, .idlMemberType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName, .idlMemberName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a, .idlMemberName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType, .idlCallbackType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlCtor*/
+.idlCtorName {
+    color:  #ff4500;
+}
+.idlCtorName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName, .idlDefaultValue {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlSectionComment*/
+.idlSectionComment {
+    color: gray;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.constructors, dl.fields, dl.dictionary-members {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .constructors dt, .fields dt, .dictionary-members dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .constructors dt code, .fields dt code, .dictionary-members dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code, .dictionary-members dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code, .dictionary-members dt .idlMemberType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.constructors dt code {
+    background:  #cfc;
+}
+
+.attributes dd, .methods dd, .constants dd, .constructors dd, .fields dd, .dictionary-members dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+</style><link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/W3C-WD"><!--[if lt IE 9]><script src='https://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--></head>
+  <body><div class="head">
+  <p>
+    
+      <a href="http://www.w3.org/"><img width="72" height="48" src="https://www.w3.org/Icons/w3c_home" alt="W3C"></a>
+    
+  </p>
+  <h1 class="title" id="title">Media Source Extensions</h1>
+  
+  <h2 id="w3c-last-call-working-draft-26-july-2013"><abbr title="World Wide Web Consortium">W3C</abbr> Last Call Working Draft 26 July 2013</h2>
+  <dl>
+    
+      <dt>This version:</dt>
+      <dd><a href="http://www.w3.org/TR/2013/WD-media-source-20130726/">http://www.w3.org/TR/2013/WD-media-source-20130726/</a></dd>
+      <dt>Latest published version:</dt>
+      <dd><a href="http://www.w3.org/TR/media-source/">http://www.w3.org/TR/media-source/</a></dd>
+    
+    
+      <dt>Latest editor's draft:</dt>
+      <dd><a href="http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html">http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html</a></dd>
+    
+    
+    
+    
+    
+      <dt>Previous version:</dt>
+      <dd><a href="http://www.w3.org/TR/2013/WD-media-source-20130415/">http://www.w3.org/TR/2013/WD-media-source-20130415/</a></dd>
+    
+    
+    <dt>Editors:</dt>
+    <dd><span>Aaron Colwell</span>, <a href="http://www.google.com/">Google Inc.</a></dd>
+<dd><span>Adrian Bateman</span>, <a href="http://www.microsoft.com/">Microsoft Corporation</a></dd>
+<dd><span>Mark Watson</span>, <a href="http://www.netflix.com/">Netflix Inc.</a></dd>
+
+    
+  </dl>
+  
+  
+  
+  
+    
+      <p class="copyright">
+        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 
+        2013
+        
+        <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> 
+        (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
+        <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
+        <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved.
+        <abbr title="World Wide Web Consortium">W3C</abbr> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
+        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
+        <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
+      </p>
+    
+  
+  <hr>
+</div>
+
+    
+
+    <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>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>
+  
+    
+      
+        <p>
+          <em>This section describes the status of this document at the time of its publication. Other
+          documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision
+          of this technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports
+          index</a> at http://www.w3.org/TR/.</em>
+        </p>
+        
+        <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>
+    
+        <p>
+          This document was published by the <a href="http://www.w3.org/html/wg/">HTML Working Group</a> as a Last Call Working Draft.
+          
+            This document is intended to become a <abbr title="World Wide Web Consortium">W3C</abbr> Recommendation.
+          
+          
+          If you wish to make comments regarding this document, please send them to 
+          <a href="mailto:public-html-media@w3.org">public-html-media@w3.org</a> 
+          (<a href="mailto:public-html-media-request@w3.org?subject=subscribe">subscribe</a>,
+          <a href="http://lists.w3.org/Archives/Public/public-html-media/">archives</a>).
+          
+          The Last Call period ends 26 October 2013.
+          
+          
+        All comments are welcome.
+        
+        
+          </p><p>
+            Publication as a Last Call Working Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr> Membership.
+            This is a draft document and may be updated, replaced or obsoleted by other documents at 
+            any time. It is inappropriate to cite this document as other than work in progress.
+          </p>
+        
+        
+          <p>
+            This is a Last Call Working Draft and thus the Working Group has determined that this document has satisfied the
+            relevant technical requirements and is sufficiently stable to advance through the Technical Recommendation process.
+          </p>
+        
+        <p>
+          
+            This document was produced by a group operating under the 
+            <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
+          
+          
+          
+            
+              <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="http://www.w3.org/2004/01/pp-impl/40318/status" rel="disclosure">public list of any patent disclosures</a> 
+            
+            made in connection with the deliverables of the group; that page also includes instructions for 
+            disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains
+            <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the
+            information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
+            6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
+          
+          
+        </p>
+        
+      
+    
+  
+</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 Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-prepare-append" class="tocxref"><span class="secno">3.5.4 </span>Prepare Append Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-buffer-append" class="tocxref"><span class="secno">3.5.5 </span>Buffer Append Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-stream-append-loop" class="tocxref"><span class="secno">3.5.6 </span>Stream Append Loop</a></li><li class="tocline"><a href="#sourcebuffer-init-segment-received" class="tocxref"><span class="secno">3.5.7 </span>Initialization Segment Received</a></li><li class="tocline"><a href="#sourcebuffer-coded-frame-processing" class="tocxref"><span class="secno">3.5.8 </span>Coded Frame Processing</a></li><li class="tocline"><a href="#sourcebuffer-coded-frame-removal" class="tocxref"><span class="secno">3.5.9 </span>Coded Frame Removal Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-coded-frame-eviction" class="tocxref"><span class="secno">3.5.10 </span>Coded Frame Eviction Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-audio-splice-frame-algorithm" class="tocxref"><span class="secno">3.5.11 </span>Audio Splice Frame Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-audio-splice-rendering-algorithm" class="tocxref"><span class="secno">3.5.12 </span>Audio Splice Rendering Algorithm</a></li><li class="tocline"><a href="#sourcebuffer-text-splice-frame-algorithm" class="tocxref"><span class="secno">3.5.13 </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="#methods-4" class="tocxref"><span class="secno">8.1 </span>Methods</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-4" 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-5" 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-6" 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;.
+        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 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">
+
+      <section id="goals">
+        <h3><span class="secno">1.1 </span>Goals</h3>
+        <p>This specification was designed with the following goals in mind:</p>
+        <ul>
+          <li>Allow JavaScript to construct media streams independent of how the media is fetched.</li>
+          <li>Define a splicing and buffering model that facilitates use cases like adaptive streaming, ad-insertion, time-shifting, and video editing.</li>
+          <li>Minimize the need for media parsing in JavaScript.</li>
+          <li>Leverage the browser cache as much as possible.</li>
+          <li>Provide byte stream definitions for WebM, the ISO Base Media File Format, and MPEG-2 Transport Streams.</li>
+          <li>Not require support for any particular media format or codec.</li>
+        </ul>
+        <p>This specification defines:</p>
+        <ul>
+          <li>Normative behavior for user agents to enable interoperability between user agents and web applications when processing media data.</li>
+          <li>Normative requirements to enable other specifications to define media formats to be used within this specification.</li>
+        </ul>
+      </section>
+
+      <section id="definitions">
+        <h3><span class="secno">1.2 </span>Definitions</h3>
+
+        <dl>
+          <dt id="active-track-buffers">Active Track Buffers</dt>
+          <dd><p>The <a href="#track-buffer">track buffers</a> that provide <a href="#coded-frame">coded frames</a> for the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-audiotrack-enabled">enabled</a></code>
+              <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-audiotracks">audioTracks</a></code>, the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-videotrack-selected">selected</a></code> <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-videotracks">videoTracks</a></code>, and the
+              <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> <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-texttracks">textTracks</a></code>. All these tracks are associated with
+            <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects in the <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> list.</p>
+          </dd>
+
+          <dt id="append-window">Append Window</dt>
+          <dd><p>A presentation timestamp range used to filter out <a href="#coded-frame">coded frames</a> while appending. The append window represents a single
+            continuous time range with a single start time and end time. Coded frames with presentation timestamps within this range are allowed to be appended
+            to the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> while coded frames outside this range are filtered out. The append window start and end times are controlled by
+            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 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 are present in the byte stream. The user agent must 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> if this is not the case. If frames cannot be decoded out of order and a decode timestamp is not present in the byte stream, then the decode timestamp is equal to the presentation timestamp.</p></dd>
+
+          <dt id="coded-frame-group">Coded Frame Group</dt>
+          <dd><p>A group of <a href="#coded-frame">coded frames</a> that are adjacent and monotonically increasing in decode time without any gaps. Discontinuities detected by the
+              <a href="#sourcebuffer-coded-frame-processing">coded frame processing algorithm</a> and <code><a href="#widl-SourceBuffer-abort-void">abort()</a></code> calls trigger the start of a new coded frame group.</p>
+          </dd>
+
+          <dt id="displayed-frame-delay">Displayed Frame Delay</dt>
+          <dd>
+            <p>The delay, to the nearest microsecond, between a frame's presentation time and the actual time it was displayed. This delay is always greater than or equal to zero since frames must
+              never be displayed before their presentation time. Non-zero delays are a sign of playback jitter and possible loss of A/V sync.</p>
+          </dd>
+          <dt id="init-segment">Initialization Segment</dt>
+          <dd>
+	    <p>A sequence of bytes that contain all of the initialization information required to decode a sequence of <a href="#media-segment">media segments</a>. This includes codec initialization data, <a href="#track-id">Track ID</a> mappings for multiplexed segments, and timestamp offsets (e.g. edit lists).</p>
+            <div class="note"><div class="note-title"><span>Note</span></div><p class="">The <a href="#byte-stream-formats">byte stream format specifications</a> contain format specific examples.</p></div>
+
+          </dd><dt id="media-segment">Media Segment</dt>
+          <dd>
+	    <p>A sequence of bytes that contain packetized &amp; timestamped media data for a portion of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-timeline">media timeline</a>. Media segments are always associated with the most recently appended <a href="#init-segment">initialization segment</a>.</p>
+            <div class="note"><div class="note-title"><span>Note</span></div><p class="">The <a href="#byte-stream-formats">byte stream format specifications</a> contain format specific examples.</p></div>
+          </dd>
+
+          <dt id="mediasource-object-url">MediaSource object URL</dt>
+          <dd>
+            <p>A MediaSource object URL is a unique <a href="http://www.w3.org/TR/FileAPI/#url">Blob URI</a> [<cite><a class="bibref" href="#bib-FILE-API">FILE-API</a></cite>] created by <code><a href="#widl-URL-createObjectURL-DOMString-MediaSource-mediaSource">createObjectURL()</a></code>. It is used to attach a <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> object to an HTMLMediaElement.</p>
+            <p>These URLs are the same as a <a href="http://www.w3.org/TR/FileAPI/#url">Blob URI</a>, except that anything in the definition of that feature that refers to <a href="http://www.w3.org/TR/FileAPI/#dfn-file">File</a> and <a href="http://www.w3.org/TR/FileAPI/#dfn-Blob">Blob</a> objects is hereby extended to also apply to <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> objects.</p>
+            <p>The <a href="http://www.w3.org/TR/html5/browsers.html#origin-0">origin</a> of the MediaSource object URL is specified by the <a href="http://www.w3.org/TR/FileAPI/#originOfBlob">Origin of Blob URIs</a> [<cite><a class="bibref" href="#bib-FILE-API">FILE-API</a></cite>].</p>
+            <div class="note"><div class="note-title"><span>Note</span></div><p class="">For example, the <a href="http://www.w3.org/TR/html5/browsers.html#origin-0">origin</a> of the MediaSource object URL affects the way that the media element is <a href="http://www.w3.org/TR/html5/embedded-content-0.html#security-with-canvas-elements">consumed by canvas</a>.</p></div>
+          </dd>
+
+          <dt id="parent-media-source">Parent Media Source</dt>
+          <dd><p>The parent media source of a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object is the <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> object that created it.</p></dd>
+
+          <dt id="presentation-start-time">Presentation Start Time</dt>
+          <dd><p>The presentation start time is the earliest time point in the presentation and specifies the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#initial-playback-position">initial playback position</a> and <a href="http://www.w3.org/TR/html5/embedded-content-0.html#earliest-possible-position">earliest possible position</a>. All presentations created using this specification have a presentation start time of 0.</p></dd>
+
+          <dt id="random-access-point">Random Access Point</dt>
+          <dd><p>A position in a <a href="#media-segment">media segment</a> where decoding and continuous playback can begin without relying on any previous data in the segment. For video this tends to be the location of I-frames. In the case of audio, most audio frames can be treated as a random access point. Since video tracks tend to have a more sparse distribution of random access points, the location of these points are usually considered the random access points for multiplexed streams.</p></dd>
+
+          <dt id="sourcebuffer-byte-stream-format-spec">SourceBuffer byte stream format specification</dt>
+          <dd><p>The specific <a href="#byte-stream-formats">byte stream format specification</a> that describes the format of the byte stream accepted by a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> instance. The
+              <a href="#byte-stream-formats">byte stream format specification</a>, for a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object, is selected based on the <var>type</var> passed to the
+              <code><a href="#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type">addSourceBuffer()</a></code> call that created the object.</p></dd>
+
+          <dt id="track-description">Track Description</dt>
+          <dd><p>A byte stream format specific structure that provides the <a href="#track-id">Track ID</a>, codec configuration, and other metadata for a single track. Each track description inside a single <a href="#init-segment">initialization segment</a> has a unique <a href="#track-id">Track ID</a>. The user agent must 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> if the <a href="#track-id">Track ID</a> is not unique within the <a href="#init-segment">initialization segment</a> .</p></dd>
+
+          <dt id="track-id">Track ID</dt>
+          <dd><p>A Track ID is a byte stream format specific identifier that marks sections of the byte stream as being part of a specific track. The Track ID in a <a href="#track-description">track description</a> identifies which sections of a <a href="#media-segment">media segment</a> belong to that track.</p></dd>
+
+        </dl>
+      </section>
+    </section>
+
+    <section id="mediasource">
+      <!--OddPage--><h2><span class="secno">2. </span>MediaSource Object</h2>
+      <p>The MediaSource object represents a source of media data for an HTMLMediaElement. It keeps track of the <code><a href="#widl-MediaSource-readyState">readyState</a></code> for this source as well as a list of <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects that can be used to add media data to the presentation. MediaSource objects are created by the web application and then attached to an HTMLMediaElement. The application uses the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> to add media data to this source. The HTMLMediaElement fetches this media data from the <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> object when it is needed during playback.</p>
+
+      <pre class="idl"><span class="idlEnum" id="idl-def-ReadyState">enum <span class="idlEnumID">ReadyState</span> {
+    "<a href="#idl-def-ReadyState.closed" class="idlEnumItem">closed</a>",
+    "<a href="#idl-def-ReadyState.open" class="idlEnumItem">open</a>",
+    "<a href="#idl-def-ReadyState.ended" class="idlEnumItem">ended</a>"
+};</span></pre><table class="simple"><tr><th colspan="2">Enumeration description</th></tr><tr><td><code id="idl-def-ReadyState.closed">closed</code></td><td>
+          Indicates the source is not currently attached to a media element.
+        </td></tr><tr><td><code id="idl-def-ReadyState.open">open</code></td><td>
+          The source has been opened by a media element and is ready for data to be appended to the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>.
+        </td></tr><tr><td><code id="idl-def-ReadyState.ended">ended</code></td><td>
+          The source is still attached to a media element, but <code><a href="#widl-MediaSource-endOfStream-void-EndOfStreamError-error">endOfStream()</a></code> has been called.
+        </td></tr></table>
+
+      <pre class="idl"><span class="idlEnum" id="idl-def-EndOfStreamError">enum <span class="idlEnumID">EndOfStreamError</span> {
+    "<a href="#idl-def-EndOfStreamError.network" class="idlEnumItem">network</a>",
+    "<a href="#idl-def-EndOfStreamError.decode" class="idlEnumItem">decode</a>"
+};</span></pre><table class="simple"><tr><th colspan="2">Enumeration description</th></tr><tr><td><code id="idl-def-EndOfStreamError.network">network</code></td><td>
+          <p>Terminates playback and signals that a network error has occured.</p>
+          <div class="note"><div class="note-title"><span>Note</span></div><p class="">JavaScript applications should use this status code to terminate playback with a network error. For example, if a network error occurs while fetching media data.</p></div>
+        </td></tr><tr><td><code id="idl-def-EndOfStreamError.decode">decode</code></td><td>
+          <p>Terminates playback and signals that a decoding error has occured.</p>
+          <div class="note"><div class="note-title"><span>Note</span></div><p class="">JavaScript applications should use this status code to terminate playback with a decode error. For example, if a parsing error occurs while processing out-of-band media data.</p></div>
+        </td></tr></table>
+
+      <pre class="idl"><span class="idlInterface" id="idl-def-MediaSource">[<span class="extAttr">Constructor</span>]
+interface <span class="idlInterfaceID">MediaSource</span> : <span class="idlSuperclass"><code><a href="http://dom.spec.whatwg.org/#eventtarget" class="idlType">EventTarget</a></code></span> {
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><a href="#idl-def-SourceBufferList" class="idlType"><code>SourceBufferList</code></a></span>    <span class="idlAttrName"><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></span>;</span>
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><a href="#idl-def-SourceBufferList" class="idlType"><code>SourceBufferList</code></a></span>    <span class="idlAttrName"><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></span>;</span>
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><a href="#idl-def-ReadyState" class="idlType"><code>ReadyState</code></a></span>          <span class="idlAttrName"><a href="#widl-MediaSource-readyState">readyState</a></span>;</span>
+<span class="idlAttribute">                attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unrestricted-double" class="idlType">unrestricted double</a></code></span> <span class="idlAttrName"><a href="#widl-MediaSource-duration">duration</a></span>;</span>
+<span class="idlMethod">    <span class="idlMethType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></span>   <span class="idlMethName"><a href="#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type">addSourceBuffer</a></span> (<span class="idlParam"><span class="idlParamType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span> <span class="idlParamName">type</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-void" class="idlType">void</a></code></span>           <span class="idlMethName"><a href="#widl-MediaSource-removeSourceBuffer-void-SourceBuffer-sourceBuffer">removeSourceBuffer</a></span> (<span class="idlParam"><span class="idlParamType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></span> <span class="idlParamName">sourceBuffer</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-void" class="idlType">void</a></code></span>           <span class="idlMethName"><a href="#widl-MediaSource-endOfStream-void-EndOfStreamError-error">endOfStream</a></span> (<span class="idlParam">optional <span class="idlParamType"><a href="#idl-def-EndOfStreamError" class="idlType"><code>EndOfStreamError</code></a></span> <span class="idlParamName">error</span></span>);</span>
+<span class="idlMethod">    static <span class="idlMethType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-boolean" class="idlType">boolean</a></code></span> <span class="idlMethName"><a href="#widl-MediaSource-isTypeSupported-boolean-DOMString-type">isTypeSupported</a></span> (<span class="idlParam"><span class="idlParamType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span> <span class="idlParamName">type</span></span>);</span>
+};</span></pre><section id="attributes"><h3><span class="secno">2.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-MediaSource-activeSourceBuffers"><code>activeSourceBuffers</code> of type <span class="idlAttrType"><a href="#idl-def-SourceBufferList" class="idlType"><code>SourceBufferList</code></a></span>, readonly   </dt><dd>
+          <p>Contains the subset of <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> that are providing the 
+            <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-videotrack-selected">selected video track</a>,  the 
+            <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-audiotrack-enabled">enabled audio tracks</a>, and the 
+            <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-showing">"showing"</a> or <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-hidden">"hidden"</a> text tracks.
+          </p>
+          <div class="note"><div class="note-title"><span>Note</span></div><p class="">The <a href="#active-source-buffer-changes">Changes to selected/enabled track state</a> section describes how this attribute gets
+            updated.</p></div>
+        </dd><dt id="widl-MediaSource-duration"><code>duration</code> of type <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unrestricted-double" class="idlType">unrestricted double</a></code></span>,            </dt><dd>
+          <p>Allows the web application to set the presentation duration. The duration is initially set to NaN when the <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> object is created.</p>
+          <p>On getting, run the following steps:</p>
+          <ol>
+            <li>If the <code><a href="#widl-MediaSource-readyState">readyState</a></code> attribute is <code><a href="#idl-def-ReadyState.closed">"closed"</a></code> then return NaN and abort these steps.</li>
+            <li>Return the current value of the attribute.</li>
+          </ol>
+          <p>On setting, run the following steps:</p>
+          <ol>
+            <li>If the value being set is negative or NaN 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 the <code><a href="#widl-MediaSource-readyState">readyState</a></code> attribute is not <code><a href="#idl-def-ReadyState.open">"open"</a></code> 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 on any <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>, 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>Run the <a href="#duration-change-algorithm">duration change algorithm</a> with <var>new duration</var> set to the value being assigned to this attribute.
+	      <div class="note"><div class="note-title"><span>Note</span></div><p class=""><code><a href="#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data">appendBuffer()</a></code>, <code><a href="#widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize">appendStream()</a></code> and <code><a href="#widl-MediaSource-endOfStream-void-EndOfStreamError-error">endOfStream()</a></code> can update the duration under certain circumstances.</p></div>
+            </li>
+          </ol>
+        </dd><dt id="widl-MediaSource-readyState"><code>readyState</code> of type <span class="idlAttrType"><a href="#idl-def-ReadyState" class="idlType"><code>ReadyState</code></a></span>, readonly   </dt><dd>
+          <p>Indicates the current state of the <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> object. When the <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> is created <code><a href="#widl-MediaSource-readyState">readyState</a></code> must be set to <code><a href="#idl-def-ReadyState.closed">"closed"</a></code>.
+        </p></dd><dt id="widl-MediaSource-sourceBuffers"><code>sourceBuffers</code> of type <span class="idlAttrType"><a href="#idl-def-SourceBufferList" class="idlType"><code>SourceBufferList</code></a></span>, readonly   </dt><dd>
+          Contains the list of <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects associated with this <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a>. When <code><a href="#widl-MediaSource-readyState">readyState</a></code> equals <code><a href="#idl-def-ReadyState.closed">"closed"</a></code> this list will be empty. Once <code><a href="#widl-MediaSource-readyState">readyState</a></code> transitions to <code><a href="#idl-def-ReadyState.open">"open"</a></code> SourceBuffer objects can be added to this list by using <code><a href="#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type">addSourceBuffer()</a></code>.
+        </dd></dl></section><section id="methods"><h3><span class="secno">2.2 </span>Methods</h3><dl class="methods"><dt id="widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type"><code>addSourceBuffer</code></dt><dd>
+          <p>Adds a new <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> to <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>.</p>
+          <p>Implementations must support at least 1 MediaSource object with the following <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> configurations. MediaSource objects must
+            support each of the configurations below, but they are only required to support one configuration at a time.
+            Supporting multiple configurations at once or additional configurations is a quality of implementation issue.
+            </p><ul>
+              <li>A single SourceBuffer with 1 audio track and/or 1 video track.</li>
+              <li>Two SourceBuffers with one handling a single audio track and the other handling a single video track.</li>
+            </ul>
+          <p></p>
+          
+        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">type</td><td class="prmType"><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+            <li>If <var>type</var> is null or an empty string 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 <var>type</var> contains a MIME type that is not supported or contains a MIME type that is not supported with the types specified for the other <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>, then throw a <code><a href="http://dom.spec.whatwg.org/#dom-domexception-not_supported_err">NOT_SUPPORTED_ERR</a></code> exception and abort these steps.</li>
+            <li>If the user agent can't handle any more SourceBuffer objects then throw a <code><a href="http://dom.spec.whatwg.org/#dom-domexception-quota_exceeded_err">QUOTA_EXCEEDED_ERR</a></code> exception and abort these steps.
+              <div class="note"><div class="note-title"><span>Note</span></div><p class="">For example, a user agent may throw a <code><a href="http://dom.spec.whatwg.org/#dom-domexception-quota_exceeded_err">QUOTA_EXCEEDED_ERR</a></code> exception if the media element has reached the
+                <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_metadata">HAVE_METADATA</a></code> readyState. This can occur if the user agent's media engine does not support adding more tracks during
+                playback.
+              </p></div>
+            </li>
+            <li>If the <code><a href="#widl-MediaSource-readyState">readyState</a></code> attribute 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>Create a new <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object and associated resources.</li>
+            <li>Add the new object to <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> 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 <code><a href="#dom-evt-addsourcebuffer">addsourcebuffer</a></code> at <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>.</li>
+            <li>Return the new object.</li>
+          </ol></dd><dt id="widl-MediaSource-endOfStream-void-EndOfStreamError-error"><code>endOfStream</code></dt><dd>
+          <p>Signals the end of the stream.</p>
+
+          
+        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">error</td><td class="prmType"><code><a href="#idl-def-EndOfStreamError" class="idlType"><code>EndOfStreamError</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-void" class="idlType">void</a></code></code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+            <li>If the <code><a href="#widl-MediaSource-readyState">readyState</a></code> attribute is not in the <code><a href="#idl-def-ReadyState.open">"open"</a></code> state then throw an <code><a href="http://dom.spec.whatwg.org/#dom-domexception-invalid_state_err">INVALID_STATE_ERR</a></code> exception and abort these steps.</li>
+            <li>If the <code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute equals true on any <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>, 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>Run the <a href="#end-of-stream-algorithm">end of stream algorithm</a> with the <var>error</var> parameter set to <var>error</var>.</li>
+          </ol></dd><dt id="widl-MediaSource-isTypeSupported-boolean-DOMString-type"><code>isTypeSupported</code>, static</dt><dd>
+          <p>Check to see whether the <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> is capable of creating <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects for the the specified MIME type.</p>
+
+          
+          <div class="note"><div class="note-title"><span>Note</span></div><p class="">
+            If true is returned from this method, it only indicates that the <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> implementation is capable of creating <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects for the specified MIME type. An <code><a href="#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type">addSourceBuffer()</a></code> call may still fail if sufficient resources are not available to support the addition of a new <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>.
+          </p></div>
+          <div class="note"><div class="note-title"><span>Note</span></div><p class="">
+            This method returning true implies that HTMLMediaElement.canPlayType() will return "maybe" or "probably" since it does not make sense for a <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> to support a type the HTMLMediaElement knows it cannot play.
+          </p></div>
+        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">type</td><td class="prmType"><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-boolean" class="idlType">boolean</a></code></code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+            <li>If <var>type</var> is an empty string, then return false.</li>
+            <li>If <var>type</var> does not contain a valid MIME type string, then return false.</li>
+            <li>If <var>type</var> contains a media type or media subtype that the MediaSource does not support, then return false.</li>
+            <li>If <var>type</var> contains a codec that the MediaSource does not support, then return false.</li>
+            <li>If the MediaSource does not support the specified combination of media type, media subtype, and codecs then return false.</li>
+            <li>Return true.</li>
+          </ol></dd><dt id="widl-MediaSource-removeSourceBuffer-void-SourceBuffer-sourceBuffer"><code>removeSourceBuffer</code></dt><dd>
+          <p>Removes a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> from <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>.</p>
+
+          
+        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">sourceBuffer</td><td class="prmType"><code><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-void" class="idlType">void</a></code></code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+            <li>If <var>sourceBuffer</var> is null then throw an <code><a href="http://dom.spec.whatwg.org/#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code> exception and abort these steps.</li>
+            <li>If <var>sourceBuffer</var> specifies an object that is not in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> then throw a <code><a href="http://dom.spec.whatwg.org/#dom-domexception-not_found_err">NOT_FOUND_ERR</a></code> exception and abort these steps.</li>
+            <li>If the <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute equals true, then run the following steps:
+              <ol>
+                <li>Abort the <a href="#sourcebuffer-buffer-append">buffer append </a> and <a href="#sourcebuffer-stream-append-loop">stream append loop</a> algorithms if they are running.</li>
+                <li>Set the <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute to false.</li>
+                <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-abort">abort</a></code> at <var>sourceBuffer</var>.</li>
+                <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-updateend">updateend</a></code> at <var>sourceBuffer</var>.</li>
+              </ol>
+            </li>
+
+            <li>Let <var>SourceBuffer audioTracks list</var> equal the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotracklist">AudioTrackList</a></code> object returned by <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-audioTracks">audioTracks</a></code>.</li>
+            <li>If the <var>SourceBuffer audioTracks list</var> is not empty, then run the following steps:
+              <ol>
+                <li>Let <var>HTMLMediaElement audioTracks list</var> equal the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotracklist">AudioTrackList</a></code> object returned 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>Let the <var>removed enabled audio track flag</var> equal false.</li>
+                <li>For each <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotrack">AudioTrack</a></code> object in the <var>SourceBuffer audioTracks list</var>, run the following steps:
+                  <ol>
+                    <li>Set the <code><a href="#widl-AudioTrack-sourceBuffer">sourceBuffer</a></code> attribute on the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotrack">AudioTrack</a></code> object to null.</li>
+                    <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 fire a <a href="http://www.w3.org/TR/html5/infrastructure.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 fire a <a href="http://www.w3.org/TR/html5/infrastructure.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
+                  <var>HTMLMediaElement audioTracks list</var>.</li>
+              </ol>
+            </li>
+
+            <li>Let <var>SourceBuffer videoTracks list</var> equal the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotracklist">VideoTrackList</a></code> object returned by <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-videoTracks">videoTracks</a></code>.</li>
+            <li>If the <var>SourceBuffer videoTracks list</var> is not empty, then run the following steps:
+              <ol>
+                <li>Let <var>HTMLMediaElement videoTracks list</var> equal the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotracklist">VideoTrackList</a></code> object returned 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>Let the <var>removed selected video track flag</var> equal false.</li>
+                <li>For each <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotrack">VideoTrack</a></code> object in the <var>SourceBuffer videoTracks list</var>, run the following steps:
+                  <ol>
+                    <li>Set the <code><a href="#widl-VideoTrack-sourceBuffer">sourceBuffer</a></code> attribute on the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotrack">VideoTrack</a></code> object to null.</li>
+                    <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 fire a <a href="http://www.w3.org/TR/html5/infrastructure.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 fire a <a href="http://www.w3.org/TR/html5/infrastructure.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
+                  <var>HTMLMediaElement videoTracks list</var>.</li>
+              </ol>
+            </li>
+
+
+            <li>Let <var>SourceBuffer textTracks list</var> equal the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#texttracklist">TextTrackList</a></code> object returned by <var>sourceBuffer</var>.<code><a href="#widl-SourceBuffer-textTracks">textTracks</a></code>.</li>
+            <li>If the <var>SourceBuffer textTracks list</var> is not empty, then run the following steps:
+              <ol>
+                <li>Let <var>HTMLMediaElement textTracks list</var> equal the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#texttracklist">TextTrackList</a></code> object returned 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>Let the <var>removed enabled text track flag</var> equal false.</li>
+                <li>For each <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#texttrack">TextTrack</a></code> object in the <var>SourceBuffer textTracks list</var>, run the following steps:
+                  <ol>
+                    <li>Set the <code><a href="#widl-TextTrack-sourceBuffer">sourceBuffer</a></code> attribute on the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#texttrack">TextTrack</a></code> object to null.</li>
+                    <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 fire a <a href="http://www.w3.org/TR/html5/infrastructure.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 fire a <a href="http://www.w3.org/TR/html5/infrastructure.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
+                  <var>HTMLMediaElement textTracks list</var>.</li>
+              </ol>
+            </li>
+
+            <li>If <var>sourceBuffer</var> is in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>, then remove <var>sourceBuffer</var> from <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> 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 <code><a href="#dom-evt-removesourcebuffer">removesourcebuffer</a></code> at the <a href="#idl-def-SourceBufferList" class="idlType"><code>SourceBufferList</code></a> returned by <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>.</li>
+            <li>Remove <var>sourceBuffer</var> from <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> 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 <code><a href="#dom-evt-removesourcebuffer">removesourcebuffer</a></code> at 
+              the <a href="#idl-def-SourceBufferList" class="idlType"><code>SourceBufferList</code></a> returned by <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>.</li>
+            <li>Destroy all resources for <var>sourceBuffer</var>.</li>
+          </ol></dd></dl></section>
+
+      <section id="mediasource-events">
+        <h3><span class="secno">2.3 </span>Event Summary</h3>
+        <table class="old-table">
+          <thead>
+            <tr>
+              <th>Event name</th>
+              <th>Interface</th>
+              <th>Dispatched when...</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td><dfn id="dom-evt-sourceopen"><code>sourceopen</code></dfn></td>
+              <td><code>Event</code></td>
+              <td><code><a href="#widl-MediaSource-readyState">readyState</a></code> transitions from <code><a href="#idl-def-ReadyState.closed">"closed"</a></code> to <code><a href="#idl-def-ReadyState.open">"open"</a></code> or from <code><a href="#idl-def-ReadyState.ended">"ended"</a></code> to <code><a href="#idl-def-ReadyState.open">"open"</a></code>.</td>
+            </tr>
+            <tr>
+              <td><dfn id="dom-evt-sourceended"><code>sourceended</code></dfn></td>
+              <td><code>Event</code></td>
+              <td><code><a href="#widl-MediaSource-readyState">readyState</a></code> transitions from <code><a href="#idl-def-ReadyState.open">"open"</a></code> to <code><a href="#idl-def-ReadyState.ended">"ended"</a></code>.</td>
+            </tr>
+            <tr>
+              <td><dfn id="dom-evt-sourceclose"><code>sourceclose</code></dfn></td>
+              <td><code>Event</code></td>
+	      <td><code><a href="#widl-MediaSource-readyState">readyState</a></code> transitions from <code><a href="#idl-def-ReadyState.open">"open"</a></code> to <code><a href="#idl-def-ReadyState.closed">"closed"</a></code> or <code><a href="#idl-def-ReadyState.ended">"ended"</a></code> to <code><a href="#idl-def-ReadyState.closed">"closed"</a></code>.</td>
+            </tr>
+          </tbody>
+        </table>
+      </section>
+
+      <section id="mediasource-algorithms">
+        <h3><span class="secno">2.4 </span>Algorithms</h3>
+
+        <section id="mediasource-attach">
+          <h4><span class="secno">2.4.1 </span>Attaching to a media element</h4>
+          <p> A <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> object can be attached to a media element by assigning a <a href="#mediasource-object-url">MediaSource object URL</a> to the media element <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#attr-media-src">src</a></code> attribute or the src attribute of a &lt;source&gt; inside a media element. A <a href="#mediasource-object-url">MediaSource object URL</a> is created by passing a MediaSource object to <code><a href="#widl-URL-createObjectURL-DOMString-MediaSource-mediaSource">createObjectURL()</a></code>.</p>
+          <p>If the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-resource">resource fetch algorithm</a> absolute URL matches the MediaSource object URL, run the following steps right before the <span>"<i>Perform a potentially CORS-enabled fetch</i>"</span>
+            step in the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-resource">resource fetch algorithm</a>.</p>
+
+          <dl class="switch">
+            <dt>If <code><a href="#widl-MediaSource-readyState">readyState</a></code> is NOT set to <code><a href="#idl-def-ReadyState.closed">"closed"</a></code></dt>
+            <dd>Run the <span>"<i>If the media data cannot be fetched at all, due to network errors, causing the user agent to give up trying to fetch the resource</i>"</span> steps of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-resource">resource fetch algorithm</a>.</dd>
+            <dt>Otherwise</dt>
+            <dd>
+              <ol>
+                <li>Set the <code><a href="#widl-MediaSource-readyState">readyState</a></code> attribute 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="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a>.</li>
+                <li>Continue the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-resource">resource fetch algorithm</a> by running the <span>"<i>Perform a potentially CORS-enabled fetch</i>"</span> step. Text in the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-resource">resource fetch algorithm</a>
+                  that refers to "the download" or "bytes received" refer to data 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>. References to
+                  HTTP in the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-resource">resource fetch algorithm</a> do not apply because the HTMLMediaElement does not fetch media data via HTTP when a <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> is attached.</li>
+              </ol>
+            </dd>
+          </dl>
+        </section>
+
+        <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 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>
+            <li>Remove all the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects from <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</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-removesourcebuffer">removesourcebuffer</a></code> at <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>.</li>
+            <li>Remove all the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects from <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</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-removesourcebuffer">removesourcebuffer</a></code> at <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</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-sourceclose">sourceclose</a></code> at the <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a>.</li>
+          </ol>
+        </section>
+
+        <section id="mediasource-seeking">
+          <h4><span class="secno">2.4.3 </span>Seeking</h4>
+          <p>Run the following steps as part of the "<i>Wait until the user agent has established whether or not the media data for the new playback position is available, and, if it is, until it has decoded enough data to play back that position"</i> step of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seek">seek algorithm</a>:</p>
+          <ol>
+            <li>The media element looks for <a href="#media-segment">media segments</a> containing the <var>new playback position</var> in each <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>.
+              <dl class="switch">
+	        <dt>If one or more of the objects in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> is missing <a href="#media-segment">media segments</a> for the <var>new playback position</var>
+                </dt>
+	        <dd>
+	          <ol>
+	            <li>Set the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_metadata">HAVE_METADATA</a></code>.</li>
+	            <li>The media element waits for the necessary <a href="#media-segment">media segments</a> to be passed to <code><a href="#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data">appendBuffer()</a></code> or <code><a href="#widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize">appendStream()</a></code>.
+                      <div class="note"><div class="note-title"><span>Note</span></div><p class="">The web application can use <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> to determine what the media element needs to resume playback.</p></div>
+                    </li>
+	          </ol>
+	        </dd>
+	        <dt>Otherwise</dt>
+	        <dd>Continue</dd>
+              </dl>
+            </li>
+            <li>The media element resets all decoders and initializes each one with data from the appropriate <a href="#init-segment">initialization segment</a>.</li>
+            <li>The media element feeds <a href="#coded-frame">coded frames</a> from the <a href="#active-track-buffers">active track buffers</a> into the decoders starting with the
+              closest <a href="#random-access-point">random access point</a> before the the <var>new playback position</var>.</li>
+            <li>Resume the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seek">seek algorithm</a> at the "<i>Await a stable state</i>" step.</li>
+          </ol>
+        </section>
+
+        <section id="buffer-monitoring">
+          <h4><span class="secno">2.4.4 </span>SourceBuffer Monitoring</h4>
+          <p>The following steps are periodically run during playback to make sure that all of the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> have <a href="#enough-data">enough data to ensure uninterrupted playback</a>. Appending new segments and changes to <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> also cause these steps to run because they affect the conditions that trigger state transitions.</p>
+
+          <p>Having <dfn id="enough-data">enough data to ensure uninterrupted playback</dfn> is an implementation specific condition where the user agent
+          determines that it currently has enough data to play the presentation without stalling for a meaningful period of time. This condition is
+          constantly evaluated to determine when to transition the media element into and out of the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_enough_data">HAVE_ENOUGH_DATA</a></code> ready state.
+          These transitions indicate when the user agent believes it has enough data buffered or it needs more data respectively.</p>
+
+          <div class="note"><div class="note-title"><span>Note</span></div><p class="">An implementation may choose to use bytes buffered, time buffered, the append rate, or any other metric it sees fit to
+            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, the user agent should transition it 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>
+
+          <dl class="switch">
+            <dt>If <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> for all objects in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> do not contain <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#timeranges">TimeRanges</a></code> for the current playback position:</dt>
+            <dd>
+	      <ol>
+	        <li>Set the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_metadata">HAVE_METADATA</a></code>.</li>
+	        <li>If this is the first transition to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_metadata">HAVE_METADATA</a></code>, 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#event-media-loadedmetadata">loadedmetadata</a></code> at the media element.</li>
+	        <li>Abort these steps.</li>
+	      </ol>
+            </dd>
+            <dt>If <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> for all objects in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> contain <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#timeranges">TimeRanges</a></code> that include the current playback position and <a href="#enough-data">enough data to ensure uninterrupted playback</a>:</dt>
+            <dd>
+	      <ol>
+	        <li>Set the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_enough_data">HAVE_ENOUGH_DATA</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="http://www.w3.org/TR/html5/embedded-content-0.html#event-media-canplaythrough">canplaythrough</a></code> at the media element.</li>
+	        <li>Playback may resume at this point if it was previously suspended by a transition to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_current_data">HAVE_CURRENT_DATA</a></code>.</li>
+	        <li>Abort these steps.</li>
+	      </ol>
+            </dd>
+            <dt>If <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> for at least one object in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> contains a <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#timeranges">TimeRange</a></code> that includes the current playback position but not <a href="#enough-data">enough data to ensure uninterrupted playback</a>:</dt>
+            <dd>
+	      <ol>
+	        <li>Set the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_future_data">HAVE_FUTURE_DATA</a></code>.</li>
+	        <li>If the previous value of <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> was less than <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_future_data">HAVE_FUTURE_DATA</a></code>, 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#event-media-canplay">canplay</a></code> at the media element.</li>
+	        <li>Playback may resume at this point if it was previously suspended by a transition to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_current_data">HAVE_CURRENT_DATA</a></code>.</li>
+	        <li>Abort these steps.</li>
+	      </ol>
+            </dd>
+            <dt>If <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> for at least one object in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> contains a <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#timeranges">TimeRange</a></code> that ends at the current playback position and does not have a range covering the time immediately after the current position:</dt>
+            <dd>
+	      <ol>
+	        <li>Set the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_current_data">HAVE_CURRENT_DATA</a></code>.</li>
+	        <li>If this is the first transition to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_current_data">HAVE_CURRENT_DATA</a></code>, 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#event-media-loadeddata">loadeddata</a></code> at the media element.</li>
+	        <li>Playback is suspended at this point since the media element doesn't have enough data to advance the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-timeline">media timeline</a>.</li>
+	        <li>Abort these steps.</li>
+	      </ol>
+            </dd>
+          </dl>
+        </section>
+
+        <section id="active-source-buffer-changes">
+          <h4><span class="secno">2.4.5 </span>Changes to selected/enabled track state</h4>
+          <p>During playback <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> needs to be updated if the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-videotrack-selected">selected video track</a>, the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-audiotrack-enabled">enabled audio tracks</a>, or a text track <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-mode">mode</a> changes. When one or more of these changes occur the following steps need to be followed.</p>
+          <dl class="switch">
+            <dt>If the selected video track changes, then run the following steps:</dt>
+            <dd>
+	      <ol>
+	        <li>If the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> associated with the previously selected video track is not associated with any other enabled tracks, run the following steps:
+  	          <ol>
+	            <li>Remove the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> from <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</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-removesourcebuffer">removesourcebuffer</a></code> at <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>
+                    </li>
+	          </ol>
+	        </li>
+	        <li>If the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> associated with the newly selected video track is not already in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>, run the following steps:
+	          <ol>
+	            <li>Add the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> to <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</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-addsourcebuffer">addsourcebuffer</a></code> at <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>
+                    </li>
+	          </ol>
+	        </li>
+	      </ol>
+            </dd>
+            <dt>If an audio track becomes disabled and the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> associated with this track is not associated with any other enabled or selected track, then run the following steps:</dt>
+            <dd>
+	      <ol>
+	        <li>Remove the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> associated with the audio track from <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</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-removesourcebuffer">removesourcebuffer</a></code> at <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>
+                </li>
+	      </ol>
+            </dd>
+            <dt>If an audio track becomes enabled and the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> associated with this track is not already in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>, then run the following steps:
+            </dt>
+            <dd>
+	      <ol>
+	        <li>Add the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> associated with the audio track to <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</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-addsourcebuffer">addsourcebuffer</a></code> at <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>
+                </li>
+	      </ol>
+            </dd>
+            <dt>If a text track <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-mode">mode</a> becomes <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-disabled">"disabled"</a> and the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> associated with this track is not associated with any other enabled or selected track, then run the following steps:</dt>
+            <dd>
+	      <ol>
+	        <li>Remove the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> associated with the text track from <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</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-removesourcebuffer">removesourcebuffer</a></code> at <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>
+                </li>
+	      </ol>
+            </dd>
+            <dt>If a text track <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-mode">mode</a> becomes <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-showing">"showing"</a> or <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-hidden">"hidden"</a> and the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> associated with this track is not already in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>, then run the following steps:
+            </dt>
+            <dd>
+	      <ol>
+	        <li>Add the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> associated with the text track to <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</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-addsourcebuffer">addsourcebuffer</a></code> at <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>
+                </li>
+	      </ol>
+            </dd>
+          </dl>
+        </section>
+
+        <section id="duration-change-algorithm">
+          <h4><span class="secno">2.4.6 </span>Duration change</h4>
+          <p>Follow these steps when <code><a href="#widl-MediaSource-duration">duration</a></code> needs to change to a <var>new duration</var>.</p>
+          <ol>
+            <li>If the current value of <code><a href="#widl-MediaSource-duration">duration</a></code> is equal to <var>new duration</var>, then return.</li>
+            <li>Set <var>old duration</var> to the current value of <code><a href="#widl-MediaSource-duration">duration</a></code>.
+            </li><li>Update <code><a href="#widl-MediaSource-duration">duration</a></code> to <var>new duration</var>.</li>
+            <li>If the <var>new duration</var> is less than <var>old duration</var>, then call <code><a href="#widl-SourceBuffer-remove-void-double-start-double-end">remove</a>(<var>new duration</var>, <var>old duration</var>)</code> on all objects in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>.
+              <div class="note"><div class="note-title"><span>Note</span></div><p class="">This preserves audio frames and text cues that start before and end after the <code><a href="#widl-MediaSource-duration">duration</a></code>.</p></div></li>
+            <li>If a user agent is unable to partially render audio frames or text cues that start before and end after the <code><a href="#widl-MediaSource-duration">duration</a></code>, then run the following steps:
+              <ol>
+                <li>Update <var>new duration</var> to the highest end timestamp across all <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>.</li>
+                <li>Update <code><a href="#widl-MediaSource-duration">duration</a></code> to <var>new duration</var>.</li>
+              </ol>
+            </li>
+            <li>Update the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-controller-duration">media controller duration</a></code> to <var>new duration</var> and run the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#durationChange">HTMLMediaElement duration change algorithm</a>.</li>
+          </ol>
+        </section>
+
+        <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 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>
+              <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-sourceended">sourceended</a></code> at the <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a>.</li>
+            <li><dl class="switch">
+                <dt>If <var>error</var> is not set, is null, or is an empty string</dt>
+                <dd>
+	          <ol>
+	            <li>Run the <a href="#duration-change-algorithm">duration change algorithm</a> with <var>new duration</var> set to the highest end timestamp across all <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code>.<br>
+		      <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.</li>
+	          </ol>
+	        </dd>
+                <dt>If <var>error</var> is set to <code><a href="#idl-def-EndOfStreamError.network">"network"</a></code>
+                </dt>
+                <dd>
+	          <dl class="switch">
+	            <dt>If the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute equals <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_nothing">HAVE_NOTHING</a></code>
+                    </dt>
+	            <dd>Run the <span>"<i>If the media data cannot be fetched at all, due to network errors, causing the user agent to give up trying to fetch the resource</i>"</span> steps of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-resource">resource fetch algorithm</a>.</dd>
+	            <dt>If the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute is greater than <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_nothing">HAVE_NOTHING</a></code>
+                    </dt>
+	            <dd>Run the "<i>If the connection is interrupted after some media data has been received, causing the user agent to give up trying to fetch the resource</i>" steps of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-resource">resource fetch algorithm</a>.</dd>
+	          </dl>
+	        </dd>
+                <dt>If <var>error</var> is set to <code><a href="#idl-def-EndOfStreamError.decode">"decode"</a></code>
+                </dt>
+                <dd>
+	          <dl class="switch">
+	            <dt>If the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute equals <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_nothing">HAVE_NOTHING</a></code>
+                    </dt>
+	            <dd>Run the "<i>If the media data can be fetched but is found by inspection to be in an unsupported format, or can otherwise not be rendered at all</i>" steps of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-resource">resource fetch algorithm</a>.</dd>
+	            <dt>If the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute is greater than <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_nothing">HAVE_NOTHING</a></code>
+                    </dt>
+	            <dd>Run the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#fatal-decode-error">media data is corrupted</a> steps of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-resource">resource fetch algorithm</a>.</dd>
+	          </dl>
+	        </dd>
+                <dt>Otherwise</dt>
+                <dd>Throw an <code><a href="http://dom.spec.whatwg.org/#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code> exception.</dd>
+              </dl>
+            </li>
+          </ol>
+        </section>
+      </section>
+    </section>
+
+    <section id="sourcebuffer">
+      <!--OddPage--><h2><span class="secno">3. </span>SourceBuffer Object</h2>
+
+
+      <pre class="idl"><span class="idlEnum" id="idl-def-AppendMode">enum <span class="idlEnumID">AppendMode</span> {
+    "<a href="#idl-def-AppendMode.segments" class="idlEnumItem">segments</a>",
+    "<a href="#idl-def-AppendMode.sequence" class="idlEnumItem">sequence</a>"
+};</span></pre><table class="simple"><tr><th colspan="2">Enumeration description</th></tr><tr><td><code id="idl-def-AppendMode.segments">segments</code></td><td>
+          <p>The timestamps in the media segment determine where the <a href="#coded-frame">coded frames</a> are placed in the presentation. Media segments can be appended in any order.</p>
+        </td></tr><tr><td><code id="idl-def-AppendMode.sequence">sequence</code></td><td>
+          <p>Media segments will be treated as adjacent in time independent of the timestamps in the media segment. Coded frames in a new media segment will be placed immediately after the coded
+            frames in the previous media segment. The <code><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></code> attribute will be updated if a new offset is needed to make the new media segments adjacent to the previous media segment.
+            Setting the <code><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></code> attribute in <code><a href="#idl-def-AppendMode.sequence">"sequence"</a></code> mode allows a media segment to be placed at a specific position in the timeline without any knowledge
+            of the timestamps in the media segment.
+          </p>
+        </td></tr></table>
+
+      <pre class="idl"><span class="idlInterface" id="idl-def-SourceBuffer">interface <span class="idlInterfaceID">SourceBuffer</span> : <span class="idlSuperclass"><code><a href="http://dom.spec.whatwg.org/#eventtarget" class="idlType">EventTarget</a></code></span> {
+<span class="idlAttribute">                attribute <span class="idlAttrType"><a href="#idl-def-AppendMode" class="idlType"><code>AppendMode</code></a></span>          <span class="idlAttrName"><a href="#widl-SourceBuffer-mode">mode</a></span>;</span>
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-boolean" class="idlType">boolean</a></code></span>             <span class="idlAttrName"><a href="#widl-SourceBuffer-updating">updating</a></span>;</span>
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#timeranges" class="idlType">TimeRanges</a></code></span>          <span class="idlAttrName"><a href="#widl-SourceBuffer-buffered">buffered</a></span>;</span>
+<span class="idlAttribute">                attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-double" class="idlType">double</a></code></span>              <span class="idlAttrName"><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></span>;</span>
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotracklist" class="idlType">AudioTrackList</a></code></span>      <span class="idlAttrName"><a href="#widl-SourceBuffer-audioTracks">audioTracks</a></span>;</span>
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotracklist" class="idlType">VideoTrackList</a></code></span>      <span class="idlAttrName"><a href="#widl-SourceBuffer-videoTracks">videoTracks</a></span>;</span>
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#texttracklist" class="idlType">TextTrackList</a></code></span>       <span class="idlAttrName"><a href="#widl-SourceBuffer-textTracks">textTracks</a></span>;</span>
+<span class="idlAttribute">                attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-double" class="idlType">double</a></code></span>              <span class="idlAttrName"><a href="#widl-SourceBuffer-appendWindowStart">appendWindowStart</a></span>;</span>
+<span class="idlAttribute">                attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unrestricted-double" class="idlType">unrestricted double</a></code></span> <span class="idlAttrName"><a href="#widl-SourceBuffer-appendWindowEnd">appendWindowEnd</a></span>;</span>
+<span class="idlMethod">    <span class="idlMethType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-void" class="idlType">void</a></code></span> <span class="idlMethName"><a href="#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data">appendBuffer</a></span> (<span class="idlParam"><span class="idlParamType"><code><a href="http://www.khronos.org/registry/typedarray/specs/latest/#ArrayBuffer" class="idlType">ArrayBuffer</a></code></span> <span class="idlParamName">data</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-void" class="idlType">void</a></code></span> <span class="idlMethName"><a href="#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data">appendBuffer</a></span> (<span class="idlParam"><span class="idlParamType"><code><a href="http://www.khronos.org/registry/typedarray/specs/latest/#ArrayBufferView" class="idlType">ArrayBufferView</a></code></span> <span class="idlParamName">data</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-void" class="idlType">void</a></code></span> <span class="idlMethName"><a href="#widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize">appendStream</a></span> (<span class="idlParam"><span class="idlParamType"><code><a href="https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm#idl-def-Stream" class="idlType">Stream</a></code></span> <span class="idlParamName">stream</span></span>, <span class="idlParam">[<span class="extAttr">EnforceRange</span>] optional <span class="idlParamType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unsigned-long-long" class="idlType">unsigned long long</a></code></span> <span class="idlParamName">maxSize</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-void" class="idlType">void</a></code></span> <span class="idlMethName"><a href="#widl-SourceBuffer-abort-void">abort</a></span> ();</span>
+<span class="idlMethod">    <span class="idlMethType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-void" class="idlType">void</a></code></span> <span class="idlMethName"><a href="#widl-SourceBuffer-remove-void-double-start-double-end">remove</a></span> (<span class="idlParam"><span class="idlParamType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-double" class="idlType">double</a></code></span> <span class="idlParamName">start</span></span>, <span class="idlParam"><span class="idlParamType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-double" class="idlType">double</a></code></span> <span class="idlParamName">end</span></span>);</span>
+};</span></pre><section id="attributes-1"><h3><span class="secno">3.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-SourceBuffer-appendWindowEnd"><code>appendWindowEnd</code> of type <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unrestricted-double" class="idlType">unrestricted double</a></code></span>,            </dt><dd>
+          <p>The presentation timestamp for the end of the <a href="#append-window">append window</a>. This attribute is initially set to positive Infinity.</p>
+          <p>On getting, Return the initial value or the last value that was successfully set.</p>
+          <p>On setting, run the following steps:</p>
+          <ol>
+            <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 new value equals NaN, then throw an <code><a href="http://dom.spec.whatwg.org/#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code> and abort these steps.</li>
+            <li>If the new value is less than or equal to <code><a href="#widl-SourceBuffer-appendWindowStart">appendWindowStart</a></code> 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>Update the attribute to the new value.</li>
+          </ol>
+        </dd><dt id="widl-SourceBuffer-appendWindowStart"><code>appendWindowStart</code> of type <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-double" class="idlType">double</a></code></span>,            </dt><dd>
+          <p>The presentation timestamp for the start of the <a href="#append-window">append window</a>. This attribute is initially set to 0.</p>
+          <p>On getting, Return the initial value or the last value that was successfully set.</p>
+          <p>On setting, run the following steps:</p>
+          <ol>
+            <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 new value is less than 0 or greater than or equal to <code><a href="#widl-SourceBuffer-appendWindowEnd">appendWindowEnd</a></code> 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>Update the attribute to the new value.</li>
+          </ol>
+        </dd><dt id="widl-SourceBuffer-audioTracks"><code>audioTracks</code> of type <span class="idlAttrType"><code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotracklist" class="idlType">AudioTrackList</a></code></span>, readonly   </dt><dd>
+          The list of <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotrack">AudioTrack</a></code> objects created by this object.
+        </dd><dt id="widl-SourceBuffer-buffered"><code>buffered</code> of type <span class="idlAttrType"><code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#timeranges" class="idlType">TimeRanges</a></code></span>, readonly   </dt><dd>
+          <p>Indicates what <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#timeranges">TimeRanges</a></code> are buffered in the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>.</p>
+          <p>When the attribute is read the following steps must occur:</p>
+          <ol>
+            <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>Return a new static <a href="http://www.w3.org/TR/html5/embedded-content-0.html#normalized-timeranges-object">normalized TimeRanges object</a> for the <a href="#media-segment">media segments</a> buffered.</li>
+          </ol>
+        </dd><dt id="widl-SourceBuffer-mode"><code>mode</code> of type <span class="idlAttrType"><a href="#idl-def-AppendMode" class="idlType"><code>AppendMode</code></a></span>,            </dt><dd>
+          <p>Controls how a sequence of <a href="#media-segment">media segments</a> are handled.  This attribute is initially set to <code><a href="#idl-def-AppendMode.segments">"segments"</a></code> when the object is created.</p>
+          <p>On getting, Return the initial value or the last value that was successfully set.</p>
+          <p>On setting, run the following steps:</p>
+          <ol>
+            <li>Let <var>new mode</var> equal the new value being assigned to this attribute.</li>
+            <li>If <var>new mode</var> does not equal <code><a href="#idl-def-AppendMode.segments">"segments"</a></code> or <code><a href="#idl-def-AppendMode.sequence">"sequence"</a></code>, 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>
+              <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>If the <var><a href="#sourcebuffer-append-state">append state</a></var> equals <a href="#sourcebuffer-parsing-media-segment">PARSING_MEDIA_SEGMENT</a>, then throw an <code><a href="http://dom.spec.whatwg.org/#dom-domexception-invalid_state_err">INVALID_STATE_ERR</a></code> and abort these steps.</li>
+            <li>If the <var>new mode</var> equals <code><a href="#idl-def-AppendMode.sequence">"sequence"</a></code>, then set the <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var> to the <var><a href="#sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</a></var>.</li>
+            <li>Update the attribute to <var>new mode</var>.</li>
+          </ol>
+        </dd><dt id="widl-SourceBuffer-textTracks"><code>textTracks</code> of type <span class="idlAttrType"><code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#texttracklist" class="idlType">TextTrackList</a></code></span>, readonly   </dt><dd>
+          The list of <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#texttrack">TextTrack</a></code> objects created by this object.
+        </dd><dt id="widl-SourceBuffer-timestampOffset"><code>timestampOffset</code> of type <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-double" class="idlType">double</a></code></span>,            </dt><dd>
+          <p>Controls the offset applied to timestamps inside subsequent <a href="#media-segment">media segments</a> that are appended to this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>. The <code><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></code> is initially set to 0 which indicates that no offset is being applied.</p>
+          <p>On getting, Return the initial value or the last value that was successfully set.</p>
+          <p>On setting, run the following steps:</p>
+          <ol>
+            <li>Let <var>new timestamp offset</var> equal the new value being assigned to this attribute.</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>
+              <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>If the <var><a href="#sourcebuffer-append-state">append state</a></var> equals <a href="#sourcebuffer-parsing-media-segment">PARSING_MEDIA_SEGMENT</a>, then throw an <code><a href="http://dom.spec.whatwg.org/#dom-domexception-invalid_state_err">INVALID_STATE_ERR</a></code> and abort these steps.</li>
+            <li>If the <code><a href="#widl-SourceBuffer-mode">mode</a></code> attribute equals <code><a href="#idl-def-AppendMode.sequence">"sequence"</a></code>, then set the <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var> to <var>new timestamp offset</var>.</li>
+            <li>Update the attribute to <var>new timestamp offset</var>.</li>
+          </ol>
+        </dd><dt id="widl-SourceBuffer-updating"><code>updating</code> of type <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-boolean" class="idlType">boolean</a></code></span>, readonly   </dt><dd>
+          <p>Indicates whether the asynchronous continuation of an <code><a href="#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data">appendBuffer()</a></code>, <code><a href="#widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize">appendStream()</a></code>, or <code><a href="#widl-SourceBuffer-remove-void-double-start-double-end">remove()</a></code>
+            operation is still being processed. This attribute is initially set to false when the object is created.</p>
+        </dd><dt id="widl-SourceBuffer-videoTracks"><code>videoTracks</code> of type <span class="idlAttrType"><code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotracklist" class="idlType">VideoTrackList</a></code></span>, readonly   </dt><dd>
+          The list of <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotrack">VideoTrack</a></code> objects created by this object.
+        </dd></dl></section><section id="methods-1"><h3><span class="secno">3.2 </span>Methods</h3><dl class="methods"><dt id="widl-SourceBuffer-abort-void"><code>abort</code></dt><dd>
+          <p>Aborts the current segment and resets the segment parser.</p>
+
+          
+        <div><em>No parameters.</em></div><div><em>Return type: </em><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-void" class="idlType">void</a></code></code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+            <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-MediaSource-readyState">readyState</a></code> attribute of the <a href="#parent-media-source">parent media source</a> is not in the <code><a href="#idl-def-ReadyState.open">"open"</a></code> state then throw an <code><a href="http://dom.spec.whatwg.org/#dom-domexception-invalid_state_err">INVALID_STATE_ERR</a></code> exception and abort these steps.</li>
+            <li>If the <code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute equals true, then run the following steps:
+              <ol>
+                <li>Abort the <a href="#sourcebuffer-buffer-append">buffer append </a> and <a href="#sourcebuffer-stream-append-loop">stream append loop</a> algorithms if they are running.</li>
+                <li>Set the <code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute to false.</li>
+                <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-abort">abort</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
+                <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-updateend">updateend</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
+              </ol>
+            </li>
+            <li>Run the <a href="#sourcebuffer-reset-parser-state">reset parser state algorithm</a>.</li>
+            <li>Set <code><a href="#widl-SourceBuffer-appendWindowStart">appendWindowStart</a></code> to 0.</li>
+            <li>Set <code><a href="#widl-SourceBuffer-appendWindowEnd">appendWindowEnd</a></code> to positive Infinity.</li>
+          </ol></dd><dt id="widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data"><code>appendBuffer</code></dt><dd>
+          <p>Appends the segment data in an <code><a href="http://www.khronos.org/registry/typedarray/specs/latest/#ArrayBuffer" class="idlType">ArrayBuffer</a></code>[<cite><a class="bibref" href="#bib-TYPED-ARRAYS">TYPED-ARRAYS</a></cite>] to the source buffer.</p>
+          <p>The steps for this method are the same as the ArrayBufferView version of <code><a href="#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data">appendBuffer()</a></code>.</p>
+        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">data</td><td class="prmType"><code><code><a href="http://www.khronos.org/registry/typedarray/specs/latest/#ArrayBuffer" class="idlType">ArrayBuffer</a></code></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-void" class="idlType">void</a></code></code></div></dd><dt id="widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data"><code>appendBuffer</code></dt><dd>
+          <p>Appends the segment data in an <code><a href="http://www.khronos.org/registry/typedarray/specs/latest/#ArrayBufferView" class="idlType">ArrayBufferView</a></code>[<cite><a class="bibref" href="#bib-TYPED-ARRAYS">TYPED-ARRAYS</a></cite>] to the source buffer.</p>
+
+          
+        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">data</td><td class="prmType"><code><code><a href="http://www.khronos.org/registry/typedarray/specs/latest/#ArrayBufferView" class="idlType">ArrayBufferView</a></code></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-void" class="idlType">void</a></code></code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+            <li>If <var>data</var> is null then throw an <code><a href="http://dom.spec.whatwg.org/#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code> exception and abort these steps.</li>
+            <li>Run the <a href="#sourcebuffer-prepare-append">prepare append</a> algorithm.</li>
+            <li>Add <var>data</var> to the end of the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var>.</li>
+            <li>Set the <code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute to true.</li>
+            <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-updatestart">updatestart</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
+            <li>Asynchronously run the <a href="#sourcebuffer-buffer-append">buffer append </a> algorithm.</li>
+          </ol></dd><dt id="widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize"><code>appendStream</code></dt><dd>
+          <p>Appends segment data to the source buffer from a <code><a href="https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm#idl-def-Stream" class="idlType">Stream</a></code>[<cite><a class="bibref" href="#bib-STREAMS-API">STREAMS-API</a></cite>].</p>
+
+          
+        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">stream</td><td class="prmType"><code><code><a href="https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm#idl-def-Stream" class="idlType">Stream</a></code></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr><tr><td class="prmName">maxSize</td><td class="prmType"><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unsigned-long-long" class="idlType">unsigned long long</a></code></code></td><td class="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-void" class="idlType">void</a></code></code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+            <li>If <var>stream</var> is null then throw an <code><a href="http://dom.spec.whatwg.org/#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code> exception and abort these steps.</li>
+            <li>Run the <a href="#sourcebuffer-prepare-append">prepare append</a> algorithm.</li>
+            <li>Set the <code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute to true.</li>
+            <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-updatestart">updatestart</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
+            <li>Asynchronously run the <a href="#sourcebuffer-stream-append-loop">stream append loop</a> algorithm with <var>stream</var> and <var>maxSize</var>.</li>
+          </ol></dd><dt id="widl-SourceBuffer-remove-void-double-start-double-end"><code>remove</code></dt><dd>
+          <p>Removes media for a specific time range.</p>
+
+          
+
+        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">start</td><td class="prmType"><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-double" class="idlType">double</a></code></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr><tr><td class="prmName">end</td><td class="prmType"><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-double" class="idlType">double</a></code></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-void" class="idlType">void</a></code></code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+            <li>If <var>start</var> is negative or greater than <code><a href="#widl-MediaSource-duration">duration</a></code>, 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 <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>
+              <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>
+            <li>Run the <a href="#sourcebuffer-coded-frame-removal">coded frame removal algorithm</a> with <var>start</var> and <var>end</var> as the start and end of the removal range.</li>
+            <li>Set the <code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute to false.</li>
+            <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-update">update</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
+            <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-updateend">updateend</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
+       </ol></dd></dl></section>
+
+      <section id="track-buffers">
+        <h3><span class="secno">3.3 </span>Track Buffers</h3>
+        <p>A <dfn id="track-buffer">track buffer</dfn> stores the <a href="#track-description">track descriptions</a> and <a href="#coded-frame">coded frames</a> for an individual
+          track. The track buffer is updated as <a href="#init-segment">initialization segments</a> and <a href="#media-segment">media segments</a> are appended to the
+          <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>.</p>
+
+        <p>Each <a href="#track-buffer">track buffer</a> has a <dfn id="last-decode-timestamp">last decode timestamp</dfn> variable that stores
+          the decode timestamp of the last <a href="#coded-frame">coded frame</a> appended in the current <a href="#coded-frame-group">coded frame group</a>. The variable is initially
+          unset to indicate that no <a href="#coded-frame">coded frames</a> have been appended yet.</p>
+
+        <p>Each <a href="#track-buffer">track buffer</a> has a <dfn id="last-frame-duration">last frame duration</dfn> variable that stores
+          the frame duration of the last <a href="#coded-frame">coded frame</a> appended in the current <a href="#coded-frame-group">coded frame group</a>. The variable is initially
+          unset to indicate that no <a href="#coded-frame">coded frames</a> have been appended yet.</p>
+
+        <p>Each <a href="#track-buffer">track buffer</a> has a <dfn id="highest-presentation-timestamp">highest presentation timestamp</dfn> variable that stores
+          the highest presentation timestamp encountered in a <a href="#coded-frame">coded frame</a> appended in the current <a href="#coded-frame-group">coded frame group</a>.
+          The variable is initially unset to indicate that no <a href="#coded-frame">coded frames</a> have been appended yet.</p>
+
+        <p>Each <a href="#track-buffer">track buffer</a> has a <dfn id="need-RAP-flag">need random access point flag</dfn> variable that keeps track of whether
+          the track buffer is waiting for a <a href="#random-access-point">random access point</a> <a href="#coded-frame">coded frame</a>. The variable is initially set to true to
+          indicate that <a href="#random-access-point">random access point</a> <a href="#coded-frame">coded frame</a> is needed before anything can be added to the
+          <a href="#track-buffer">track buffer</a>.</p>
+      </section>
+
+      <section id="sourcebuffer-events">
+        <h3><span class="secno">3.4 </span>Event Summary</h3>
+        <table class="old-table">
+          <thead>
+            <tr>
+              <th>Event name</th>
+              <th>Interface</th>
+              <th>Dispatched when...</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td><dfn id="dom-evt-updatestart"><code>updatestart</code></dfn></td>
+              <td><code>Event</code></td>
+              <td><code><a href="#widl-SourceBuffer-updating">updating</a></code> transitions from false to true.</td>
+            </tr>
+            <tr>
+              <td><dfn id="dom-evt-update"><code>update</code></dfn></td>
+              <td><code>Event</code></td>
+              <td>The append or remove has successfully completed. <code><a href="#widl-SourceBuffer-updating">updating</a></code> transitions from true to false.</td>
+            </tr>
+            <tr>
+              <td><dfn id="dom-evt-updateend"><code>updateend</code></dfn></td>
+              <td><code>Event</code></td>
+              <td>The append or remove has ended.</td>
+            </tr>
+            <tr>
+              <td><dfn id="dom-evt-error"><code>error</code></dfn></td>
+              <td><code>Event</code></td>
+              <td>An error occurred during the append. <code><a href="#widl-SourceBuffer-updating">updating</a></code> transitions from true to false.</td>
+            </tr>
+            <tr>
+              <td><dfn id="dom-evt-abort"><code>abort</code></dfn></td>
+              <td><code>Event</code></td>
+              <td>The append or remove was aborted by an <code><a href="#widl-SourceBuffer-abort-void">abort()</a></code> call. <code><a href="#widl-SourceBuffer-updating">updating</a></code> transitions from true to false.</td>
+            </tr>
+          </tbody>
+        </table>
+      </section>
+
+      <section id="sourcebuffer-algorithms">
+        <h3><span class="secno">3.5 </span>Algorithms</h3>
+
+        <section id="sourcebuffer-segment-parser-loop">
+          <h4><span class="secno">3.5.1 </span>Segment Parser Loop</h4>
+          <p>All SourceBuffer objects have an internal <dfn id="sourcebuffer-append-state">append state</dfn> variable that keeps track of the high-level segment parsing state. It is initially set to <a href="#sourcebuffer-waiting-for-segment">WAITING_FOR_SEGMENT</a> and can transition to the following states as data is appended.</p>
+          <table class="old-table">
+            <thead>
+	      <tr>
+                <th>Append state name</th>
+                <th>Description</th>
+              </tr>
+            </thead>
+            <tbody>
+              <tr>
+                <td><dfn id="sourcebuffer-waiting-for-segment">WAITING_FOR_SEGMENT</dfn></td>
+                <td>Waiting for the start of an <a href="#init-segment">initialization segment</a> or <a href="#media-segment">media segment</a> to be appended.</td>
+              </tr>
+              <tr>
+                <td><dfn id="sourcebuffer-parsing-init-segment">PARSING_INIT_SEGMENT</dfn></td>
+                <td>Currently parsing an <a href="#init-segment">initialization segment</a>.</td>
+              </tr>
+	      <tr>
+	        <td><dfn id="sourcebuffer-parsing-media-segment">PARSING_MEDIA_SEGMENT</dfn></td>
+                <td>Currently parsing a <a href="#media-segment">media segment</a>.</td>
+              </tr>
+            </tbody>
+          </table>
+
+          <p>The <dfn id="sourcebuffer-input-buffer">input buffer</dfn> is a byte buffer that is used to hold unparsed bytes across <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> calls. The buffer is empty when the SourceBuffer object is created.</p>
+
+          <p>The <dfn id="sourcebuffer-buffer-full-flag">buffer full flag</dfn> keeps track of whether <code><a href="#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data">appendBuffer()</a></code> or
+            <code><a href="#widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize">appendStream()</a></code> is allowed to accept more bytes. It is set to false when the SourceBuffer object is created and gets updated
+            as data is appended and removed.</p>
+
+          <p>The <dfn id="sourcebuffer-group-start-timestamp">group start timestamp</dfn> variable keeps track of the starting timestamp for a new
+            <a href="#coded-frame-group">coded frame group</a> in the <code><a href="#idl-def-AppendMode.sequence">"sequence"</a></code> mode.
+            It is unset when the SourceBuffer object is created and gets updated when the <code><a href="#widl-SourceBuffer-mode">mode</a></code> attribute equals <code><a href="#idl-def-AppendMode.sequence">"sequence"</a></code> and the
+            <code><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></code> attribute is set, or the <a href="#sourcebuffer-coded-frame-processing">coded frame processing algorithm</a> runs.
+          </p>
+
+          <p>The <dfn id="sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</dfn> variable stores the highest presentation
+            end timestamp encountered in the current <a href="#coded-frame-group">coded frame group</a>. It is set to 0 when the SourceBuffer object is created and gets updated
+            by the <a href="#sourcebuffer-coded-frame-processing">coded frame processing algorithm</a>.
+          </p>
+
+          <p>When this algorithm is invoked, run the following steps:</p>
+
+          <ol>
+            <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> contains bytes that violate the <a href="#sourcebuffer-byte-stream-format-spec">SourceBuffer byte stream format specification</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 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>
+	        <li>If the beginning of the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var> indicates the start of an <a href="#init-segment">initialization segment</a>, set the <var><a href="#sourcebuffer-append-state">append state</a></var> to <a href="#sourcebuffer-parsing-init-segment">PARSING_INIT_SEGMENT</a>.</li>
+	        <li>If the beginning of the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var> indicates the start of an <a href="#media-segment">media segment</a>, set <var><a href="#sourcebuffer-append-state">append state</a></var> to <a href="#sourcebuffer-parsing-media-segment">PARSING_MEDIA_SEGMENT</a>.</li>
+	        <li>Jump to the <i>loop top</i> step above.</li>
+	      </ol>
+            </li>
+            <li>
+	      <p>If the <var><a href="#sourcebuffer-append-state">append state</a></var> equals <a href="#sourcebuffer-parsing-init-segment">PARSING_INIT_SEGMENT</a>, then run the following steps:</p>
+	      <ol>
+	        <li>If the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var> does not contain a complete <a href="#init-segment">initialization segment</a> yet, then jump to the <i>need more data</i> step below.</li>
+	        <li>Run the <a href="#sourcebuffer-init-segment-received">initialization segment received algorithm</a>.</li>
+	        <li>Remove the <a href="#init-segment">initialization segment</a> bytes from the beginning of the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var>.</li>
+	        <li>Set <var><a href="#sourcebuffer-append-state">append state</a></var> to <a href="#sourcebuffer-waiting-for-segment">WAITING_FOR_SEGMENT</a>.</li>
+	        <li>Jump to the <i>loop top</i> step above.</li>
+	      </ol>
+            </li>
+            <li>
+	      <p>If the <var><a href="#sourcebuffer-append-state">append state</a></var> equals <a href="#sourcebuffer-parsing-media-segment">PARSING_MEDIA_SEGMENT</a>, then run the following steps:</p>
+	      <ol>
+                <li>If the <var><a href="#first-init-segment-flag">first initialization segment flag</a></var> is false, 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>
+	          <p>If the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var> does not contain a complete <a href="#media-segment">media segment</a> header yet, then jump to the <i>need more data</i> step below.</p>
+	        </li>
+	        <li>If the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var> contains one or more complete <a href="#coded-frame">coded frames</a>, then run the
+                  <a href="#sourcebuffer-coded-frame-processing">coded frame processing algorithm</a>.
+                  <div class="note"><div class="note-title"><span>Note</span></div><p class="">
+                    The frequency at which the coded frame processing algorithm is run is implementation-specific. The coded frame processing algorithm may
+                    be called when the input buffer contains the complete media segment or it may be called multiple times as complete coded frames are
+                    added to the input buffer.
+                  </p></div>
+                </li>
+	        <li>Remove the <a href="#media-segment">media segment</a> bytes from the beginning of the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var>.</li>
+                <li>If this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> is full and cannot accept more media data, then set the <var><a href="#sourcebuffer-buffer-full-flag">buffer full flag</a></var> to true.</li>
+	        <li>
+	          <p>Set <var><a href="#sourcebuffer-append-state">append state</a></var> to <a href="#sourcebuffer-waiting-for-segment">WAITING_FOR_SEGMENT</a>.</p>
+	          <div class="note"><div class="note-title"><span>Note</span></div><p class="">Incremental parsers should only do this transition after the entire media segment has been received.</p></div>
+	        </li>
+	        <li>Jump to the <i>loop top</i> step above.</li>
+	      </ol>
+            </li>
+            <li><i>Need more data:</i> Return control to the calling algorithm.</li>
+          </ol>
+        </section>
+
+        <section id="sourcebuffer-reset-parser-state">
+          <h4><span class="secno">3.5.2 </span>Reset Parser State</h4>
+          <p>When the parser state needs to be reset, run the following steps:</p>
+          <ol>
+            <li>If the <var><a href="#sourcebuffer-append-state">append state</a></var> equals <a href="#sourcebuffer-parsing-media-segment">PARSING_MEDIA_SEGMENT</a> and the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var> contains some
+              complete <a href="#coded-frame">coded frames</a>, then run the <a href="#sourcebuffer-coded-frame-processing">coded frame processing algorithm</a> until all of these complete
+              <a href="#coded-frame">coded frames</a> have been processed.</li>
+            <li>Unset the <var><a href="#last-decode-timestamp">last decode timestamp</a></var> on all <a href="#track-buffer">track buffers</a>.</li>
+            <li>Unset the <var><a href="#last-frame-duration">last frame duration</a></var> on all <a href="#track-buffer">track buffers</a>.</li>
+            <li>Unset the <var><a href="#highest-presentation-timestamp">highest presentation timestamp</a></var> on all <a href="#track-buffer">track buffers</a>.</li>
+            <li>Set the <var><a href="#need-RAP-flag">need random access point flag</a></var> on all <a href="#track-buffer">track buffers</a> to true.</li>
+            <li>Remove all bytes from the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var>.</li>
+            <li>Set <var><a href="#sourcebuffer-append-state">append state</a></var> to <a href="#sourcebuffer-waiting-for-segment">WAITING_FOR_SEGMENT</a>.</li>
+          </ol>
+        </section>
+
+        <section id="sourcebuffer-append-error">
+          <h4><span class="secno">3.5.3 </span>Append Error Algorithm</h4>
+          <p>When an error occurs during an append, run the following steps:</p>
+          <ol>
+            <li>Run the <a href="#sourcebuffer-reset-parser-state">reset parser state algorithm</a>.</li>
+            <li>Set the <code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute to false.</li>
+            <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-error">error</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
+            <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-updateend">updateend</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
+          </ol>
+        </section>
+
+        <section id="sourcebuffer-prepare-append">
+            <h4><span class="secno">3.5.4 </span>Prepare Append Algorithm</h4>
+            <p>When an append operation begins, the follow steps are run to validate and prepare the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>.</p>
+            <ol>
+            <li>If the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> has been removed from the <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> attribute of 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>
+              <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>Run the <a href="#sourcebuffer-coded-frame-eviction">coded frame eviction algorithm</a>.</li>
+            <li>
+              <p>If the <var><a href="#sourcebuffer-buffer-full-flag">buffer full flag</a></var> equals true, then throw a <code><a href="http://dom.spec.whatwg.org/#dom-domexception-quota_exceeded_err">QUOTA_EXCEEDED_ERR</a></code> exception and abort these step.</p>
+              <div class="note"><div class="note-title"><span>Note</span></div><p class="">This is the signal that the implementation was unable to evict enough data to accomodate the append or the append is too big. The web
+                application should use <code><a href="#widl-SourceBuffer-remove-void-double-start-double-end">remove()</a></code> to explicitly free up space and/or reduce the size of the append.</p></div>
+            </li>
+            </ol>
+        </section>
+
+        <section id="sourcebuffer-buffer-append">
+          <h4><span class="secno">3.5.5 </span>Buffer Append Algorithm</h4>
+          <p>When <code><a href="#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data">appendBuffer()</a></code> is called, the following steps are run to process the appended data.</p>
+          <ol>
+            <li>Run the <a href="#sourcebuffer-segment-parser-loop">segment parser loop</a> algorithm.</li>
+            <li>If the <a href="#sourcebuffer-segment-parser-loop">segment parser loop</a> algorithm in the previous step was aborted, then abort this algorithm.</li>
+            <li>Set the <code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute to false.</li>
+            <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-update">update</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
+            <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-updateend">updateend</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
+          </ol>
+        </section>
+
+        <section id="sourcebuffer-stream-append-loop">
+          <h4><span class="secno">3.5.6 </span>Stream Append Loop</h4>
+          <p>When a <code><a href="https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm#idl-def-Stream" class="idlType">Stream</a></code>[<cite><a class="bibref" href="#bib-STREAMS-API">STREAMS-API</a></cite>] is passed to <code><a href="#widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize">appendStream()</a></code>, the following steps are run to transfer data from the
+            <code><a href="https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm#idl-def-Stream" class="idlType">Stream</a></code> to the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>. This algorithm is initialized with the  <var>stream</var> and <var>maxSize</var> parameters
+            from the <code><a href="#widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize">appendStream()</a></code> call.
+          </p>
+          <ol>
+            <li>If <var>maxSize</var> is set, then let <var>bytesLeft</var> equal <var>maxSize</var>.</li>
+            <li><i>Loop Top: </i>If <var>maxSize</var> is set and <var>bytesLeft</var> equals 0, then jump to the <i>loop done</i> step below.</li>
+            <li>If <var>stream</var> has been closed, then jump to the <i>loop done</i> step below.</li>
+            <li>Read data from <var>stream</var> into <var>data</var>:
+              <dl class="switch">
+                <dt>If <var>maxSize</var> is set:</dt>
+                <dd>
+                  <ol>
+                    <li>Read up to <var>bytesLeft</var> bytes from <var>stream</var> into <var>data</var>.</li>
+                    <li>Subtract the number of bytes in <var>data</var> from <var>bytesLeft</var>.</li>
+                </ol></dd>
+                <dt>Otherwise:</dt>
+                <dd>Read all available bytes in <var>stream</var> into <var>data</var>.</dd>
+              </dl>
+            </li>
+            <li>If an error occured while reading from <var>stream</var>, then run the <a href="#sourcebuffer-append-error">append error algorithm</a> and abort this algorithm.</li>
+            <li>Run the <a href="#sourcebuffer-coded-frame-eviction">coded frame eviction algorithm</a>.</li>
+            <li>
+              <p>If the <var><a href="#sourcebuffer-buffer-full-flag">buffer full flag</a></var> equals true, then run the <a href="#sourcebuffer-append-error">append error algorithm</a> and abort this algorithm.</p>
+              <div class="note"><div class="note-title"><span>Note</span></div><p class="">The web application should use <code><a href="#widl-SourceBuffer-remove-void-double-start-double-end">remove()</a></code> to free up space in the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a>.</p></div>
+            </li>
+            <li>Add <var>data</var> to the end of the <var><a href="#sourcebuffer-input-buffer">input buffer</a></var>.</li>
+            <li>Run the <a href="#sourcebuffer-segment-parser-loop">segment parser loop</a> algorithm.</li>
+            <li>If the <a href="#sourcebuffer-segment-parser-loop">segment parser loop</a> algorithm in the previous step was aborted, then abort this algorithm.</li>
+            <li>Jump to the <i>loop top</i> step above.</li>
+            <li><i>Loop Done: </i>Set the <code><a href="#widl-SourceBuffer-updating">updating</a></code> attribute to false.</li>
+            <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-update">update</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
+            <li><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-updateend">updateend</a></code> at this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object.</li>
+          </ol>
+        </section>
+
+        <section id="sourcebuffer-init-segment-received">
+          <h4><span class="secno">3.5.7 </span>Initialization Segment Received</h4>
+          <p>The following steps are run when the <a href="#sourcebuffer-segment-parser-loop">segment parser loop</a> successfully parses a complete <a href="#init-segment">initialization segment</a>:</p>
+          <p>Each SourceBuffer object has an internal <dfn id="first-init-segment-flag">first initialization segment flag</dfn> that tracks whether the first <a href="#init-segment">initialization segment</a> has been appended. This flag is set to false when the SourceBuffer is created and updated by the algorithm below.</p>
+          <ol>
+            <li>Update the <code><a href="#widl-MediaSource-duration">duration</a></code> attribute if it currently equals NaN:
+              <dl class="switch">
+	        <dt>If the initialization segment contains a duration:</dt>
+	        <dd>Run the <a href="#duration-change-algorithm">duration change algorithm</a> with <var>new duration</var> set to the duration in the initialization segment.</dd>
+	        <dt>Otherwise:</dt>
+	        <dd>Run the <a href="#duration-change-algorithm">duration change algorithm</a> with <var>new duration</var> set to positive Infinity.</dd>
+              </dl>
+            </li>
+            <li>If the <a href="#init-segment">initialization segment</a> has no audio, video, or text tracks, then run the <a href="#end-of-stream-algorithm">end of stream algorithm</a> with the <var>error</var> parameter set to <code><a href="#idl-def-EndOfStreamError.decode">"decode"</a></code> and abort these steps.</li>
+            <li>If the <var><a href="#first-init-segment-flag">first initialization segment flag</a></var> is true, then run the following steps:
+              <ol>
+                <li>Verify the following properties. If any of the checks fail 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.
+                  <ul>
+                    <li>The number of audio, video, and text tracks match what was in the first <a href="#init-segment">initialization segment</a>.</li>
+                    <li>The codecs for each track, match what was specified in the first <a href="#init-segment">initialization segment</a>.</li>
+                    <li>If more than one track for a single type are present (ie 2 audio tracks), then the <a href="#track-id">Track IDs</a> match the ones in the
+                      first <a href="#init-segment">initialization segment</a>.</li>
+                  </ul>
+                </li>
+                <li>Add the appropriate <a href="#track-description">track descriptions</a> from this <a href="#init-segment">initialization segment</a> to each of the 
+                  <a href="#track-buffer">track buffers</a>.</li>
+              </ol>
+            </li>
+            <li>Let <var>active track flag</var> equal false.</li>
+            <li>
+              <p>If the <var><a href="#first-init-segment-flag">first initialization segment flag</a></var> is false, then run the following steps:</p>
+              <ol>
+                <li>If the <a href="#init-segment">initialization segment</a> contains tracks with codecs the user agent does not support, then run the <a href="#end-of-stream-algorithm">end of stream algorithm</a> with the <var>error</var> parameter set to <code><a href="#idl-def-EndOfStreamError.decode">"decode"</a></code>
+                  and abort these steps.
+                  <div class="note"><div class="note-title"><span>Note</span></div><p class="">User agents may consider codecs, that would otherwise be supported, as "not supported" here if the codecs were not
+                    specified in the <var>type</var> parameter passed to <code><a href="#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type">addSourceBuffer()</a></code>. <br>
+                    For example, MediaSource.isTypeSupported('video/web;codecs="vp8,vorbis"') may return true, but if
+                    <code><a href="#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type">addSourceBuffer()</a></code> was called with 'video/web;codecs="vp8"' and a Vorbis track appears in the
+                    <a href="#init-segment">initialization segment</a>, then the user agent may use this step to trigger a decode error.
+                  </p></div>
+                </li>
+                <li>
+                  <p>For each audio track in the <a href="#init-segment">initialization segment</a>, run following steps:</p>
+                  <ol>
+                    <li>Let <var>new audio track</var> be a new <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#audiotrack">AudioTrack</a></code> object.</li>
+                    <li>Generate a unique ID and assign it to the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-audiotrack-id">id</a></code> property on <var>new audio track</var>.</li>
+                    <li>
+                      <p>
+                        If <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-audiotracks">audioTracks</a></code>.<code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-audiotracklist-length">length</a></code> equals 0, then run
+                          the following steps:
+                      </p>
+                      <ol>
+                        <li>Set the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-audiotrack-enabled">enabled</a></code> property on <var>new audio track</var> to true.</li>
+                        <li>Set <var>active track flag</var> to true.</li>
+                      </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 fire a <a href="http://www.w3.org/TR/html5/infrastructure.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 fire a <a href="http://www.w3.org/TR/html5/infrastructure.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>
+                  </ol>
+                </li>
+                <li>
+                  <p>For each video track in the <a href="#init-segment">initialization segment</a>, run following steps:</p>
+                  <ol>
+                    <li>Let <var>new video track</var> be a new <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#videotrack">VideoTrack</a></code> object.</li>
+                    <li>Generate a unique ID and assign it to the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-videotrack-id">id</a></code> property on <var>new video track</var>.</li>
+                    <li>
+                      <p>
+                        If <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-videotracks">videoTracks</a></code>.<code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-videotracklist-length">length</a></code> equals 0, then run
+                          the following steps:
+                      </p>
+                      <ol>
+                        <li>Set the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-videotrack-selected">selected</a></code> property on <var>new video track</var> to true.</li>
+                        <li>Set <var>active track flag</var> to true.</li>
+                      </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 fire a <a href="http://www.w3.org/TR/html5/infrastructure.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 fire a <a href="http://www.w3.org/TR/html5/infrastructure.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>
+                  </ol>
+                </li>
+                <li>
+                  <p>For each text track in the <a href="#init-segment">initialization segment</a>, run following steps:</p>
+                  <ol>
+                    <li>
+                      Let <var>new text track</var> be a new <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#texttrack">TextTrack</a></code> object with its properties populated with the appropriate
+                      information from the <a href="#init-segment">initialization segment</a>.</li>
+                    <li>
+                      If the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-mode">mode</a></code> property on <var>new text track</var> equals <code><a href="http://www.w3.org/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 <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 fire a <a href="http://www.w3.org/TR/html5/infrastructure.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 fire a <a href="http://www.w3.org/TR/html5/infrastructure.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>
+                  </ol>
+                </li>
+                <li>If <var>active track flag</var> equals true, then run the following steps:
+                  <ol>
+                    <li>Add this <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> to <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</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-addsourcebuffer">addsourcebuffer</a></code> at <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code></li>
+                  </ol>
+                </li>
+                <li>Set <var><a href="#first-init-segment-flag">first initialization segment flag</a></var> to true.</li>
+              </ol>
+            </li>
+            <li>
+              <p>If the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute is <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_nothing">HAVE_NOTHING</a></code>, then run the following steps:</p>
+              <ol>
+                <li>
+                  If one or more objects in <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> have <var><a href="#first-init-segment-flag">first initialization segment flag</a></var> set to false, then abort
+                  these steps.</li>
+                <li>Set the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_metadata">HAVE_METADATA</a></code>.</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#event-media-loadedmetadata">loadedmetadata</a></code> at the media element.</li>
+              </ol>
+            </li>
+            <li>
+              If the <var>active track flag</var> equals true and the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute is greater than
+              <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_current_data">HAVE_CURRENT_DATA</a></code>, then set the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_metadata">HAVE_METADATA</a></code>.
+            </li>
+          </ol>
+        </section>
+
+        <section id="sourcebuffer-coded-frame-processing">
+          <h4><span class="secno">3.5.8 </span>Coded Frame Processing</h4>
+          <p>When complete <a href="#coded-frame">coded frames</a> have been parsed by the <a href="#sourcebuffer-segment-parser-loop">segment parser loop</a> then the following steps are run:</p>
+          <ol>
+            <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.
+                  <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
+                    behavior clear without adding unnecessary complexity to the algorithm to deal with the fact that adding a timestampOffset may
+                    cause a timestamp rollover in the underlying timestamp representation used by the byte stream format. Implementations can use any
+                    internal timestamp representation they wish, but the addition of timestampOffset should behave in a similar manner to what would happen
+                    if a double precision floating point representation was used.
+                  </p></div>
+                </li>
+                <li>Let <var>frame duration</var> be a double precision floating point representation of the coded frame's duration in seconds.</li>
+                <li>If <code><a href="#widl-SourceBuffer-mode">mode</a></code> equals <code><a href="#idl-def-AppendMode.sequence">"sequence"</a></code> and <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var> is set, then run the following steps:
+                  <ol>
+                    <li>Set <code><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></code> equal to <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var> - <var>presentation timestamp</var>.</li>
+                    <li>Set <var><a href="#sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</a></var> equal to <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var>.</li>
+                    <li>Set the <var><a href="#need-RAP-flag">need random access point flag</a></var> on all <a href="#track-buffer">track buffers</a> to true.</li>
+                    <li>Unset <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var>.</li>
+                  </ol>
+                </li>
+	        <li>
+	          <p>If <code><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></code> is not 0, then run the following steps:</p>
+	          <ol>
+	            <li>Add <code><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></code> to the <var>presentation timestamp</var>.</li>
+	            <li>Add <code><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></code> to the <var>decode timestamp</var>.</li>
+	            <li>If the <var>presentation timestamp</var> or <var>decode timestamp</var> is less than the <a href="#presentation-start-time">presentation start time</a>, 
+                      then run the <a href="#end-of-stream-algorithm">end of stream algorithm</a> with the <var>error</var> parameter set to <code><a href="#idl-def-EndOfStreamError.decode">"decode"</a></code>, and abort these steps.</li>
+	          </ol>
+	        </li>
+                <li>Let <var>track buffer</var> equal the <a href="#track-buffer">track buffer</a> that the coded frame will be added to.</li>
+                <li>
+                  <dl class="switch">
+                    <dt>If <var><a href="#last-decode-timestamp">last decode timestamp</a></var> for <var>track buffer</var> is set and <var>decode timestamp</var> is less than
+                      <var><a href="#last-decode-timestamp">last decode timestamp</a></var>:</dt>
+                    <dd>OR</dd>
+                    <dt>If <var><a href="#last-decode-timestamp">last decode timestamp</a></var> for <var>track buffer</var> is set and the difference between <var>decode timestamp</var> and <var><a href="#last-decode-timestamp">last decode timestamp</a></var>
+                      is greater than 2 times <var><a href="#last-frame-duration">last frame duration</a></var>:</dt>
+                    <dd>
+                      <ol>
+                        <li>
+                          <dl class="switch">
+                            <dt>If <code><a href="#widl-SourceBuffer-mode">mode</a></code> equals <code><a href="#idl-def-AppendMode.segments">"segments"</a></code>:</dt>
+                            <dd>Set <var><a href="#sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</a></var> to <var>presentation timestamp</var>.</dd>
+                            <dt>If <code><a href="#widl-SourceBuffer-mode">mode</a></code> equals <code><a href="#idl-def-AppendMode.sequence">"sequence"</a></code>:</dt>
+                            <dd>Set <var><a href="#sourcebuffer-group-start-timestamp">group start timestamp</a></var> equal to the <var><a href="#sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</a></var>.</dd>
+                          </dl>
+                        </li>
+                        <li>Unset the <var><a href="#last-decode-timestamp">last decode timestamp</a></var> on all <a href="#track-buffer">track buffers</a>.</li>
+                        <li>Unset the <var><a href="#last-frame-duration">last frame duration</a></var> on all <a href="#track-buffer">track buffers</a>.</li>
+                        <li>Unset the <var><a href="#highest-presentation-timestamp">highest presentation timestamp</a></var> on all <a href="#track-buffer">track buffers</a>.</li>
+                        <li>Set the <var><a href="#need-RAP-flag">need random access point flag</a></var> on all <a href="#track-buffer">track buffers</a> to true.</li>
+                        <li>Jump to the <i>Loop Top</i> step above to restart processing of the current <a href="#coded-frame">coded frame</a>.</li>
+                      </ol>
+                    </dd>
+                    <dt>Otherwise:</dt>
+                    <dd>Continue.</dd>
+                  </dl>
+                </li>
+                <li>Let <var>frame end timestamp</var> equal the sum of <var>presentation timestamp</var> and <var>frame duration</var>.</li>
+                <li>If <var>presentation timestamp</var> is less than <code><a href="#widl-SourceBuffer-appendWindowStart">appendWindowStart</a></code>, then set the <var><a href="#need-RAP-flag">need random access point flag</a></var> to true, drop the
+                  coded frame, and jump to the top of the loop to start processing the next coded frame.
+                  <div class="note"><div class="note-title"><span>Note</span></div><p class="">Some implementations may choose to collect some of these coded frames that are outside the <a href="#append-window">append window</a> and use them
+                    to generate a splice at the first coded frame that has a presentation timestamp greater than or equal to <code><a href="#widl-SourceBuffer-appendWindowStart">appendWindowStart</a></code> even if
+                    that frame is not a <a href="#random-access-point">random access point</a>. Supporting this requires multiple decoders or faster than real-time decoding so for now
+                    this behavior will not be a normative requirement.
+                  </p></div>
+                </li>
+                <li>If <var>frame end timestamp</var> is greater than <code><a href="#widl-SourceBuffer-appendWindowEnd">appendWindowEnd</a></code>, then set the <var><a href="#need-RAP-flag">need random access point flag</a></var> to true, drop the
+                  coded frame, and jump to the top of the loop to start processing the next coded frame.
+                </li><li>If the <var><a href="#need-RAP-flag">need random access point flag</a></var> on <var>track buffer</var> equals true, then run the following steps:
+                  <ol>
+                    <li>If the coded frame is not a <a href="#random-access-point">random access point</a>, then drop the coded frame and jump to the top of the loop to start
+                      processing the next coded frame.</li>
+                    <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 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>
+                      <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>
+                <li>Remove existing coded frames in <var>track buffer</var>:
+                  <dl class="switch">
+                    <dt>If <var><a href="#highest-presentation-timestamp">highest presentation timestamp</a></var> for <var>track buffer</var> is not set:</dt>
+                    <dd>Remove all <a href="#coded-frame">coded frames</a> from <var>track buffer</var> that have a presentation timestamp greater than or equal to
+                      <var>presentation timestamp</var> and less than <var>frame end timestamp</var>.</dd>
+                    <dt>If <var><a href="#highest-presentation-timestamp">highest presentation timestamp</a></var> for <var>track buffer</var> is set and less than <var>presentation timestamp</var></dt>
+                    <dd>Remove all <a href="#coded-frame">coded frames</a> from <var>track buffer</var> that have a presentation timestamp greater than
+                      <var><a href="#highest-presentation-timestamp">highest presentation timestamp</a></var> and less than or equal to <var>frame end timestamp</var>.</dd>
+                  </dl>
+                </li>
+                <li>Remove decoding dependencies of the coded frames removed in the previous step:
+                  <dl class="switch">
+                    <dt>If detailed information about decoding dependencies is available:</dt>
+                    <dd>Remove all <a href="#coded-frame">coded frames</a> from <var>track buffer</var> that have decoding dependencies on the coded frames removed in
+                      the previous step.
+                      <div class="note"><div class="note-title"><span>Note</span></div><p class="">For example if an I-frame is removed in the previous step, then all P-frames &amp; B-frames that depend on that I-frame
+                        should be removed from <var>track buffer</var>. This makes sure that decode dependencies are properly maintained during overlaps.
+                      </p></div>
+                    </dd>
+                    <dt>Otherwise:</dt>
+                    <dd>Remove all <a href="#coded-frame">coded frames</a> between the coded frames removed in the previous step and the next
+                      <a href="#random-access-point">random access point</a> after those removed frames.
+                      <div class="note"><div class="note-title"><span>Note</span></div><p class="">Removing all <a href="#coded-frame">coded frames</a> until the next <a href="#random-access-point">random access point</a> is a conservative
+                        estimate of the decoding dependencies since it assumes all frames between the removed frames and the next random access point
+                        depended on the frames that were removed.
+                      </p></div>
+                    </dd>
+                </dl></li>
+                <li>
+                  <dl class="switch">
+                    <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>
+                  </dl>
+                </li><li>Set <var><a href="#last-decode-timestamp">last decode timestamp</a></var> for <var>track buffer</var> to <var>decode timestamp</var>.</li>
+                <li>Set <var><a href="#last-frame-duration">last frame duration</a></var> for <var>track buffer</var> to <var>frame duration</var>.</li>
+                <li>If <var><a href="#highest-presentation-timestamp">highest presentation timestamp</a></var> for <var>track buffer</var> is unset or <var>frame end timestamp</var> is greater
+                  than <var><a href="#highest-presentation-timestamp">highest presentation timestamp</a></var>, then set <var><a href="#highest-presentation-timestamp">highest presentation timestamp</a></var> for <var>track buffer</var>
+                  to <var>frame end timestamp</var>.
+                  <div class="note"><div class="note-title"><span>Note</span></div><p class="">The greater than check is needed because bidirectional prediction between coded frames can cause
+                    <var>presentation timestamp</var> to not be monotonically increasing eventhough the decode timestamps are monotonically increasing.</p></div>
+                </li>
+                <li>If <var><a href="#sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</a></var> is unset or <var>frame end timestamp</var> is greater than
+                  <var><a href="#sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</a></var>, then set <var><a href="#sourcebuffer-highest-presentation-end-timestamp">highest presentation end timestamp</a></var> equal to
+                  <var>frame end timestamp</var>.</li>
+	      </ol>
+            </li>
+            <li>
+              <p>If the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute is <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_metadata">HAVE_METADATA</a></code> and the new <a href="#coded-frame">coded frames</a> cause all objects in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> to have media data for the current playback position, then run the following steps:</p>
+	      <ol>
+	        <li>Set the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_current_data">HAVE_CURRENT_DATA</a></code>.</li>
+	        <li>If this is the first transition to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_current_data">HAVE_CURRENT_DATA</a></code>, 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#event-media-loadeddata">loadeddata</a></code> at the media element.</li>
+	      </ol>
+            </li>
+            <li>
+	      <p>If the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute is <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_current_data">HAVE_CURRENT_DATA</a></code> and the new <a href="#coded-frame">coded frames</a> cause all objects in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> to have media data beyond the current playback position, then run the following steps:</p>
+	      <ol>
+	        <li>Set the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_future_data">HAVE_FUTURE_DATA</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="http://www.w3.org/TR/html5/embedded-content-0.html#event-media-canplay">canplay</a></code> at the media element.</li>
+	      </ol>
+            </li>
+            <li>
+	      <p>If the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute is <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_future_data">HAVE_FUTURE_DATA</a></code> and the new <a href="#coded-frame">coded frames</a> cause all objects in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code> to have <a href="#enough-data">enough data to ensure uninterrupted playback</a>, then run the following steps:</p>
+	      <ol>
+	        <li>Set the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_enough_data">HAVE_ENOUGH_DATA</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="http://www.w3.org/TR/html5/embedded-content-0.html#event-media-canplaythrough">canplaythrough</a></code> at the media element.</li>
+	      </ol>
+            </li>
+            <li>If the <a href="#media-segment">media segment</a> contains data beyond the current <code><a href="#widl-MediaSource-duration">duration</a></code>, then run the <a href="#duration-change-algorithm">duration change algorithm</a> with <var>new duration</var> set to the maximum of the current duration and the highest end timestamp reported by <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-buffered">HTMLMediaElement.buffered</a></code>.</li>
+          </ol>
+        </section>
+
+        <section id="sourcebuffer-coded-frame-removal">
+          <h4><span class="secno">3.5.9 </span>Coded Frame Removal Algorithm</h4>
+          <p>Follow these steps when <a href="#coded-frame">coded frames</a> for a specific time range need to be removed from the SourceBuffer:</p>
+          <ol>
+            <li>Let <var>start</var> be the starting presentation timestamp for the removal range.</li>
+            <li>Let <var>end</var> be the end presentation timestamp for the removal range. </li>
+            <li><p>For each <a href="#track-buffer">track buffer</a> in this source buffer, run the following steps:</p>
+              <ol>
+	        <li>Let <var>remove end timestamp</var> be the current value of <code><a href="#widl-MediaSource-duration">duration</a></code></li>
+                <li>
+                  <p>If this <a href="#track-buffer">track buffer</a> has a <a href="#random-access-point">random access point</a> timestamp that is greater than or equal to
+                    <var>end</var>, then update <var>remove end timestamp</var> to that random access point timestamp.</p>
+	          <div class="note"><div class="note-title"><span>Note</span></div><p class="">Random access point timestamps can be different across tracks because the dependencies between <a href="#coded-frame">coded frames</a> within a
+                    track are usually different than the dependencies in another track.</p></div>
+                </li>
+	        <li>Remove all media data, from this <a href="#track-buffer">track buffer</a>, that contain starting timestamps greater than or equal to
+                  <var>start</var> and less than the <var>remove end timestamp</var>.</li>
+                <li>
+                  <p>If this object is in <code><a href="#widl-MediaSource-activeSourceBuffers">activeSourceBuffers</a></code>, the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#current-playback-position">current playback position</a> is greater than or equal to
+                    <var>start</var> and less than the <var>remove end timestamp</var>, and <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> is greater than
+                    <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_metadata">HAVE_METADATA</a></code>, then set the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-readystate">HTMLMediaElement.readyState</a></code> attribute to <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-have_metadata">HAVE_METADATA</a></code> and stall playback.</p>
+                  <div class="note"><div class="note-title"><span>Note</span></div><p class="">This transition occurs because media data for the current position has been removed. Playback cannot progress until media for the
+                    <a href="http://www.w3.org/TR/html5/embedded-content-0.html#current-playback-position">current playback position</a> is appended or the <a href="#active-source-buffer-changes">selected/enabled tracks change</a>.</p></div>
+                </li>
+	      </ol>
+            </li>
+            <li>If <var><a href="#sourcebuffer-buffer-full-flag">buffer full flag</a></var> equals true and this object is ready to accept more bytes, then set
+              the <var><a href="#sourcebuffer-buffer-full-flag">buffer full flag</a></var> to false.</li>
+          </ol>
+        </section>
+
+        <section id="sourcebuffer-coded-frame-eviction">
+          <h4><span class="secno">3.5.10 </span>Coded Frame Eviction Algorithm</h4>
+          <p>This algorithm is run to free up space in this source buffer when new data is appended.</p>
+          <ol>
+            <li>Let <var>new data</var> equal the data that is about to be appended to this SourceBuffer.</li>
+            <li>If the <var><a href="#sourcebuffer-buffer-full-flag">buffer full flag</a></var> equals false, then abort these steps.</li>
+            <li>Let <var>removal ranges</var> equal a list of presentation time ranges that can be evicted from the presentation to make room for the
+              <var>new data</var>.
+              <div class="note"><div class="note-title"><span>Note</span></div><p class="">Implementations may use different methods for selecting <var>removal ranges</var> so web applications should not depend on a
+                specific behavior. The web application can use the <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> attribute to observe whether portions of the buffered data have been evicted.
+              </p></div>
+            </li>
+            <li>For each range in <var>removal ranges</var>, run the <a href="#sourcebuffer-coded-frame-removal">coded frame removal algorithm</a> with <var>start</var> and <var>end</var> equal to
+              the removal range start and end timestamp respectively.</li>
+          </ol>
+        </section>
+
+        <section id="sourcebuffer-audio-splice-frame-algorithm">
+          <h4><span class="secno">3.5.11 </span>Audio 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 audio
+            <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>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>Update <var>presentation timestamp</var> and <var>decode timestamp</var> to the nearest audio sample timestamp based on sample rate of the 
+              audio in <var>overlapped frame</var>. If a timestamp is equidistant from both audio sample timestamps, then use the higher timestamp. (eg.
+              floor(x * sample_rate + 0.5) / sample_rate).
+              <div class="note"><div class="note-title"><span>Note</span></div><div class="">
+                <p>For example, given the following values:</p>
+                <ul>
+                  <li>The presentation timestamp of <var>overlapped frame</var> equals 10.</li>
+                  <li>The sample rate of <var>overlapped frame</var> equals 8000 Hz</li>
+                  <li><var>presentation timestamp</var> equals 10.01255</li>
+                  <li><var>decode timestamp</var> equals 10.01255</li>
+                </ul>
+                <p><var>presentation timestamp</var> and <var>decode timestamp</var> are updated to 10.0125 since 10.01255 is closer to
+                10 + 100/8000 (10.0125) than 10 + 101/8000 (10.012625)</p>
+              </div></div>
+            </li>
+            <li>If the user agent does not support crossfading then run the following steps:
+              <ol>
+                <li>Remove <var>overlapped frame</var> from <var>track buffer</var>.</li>
+                <li>Add a silence frame to <var>track buffer</var> with the following properties:
+                  <ul>
+                    <li>The presentation time set to the <var>overlapped frame</var> presentation time.</li>
+                    <li>The decode time set to the <var>overlapped frame</var> decode time.</li>
+                    <li>The frame duration set to difference between <var>presentation timestamp</var> and the <var>overlapped frame</var> presentation time.</li>
+                  </ul>
+                  <div class="note"><div class="note-title"><span>Note</span></div><p class="">
+                    Some implementations may apply fades to/from silence to coded frames on either side of the inserted silence to make the transition less
+                    jarring.
+                  </p></div>
+                </li>
+                <li>Return to caller without providing a splice frame.
+                  <div class="note"><div class="note-title"><span>Note</span></div><p class="">
+                    This is intended to allow <var>new coded frame</var> to be added to the <var>track buffer</var> as if
+                    <var>overlapped frame</var> had not been in the <var>track buffer</var> to begin with.
+                  </p></div>
+                </li>
+              </ol>
+            </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>splice end timestamp</var> equal the sum of <var>presentation timestamp</var> and the splice duration of 5 milliseconds.</li>
+            <li>Let <var>fade out coded frames</var> equal <var>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>splice end timestamp</var>.</li>
+            <li>Remove all the frames included in <var>fade out coded frames</var> from <var>track buffer</var>.
+            </li><li>Return a splice frame with the following properties:
+              <ul>
+                <li>The presentation time set to the <var>overlapped frame</var> presentation time.</li>
+                <li>The decode time set to the <var>overlapped frame</var> decode time.</li>
+                <li>The frame duration set to difference between <var>frame end timestamp</var> and the <var>overlapped frame</var> presentation time.</li>
+                <li>The fade out coded frames equals <var>fade-out coded frames</var>.</li>
+                <li>The fade in coded frame equal <var>new coded frame</var>.
+                  <div class="note"><div class="note-title"><span>Note</span></div><p class="">If the <var>new coded frame</var> is less than 5 milliseconds in duration, then coded frames that are appended after the
+                    <var>new coded frame</var> will be needed to properly render the splice.</p></div>
+                </li>
+                <li>The splice timestamp equals <var>presentation timestamp</var>.</li>
+              </ul>
+              <div class="note"><div class="note-title"><span>Note</span></div><p class="">See the <a href="#sourcebuffer-audio-splice-rendering-algorithm">audio splice rendering algorithm</a> for details on how this splice frame is rendered.</p></div>
+            </li>
+          </ol>
+        </section>
+        <section id="sourcebuffer-audio-splice-rendering-algorithm">
+          <h4><span class="secno">3.5.12 </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
+            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>
+            <li>Let <var>fade in coded frames</var> be the <a href="#coded-frame">coded frames</a> that are faded in during the splice.</li>
+            <li>Let <var>presentation timestamp</var> be the presentation timestamp of the first coded frame in <var>fade out coded frames</var>.</li>
+            <li>Let <var>end timestamp</var> be the sum of the presentation timestamp and frame duration in the last frame in <var>fade in coded frames</var>.</li>
+            <li>Let <var>splice timestamp</var> be the presentation timestamp where the splice starts. This corresponds with the presentation timestamp of the first frame in
+              <var>fade in coded frames</var>.</li>
+            <li>Let <var>splice end timestamp</var> equal <var>splice timestamp</var> plus five milliseconds.</li>
+            <li>Let <var>fade out samples</var> be the samples generated by decoding <var>fade out coded frames</var>.</li>
+            <li>Trim <var>fade out samples</var> so that it only contains samples between <var>presentation timestamp</var> and <var>splice end timestamp</var>.</li>
+            <li>Let <var>fade in samples</var> be the samples generated by decoding <var>fade in coded frames</var>.</li>
+            <li>If <var>fade out samples</var> and <var>fade in samples</var> do not have a common sample rate and channel layout, then convert
+              <var>fade out samples</var> and <var>fade in samples</var> to a common sample rate and channel layout.</li>
+            <li>Let <var>output samples</var> be a buffer to hold the output samples.</li>
+            <li>Apply a linear gain fade out with a starting gain of 1 and an ending gain of 0 to the samples between
+              <var>splice timestamp</var> and <var>splice end timestamp</var> in <var>fade out samples</var>.</li>
+            <li>Apply a linear gain fade in with a starting gain of 0 and an ending gain of 1 to the samples between <var>splice timestamp</var> and
+              <var>splice end timestamp</var> in <var>fade in samples</var>.</li>
+            <li>Copy samples between <var>presentation timestamp</var> to <var>splice timestamp</var> from <var>fade out samples</var> into <var>output samples</var>.</li>
+            <li>For each sample between <var>splice timestamp</var> and <var>splice end timestamp</var>, compute the sum of a sample from <var>fade out samples</var> and the
+              corresponding sample in <var>fade in samples</var> and store the result in <var>output samples</var>.</li>
+            <li>Copy samples between <var>splice end timestamp</var> to <var>end timestamp</var> from <var>fade in samples</var> into <var>output samples</var>.</li>
+            <li>Render <var>output samples</var>.</li>
+          </ol>
+          <div class="note"><div class="note-title"><span>Note</span></div><div class="">
+            <p>Here is a graphical representation of this algorithm.</p>
+            <img src="audio_splice.png" alt="Audio splice diagram">
+          </div></div>
+        </section>
+        <section id="sourcebuffer-text-splice-frame-algorithm">
+          <h4><span class="secno">3.5.13 </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>
+
+    <section id="sourcebufferlist">
+      <!--OddPage--><h2><span class="secno">4. </span>SourceBufferList Object</h2>
+      <p>SourceBufferList is a simple container object for <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects. It provides read-only array access and fires events when the list is modified.</p>
+
+      <pre class="idl"><span class="idlInterface" id="idl-def-SourceBufferList">interface <span class="idlInterfaceID">SourceBufferList</span> : <span class="idlSuperclass"><code><a href="http://dom.spec.whatwg.org/#eventtarget" class="idlType">EventTarget</a></code></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-SourceBufferList-length">length</a></span>;</span>
+<span class="idlMethod">    <span class="idlMethType"><a>getter</a></span> <span class="idlMethName"><a href="#widl-SourceBufferList-SourceBuffer-getter-unsigned-long-index">SourceBuffer</a></span> (<span class="idlParam"><span class="idlParamType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unsigned-long" class="idlType">unsigned long</a></code></span> <span class="idlParamName">index</span></span>);</span>
+};</span></pre><section id="attributes-2"><h3><span class="secno">4.1 </span>Attributes</h3><dl class="attributes"><dt id="widl-SourceBufferList-length"><code>length</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>Indicates the number of <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects in the list.</p>
+        </dd></dl></section><section id="methods-2"><h3><span class="secno">4.2 </span>Methods</h3><dl class="methods"><dt id="widl-SourceBufferList-SourceBuffer-getter-unsigned-long-index"><code>SourceBuffer</code></dt><dd>
+          <p>Allows the SourceBuffer objects in the list to be accessed with an array operator (i.e. []).</p>
+
+          
+        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">index</td><td class="prmType"><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-unsigned-long" class="idlType">unsigned long</a></code></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a>getter</a></code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+            <li>If <var>index</var> is greater than or equal to the <code><a href="#widl-SourceBufferList-length">length</a></code> attribute then return undefined and abort these steps.</li>
+            <li>Return the <var>index</var>'th <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> object in the list.</li>
+          </ol></dd></dl></section>
+
+      <section id="sourcebufferlist-events">
+        <h3><span class="secno">4.3 </span>Event Summary</h3>
+        <table class="old-table">
+          <thead>
+            <tr>
+              <th>Event name</th>
+              <th>Interface</th>
+              <th>Dispatched when...</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td><dfn id="dom-evt-addsourcebuffer"><code>addsourcebuffer</code></dfn></td>
+              <td><code>Event</code></td>
+              <td>When a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> is added to the list.</td>
+            </tr>
+            <tr>
+              <td><dfn id="dom-evt-removesourcebuffer"><code>removesourcebuffer</code></dfn></td>
+              <td><code>Event</code></td>
+              <td>When a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> is removed from the list.</td>
+            </tr>
+          </tbody>
+        </table>
+      </section>
+    </section>
+
+    <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 class="idlAttribute">    readonly    attribute <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-double" class="idlType">double</a></code></span>              <span class="idlAttrName"><a href="#widl-VideoPlaybackQuality-totalFrameDelay">totalFrameDelay;</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-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-VideoPlaybackQuality-totalFrameDelay"><code>totalFrameDelay;</code> of type <span class="idlAttrType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-double" class="idlType">double</a></code></span>, readonly   </dt><dd>
+          <p>The sum of all <a href="#displayed-frame-delay">displayed frame delays</a> for all displayed frames. (i.e., Frames included in the <code><a href="#widl-VideoPlaybackQuality-totalVideoFrames">totalVideoFrames</a></code> count, but not in the <code><a href="#widl-VideoPlaybackQuality-droppedVideoFrames">droppedVideoFrames</a></code>
+            count.</p>
+        </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>
+
+    <section id="url">
+      <!--OddPage--><h2><span class="secno">6. </span>URL Object Extensions</h2>
+      <p>This section specifies extensions to the <a href="http://www.w3.org/TR/FileAPI/#URL-object">URL</a>[<cite><a class="bibref" href="#bib-FILE-API">FILE-API</a></cite>] object definition.</p>
+
+      <pre class="idl"><span class="idlInterface" id="idl-def-URL">partial interface <span class="idlInterfaceID">URL</span> {
+<span class="idlMethod">    static <span class="idlMethType"><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></span> <span class="idlMethName"><a href="#widl-URL-createObjectURL-DOMString-MediaSource-mediaSource">createObjectURL</a></span> (<span class="idlParam"><span class="idlParamType"><a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a></span> <span class="idlParamName">mediaSource</span></span>);</span>
+};</span></pre><section id="methods-3"><h3><span class="secno">6.1 </span>Methods</h3><dl class="methods"><dt id="widl-URL-createObjectURL-DOMString-MediaSource-mediaSource"><code>createObjectURL</code>, static</dt><dd>
+          <p>Creates URLs for <a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a> objects.</p>
+
+          
+          <div class="note"><div class="note-title"><span>Note</span></div><p class="">This algorithm is intended to mirror the behavior of the <a href="http://www.w3.org/TR/FileAPI/#dfn-createObjectURL">createObjectURL()</a>[<cite><a class="bibref" href="#bib-FILE-API">FILE-API</a></cite>] method with autoRevoke set to true.</p></div>
+        <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">mediaSource</td><td class="prmType"><code><a href="#idl-def-MediaSource" class="idlType"><code>MediaSource</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><code><a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-DOMString" class="idlType">DOMString</a></code></code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+            <li>If <var>mediaSource</var> is NULL the return null.</li>
+            <li>Return a unique <a href="#mediasource-object-url">MediaSource object URL</a> that can be used to dereference the <var>mediaSource</var> argument, and run the rest of the algorithm asynchronously.</li>
+            <li><a href="http://www.w3.org/TR/html5/webappapis.html#provide-a-stable-state">provide a stable state</a></li>
+            <li>Revoke the <a href="#mediasource-object-url">MediaSource object URL</a> by calling <a href="http://www.w3.org/TR/FileAPI/#dfn-revokeObjectURL">revokeObjectURL()</a> on it.</li>
+          </ol></dd></dl></section>
+    </section>
+
+    <section id="htmlmediaelement-extensions">
+      <!--OddPage--><h2><span class="secno">7. </span>HTMLMediaElement Extensions</h2>
+      <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>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 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="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>
+
+      <p>Each <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlvideoelement">HTMLVideoElement</a></code> will maintain a <dfn id="displayed-frame-delay-sum">displayed frame delay sum</dfn> variable that keeps
+        track of the sum of all <a href="#displayed-frame-delay">displayed frame delays</a>. 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. When a frame is displayed, its <a href="#displayed-frame-delay">displayed frame delay</a> is computed and added
+        to this variable.
+      </p>
+
+      <pre class="idl"><span class="idlInterface" id="idl-def-HTMLVideoElement">partial interface <span class="idlInterfaceID">HTMLVideoElement</span> {
+<span class="idlMethod">    <span class="idlMethType"><a href="#idl-def-VideoPlaybackQuality" class="idlType"><code>VideoPlaybackQuality</code></a></span> <span class="idlMethName"><a href="#widl-HTMLVideoElement-getVideoPlaybackQuality-VideoPlaybackQuality">getVideoPlaybackQuality</a></span> ();</span>
+};</span></pre><section id="methods-4"><h3><span class="secno">8.1 </span>Methods</h3><dl class="methods"><dt id="widl-HTMLVideoElement-getVideoPlaybackQuality-VideoPlaybackQuality"><code>getVideoPlaybackQuality</code></dt><dd>
+          <p>Provides the current the playback quality metrics.</p>
+          
+        <div><em>No parameters.</em></div><div><em>Return type: </em><code><a href="#idl-def-VideoPlaybackQuality" class="idlType"><code>VideoPlaybackQuality</code></a></code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+            <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>Set <var>playbackQuality</var>.<code><a href="#widl-VideoPlaybackQuality-totalFrameDelay">totalFrameDelay</a></code> to the current value of the <var><a href="#displayed-frame-delay-sum">displayed frame delay sum</a></var>.</li>
+            <li>Return <var>playbackQuality</var>.</li>
+          </ol></dd></dl></section>
+    </section>
+
+    <section id="audio-track-extensions">
+      <!--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-4"><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>
+          </p><p>On setting, run the following steps:</p>
+          <ol>
+            <li>If the value being assigned to this attribute does not match one of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-TrackList-getKind-categories">kind categories</a>, then abort these steps.</li>
+            <li>Update this attribute to the new value.</li>
+            <li>If the <code><a href="#widl-AudioTrack-sourceBuffer">sourceBuffer</a></code> attribute on this track is not null, 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
+              <code><a href="#widl-AudioTrack-sourceBuffer">sourceBuffer</a></code>.<code><a href="#widl-SourceBuffer-audioTracks">audioTracks</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onchange">change</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> attribute on the
+              HTMLMediaElement.
+            </li>
+          </ol>
+        </dd><dt id="widl-AudioTrack-language"><code>language</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-language">language</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>
+          </p><p>On setting, run the following steps:</p>
+          <ol>
+            <li>If the value being assigned to this attribute is not an empty string or a BCP 47 language tag[<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>], then abort these steps.</li>
+            <li>Update this attribute to the new value.</li>
+            <li>If the <code><a href="#widl-AudioTrack-sourceBuffer">sourceBuffer</a></code> attribute on this track is not null, 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
+              <code><a href="#widl-AudioTrack-sourceBuffer">sourceBuffer</a></code>.<code><a href="#widl-SourceBuffer-audioTracks">audioTracks</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onchange">change</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> attribute on the
+              HTMLMediaElement.
+            </li>
+          </ol>
+        </dd><dt id="widl-AudioTrack-sourceBuffer"><code>sourceBuffer</code> of type <span class="idlAttrType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></span>, readonly   , nullable</dt><dd>
+          <p>Returns the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> that created this track. Returns null if this track was not created by a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> or the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> has been removed from the <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> attribute of its <a href="#parent-media-source">parent media source</a>.</p>
+        </dd></dl></section>
+    </section>
+
+    <section id="video-track-extensions">
+      <!--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-5"><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>
+          </p><p>On setting, run the following steps:</p>
+          <ol>
+            <li>If the value being assigned to this attribute does not match one of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#dom-TrackList-getKind-categories">kind categories</a>, then abort these steps.</li>
+            <li>Update this attribute to the new value.</li>
+            <li>If the <code><a href="#widl-VideoTrack-sourceBuffer">sourceBuffer</a></code> attribute on this track is not null, 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
+              <code><a href="#widl-VideoTrack-sourceBuffer">sourceBuffer</a></code>.<code><a href="#widl-SourceBuffer-videoTracks">videoTracks</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onchange">change</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
+              HTMLMediaElement.
+            </li>
+          </ol>
+        </dd><dt id="widl-VideoTrack-language"><code>language</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-language">language</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>
+          </p><p>On setting, run the following steps:</p>
+          <ol>
+            <li>If the value being assigned to this attribute is not an empty string or a BCP 47 language tag[<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>], then abort these steps.</li>
+            <li>Update this attribute to the new value.</li>
+            <li>If the <code><a href="#widl-VideoTrack-sourceBuffer">sourceBuffer</a></code> attribute on this track is not null, 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
+              <code><a href="#widl-VideoTrack-sourceBuffer">sourceBuffer</a></code>.<code><a href="#widl-SourceBuffer-videoTracks">videoTracks</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onchange">change</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
+              HTMLMediaElement.
+            </li>
+          </ol>
+        </dd><dt id="widl-VideoTrack-sourceBuffer"><code>sourceBuffer</code> of type <span class="idlAttrType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></span>, readonly   , nullable</dt><dd>
+          <p>Returns the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> that created this track. Returns null if this track was not created by a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> or the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> has been removed from the <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> attribute of its <a href="#parent-media-source">parent media source</a>.</p>
+        </dd></dl></section></section>
+
+    <section id="text-track-extensions">
+      <!--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-6"><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>
+          </p><p>On setting, run the following steps:</p>
+          <ol>
+            <li>If the value being assigned to this attribute does not match one of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#text-track-kind">text track kinds</a>, then abort these steps.</li>
+            <li>Update this attribute to the new value.</li>
+            <li>If the <code><a href="#widl-TextTrack-sourceBuffer">sourceBuffer</a></code> attribute on this track is not null, 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
+              <code><a href="#widl-TextTrack-sourceBuffer">sourceBuffer</a></code>.<code><a href="#widl-SourceBuffer-textTracks">textTracks</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onchange">change</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
+              HTMLMediaElement.
+            </li>
+          </ol>
+        </dd><dt id="widl-TextTrack-language"><code>language</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-language">language</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>
+          </p><p>On setting, run the following steps:</p>
+          <ol>
+            <li>If the value being assigned to this attribute is not an valid <a href="http://www.w3.org/TR/html5/embedded-content-0.html#text-track-language">text track language</a>, 
+              then abort these steps.</li>
+            <li>Update this attribute to the new value.</li>
+            <li>If the <code><a href="#widl-TextTrack-sourceBuffer">sourceBuffer</a></code> attribute on this track is not null, 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
+              <code><a href="#widl-TextTrack-sourceBuffer">sourceBuffer</a></code>.<code><a href="#widl-SourceBuffer-textTracks">textTracks</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="http://www.w3.org/TR/html5/embedded-content-0.html#handler-tracklist-onchange">change</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
+              HTMLMediaElement.
+            </li>
+          </ol>
+        </dd><dt id="widl-TextTrack-sourceBuffer"><code>sourceBuffer</code> of type <span class="idlAttrType"><a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a></span>, readonly   , nullable</dt><dd>
+          <p>Returns the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> that created this track. Returns null if this track was not created by a <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> or the <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> has been removed from the <code><a href="#widl-MediaSource-sourceBuffers">sourceBuffers</a></code> attribute of its <a href="#parent-media-source">parent media source</a>.</p>
+        </dd></dl></section></section>
+
+    <section id="byte-stream-formats">
+      <!--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>
+      <div class="note"><div class="note-title"><span>Note</span></div><p class="">The byte stream format specifications below are not intended to define new storage formats. They simply outline the subset of
+        existing storage format structures that implementations of this specification will accept.</p></div>
+      <div class="note"><div class="note-title"><span>Note</span></div><p class="">Byte stream format parsing and validation is implemented in the <a href="#sourcebuffer-segment-parser-loop">segment parser loop</a> algorithm.</p></div>
+
+      <p>This section provides general requirements for all byte stream formats:</p>
+      <ul>
+        <li>A byte stream format specification must define <a href="#init-segment">initialization segments</a> and <a href="#media-segment">media segments</a>.</li>
+        <li>It must be possible to identify segment boundaries and segment type (initialization or media) by examining the byte stream alone.</li>
+        <li>The user agent must 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> when any of the following conditions are met:
+          <ol>
+            <li>
+              <p>The number and type of tracks are not consistent.</p>
+              <div class="note"><div class="note-title"><span>Note</span></div><p class="">For example, if the first <a href="#init-segment">initialization segment</a> has 2 audio tracks and 1 video track, then all <a href="#init-segment">initialization segments</a> that follow it in the byte stream must describe 2 audio tracks and 1 video track.</p></div>
+            </li>
+            <li><a href="#track-id">Track IDs</a> are not the same across <a href="#init-segment">initialization segments</a>, for segments describing multiple tracks of a single type. (e.g. 2 audio tracks).</li>
+	    <li>
+              <p>Codecs changes across <a href="#init-segment">initialization segments</a>.</p>
+              <div class="note"><div class="note-title"><span>Note</span></div><p class="">For example, a byte stream that starts with an <a href="#init-segment">initialization segment</a> that specifies a single AAC track and later contains an <a href="#init-segment">initialization segment</a> that specifies a single AMR-WB track is not allowed. Support for multiple codecs is handled with multiple <a href="#idl-def-SourceBuffer" class="idlType"><code>SourceBuffer</code></a> objects.</p></div>
+            </li>
+          </ol>
+        </li>
+        <li>The user agent must support the following:
+          <ol>
+            <li><a href="#track-id">Track IDs</a> changing across <a href="#init-segment">initialization segments</a> if the segments describes only one track of each type.</li>
+	    <li>
+              <p>Video frame size changes. The user agent must support seamless playback.</p>
+              <div class="note"><div class="note-title"><span>Note</span></div><p class="">This will cause the &lt;video&gt; display region to change size if the web application does not use CSS or HTML attributes (width/height) to constrain the element size.</p></div>
+            </li>
+	    <li>
+              <p>Audio channel count changes. The user agent may support this seamlessly and could trigger downmixing.</p>
+              <div class="note"><div class="note-title"><span>Note</span></div><p class="">This is a quality of implementation issue because changing the channel count may require reinitializing the audio device, resamplers, and channel mixers which tends to be audible.</p></div>
+            </li>
+          </ol>
+        </li>
+        <li>The following rules apply to all <a href="#media-segment">media segments</a> within a byte stream. A user agent must:
+          <ol>
+            <li>Map all timestamps to the same <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-timeline">media timeline</a>.</li>
+            <li>Support seamless playback of <a href="#media-segment">media segments</a> having a timestamp gap smaller than the audio frame size. User agent must not reflect these gaps in the <code><a href="#widl-SourceBuffer-buffered">buffered</a></code> attribute.
+	      <div class="note"><div class="note-title"><span>Note</span></div><p class="">This is intended to simplify switching between audio streams where the frame boundaries don't always line up across encodings (e.g. Vorbis).</p></div>
+            </li>
+          </ol>
+        </li>
+        <li>The user agent must 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> when any combination of an <a href="#init-segment">initialization segment</a> and any contiguous sequence of <a href="#media-segment">media segments</a> satisfies the
+          following conditions:
+	  <ol>
+            <li>The number and type (audio, video, text, etc.) of all tracks in the <a href="#media-segment">media segments</a> are not identified.</li>
+            <li>The decoding capabilities needed to decode each track (i.e. codec and codec parameters) are not provided.</li>
+            <li>Encryption parameters necessary to decrypt the content (except the encryption key itself) are not provided for all encrypted tracks.</li>
+            <li>All information necessary to decode and render the earliest <a href="#random-access-point">random access point</a> in the sequence of <a href="#media-segment">media segments</a> and all subsequence samples in the sequence
+              (in presentation time) are not provided. This includes in particular,
+	      <ul>
+	        <li>Information that determines the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#concept-video-intrinsic-width">intrinsic width and height</a> of the video (specifically, this requires either the picture or pixel aspect ratio, together with the encoded
+                  resolution).</li>
+	        <li>Information necessary to convert the video decoder output to a format suitable for display</li>
+	      </ul>
+	    </li>
+	    <li>Information necessary to compute the global presentation timestamp of every sample in the sequence of <a href="#media-segment">media segments</a> is not provided.</li>
+	  </ol>
+	  <p>For example, if I1 is associated with M1, M2, M3 then the above must hold for all the combinations I1+M1, I1+M2, I1+M1+M2, I1+M2+M3, etc.</p>
+        </li>
+      </ul>
+      <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">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">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 user agent must 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> if any of the following conditions are not met:</p>
+          <ol>
+	    <li>The <a href="#init-segment">initialization segment</a> must start with an <a href="http://www.webmproject.org/code/specs/container/#ebml-basics">EBML Header</a> element, followed by a <a href="http://www.webmproject.org/code/specs/container/#segment">Segment</a> header.</li>
+	    <li>The size value in the <a href="http://www.webmproject.org/code/specs/container/#segment">Segment</a> header must signal an "unknown size" or contain a value large enough to include the <a href="http://www.webmproject.org/code/specs/container/#segment-information">Segment Information</a> and <a href="http://www.webmproject.org/code/specs/container/#track">Tracks</a> elements that follow.</li>
+	    <li>A <a href="http://www.webmproject.org/code/specs/container/#segment-information">Segment Information</a> element and a <a href="http://www.webmproject.org/code/specs/container/#track">Tracks</a> element must appear, in that order, after the <a href="http://www.webmproject.org/code/specs/container/#segment">Segment</a> header and before any further <a href="http://www.webmproject.org/code/specs/container/#ebml-basics">EBML Header</a> or <a href="http://www.webmproject.org/code/specs/container/#cluster">Cluster</a> elements.
+            </li>
+          </ol>
+          The user agent must accept and ignore any elements other than an <a href="http://www.webmproject.org/code/specs/container/#ebml-basics">EBML Header</a> or a <a href="http://www.webmproject.org/code/specs/container/#cluster">Cluster</a> that occur before, in between, or after the <a href="http://www.webmproject.org/code/specs/container/#segment-information">Segment Information</a> and
+          <a href="http://www.webmproject.org/code/specs/container/#track">Tracks</a> elements.
+        </section>
+
+        <section id="webm-media-segments">
+          <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 user agent uses the following rules when interpreting content in a <a href="http://www.webmproject.org/code/specs/container/#cluster">Cluster</a>:</p>
+          <ol>
+            <li>The TimecodeScale in the <a href="#webm-init-segments">WebM initialization segment</a> most recently appended applies to all timestamps in the <a href="http://www.webmproject.org/code/specs/container/#cluster">Cluster</a></li>
+            <li>The Timecode element in the <a href="http://www.webmproject.org/code/specs/container/#cluster">Cluster</a> contains a presentation timestamp in TimecodeScale units.</li>
+            <li>The Cluster header may contain an "unknown" size value. If it does then the end of the cluster is reached when another <a href="http://www.webmproject.org/code/specs/container/#cluster">Cluster</a> header or an element header that indicates the start
+              of an <a href="#webm-init-segments">WebM initialization segment</a> is encountered.</li>
+          </ol>
+
+          <p>The user agent must 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> if any of the following conditions are not met:</p>
+          <ol>
+            <li>The Timecode element must appear before any Block &amp; SimpleBlock elements in a <a href="http://www.webmproject.org/code/specs/container/#cluster">Cluster</a>.</li>
+            <li>Block &amp; SimpleBlock elements are in time increasing order consistent with the <a href="http://www.webmproject.org/code/specs/container/#webm-guidelines">WebM spec</a>.</li>
+            <li>If the most recent <a href="#webm-init-segments">WebM initialization segment</a> describes multiple tracks, then blocks from all the tracks must be interleaved in time increasing order. At least one block from all audio and video
+              tracks must be present.</li>
+          </ol>
+
+          The user agent must accept and ignore <a href="http://www.webmproject.org/code/specs/container/#cueing-data">Cues</a> or <a href="http://www.webmproject.org/code/specs/container/#chapters">Chapters</a> elements that follow a <a href="http://www.webmproject.org/code/specs/container/#cluster">Cluster</a> element.
+        </section>
+
+        <section id="webm-random-access-points">
+          <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">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">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>).</p>
+
+          <p>The user agent must 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> if any of the following conditions are met:</p>
+          <ol>
+            <li>The tracks in the Movie Header Box contain 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> or <span class="iso-box">stco</span> boxes are not set to zero).</li>
+            <li>A Movie Extends (<span class="iso-box">mvex</span>) box is contained in the Movie Header Box to indicate that Movie Fragments are to be expected.</li>
+          </ol>
+          <p>The user agent must handle Edit Boxes (<span class="iso-box">edts</span>), in <a href="#init-segment">initialization segment</a>, which provide a mapping of composition times for each track to the global presentation time.</p>
+
+	  <p>The user agent must support parameter sets (e.g., PPS/SPS) stored in the sample entry (as defined for avc1/avc2), and should support parameter
+            sets stored inband in the samples themselves (as defined for avc3/avc4).</p>
+            <div class="note"><div class="note-title"><span>Note</span></div><p class="">For maximum content interoperability user agents are strongly advised to support avc3/avc4 if possible.</p></div>
+
+          <p>Valid top-level boxes such as <span class="iso-box">ftyp</span>, <span class="iso-box">styp</span>, and <span class="iso-box">sidx</span> are
+            allowed to appear before the <span class="iso-box">moov</span> box. These boxes must be accepted and ignored by the user agent and are not
+            considered part of the <a href="#init-segment">initialization segment</a> in this specification.</p>
+	</section>
+
+	<section id="iso-media-segments">
+          <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>,
+            <span class="iso-box">moof</span>, and <span class="iso-box">mdat</span> are allowed to appear between the end of an
+            <a href="#init-segment">initialization segment</a> or <a href="#media-segment">media segment</a> and before the beginning of a new <a href="#media-segment">media segment</a>.
+            These boxes must be accepted and ignored by the user agent and are not considered part of the <a href="#media-segment">media segment</a> in this
+            specification.
+          </p>
+
+          <p>The user agent must 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> if any of the following conditions are met:</p>
+          <ol>
+	    <li>The Movie Fragment Box does not contain at least one Track Fragment Box (<span class="iso-box">traf</span>).</li>
+	    <li>The Movie Fragment Box does not use movie-fragment relative addressing or the flag <span class="iso-var">default-base-is-moof</span> is not set.</li>
+	    <li>External data references are being used.</li>
+	    <li>At least one Track Fragment Box does not contain a Track Fragment Decode Time Box (<span class="iso-box">tfdt</span>)</li>
+	    <li>The Media Data Boxes do not contain all the samples referenced by the Track Fragment Run Boxes (<span class="iso-box">trun</span>) of the Movie Fragment Box.</li>
+	    <li>Inband parameter sets are not present in the appropriate samples and parameter sets are not present in the last initialization segment appended.</li>
+          </ol>
+	</section>
+
+	<section id="iso-random-access-points">
+          <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">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">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 user agent must 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> if any of the following conditions are met:</p>
+          <ol>
+            <li>Segments do not contain complete MPEG-2 TS packets.</li>
+            <li>Segments do not contain complete PES packets and sections.</li>
+            <li>Segments contain more than one program.</li>
+            <li>At least one MPEG-2 TS packet has a non-zero transport_error_indicator.</li>
+          </ol>
+        </section>
+        <section id="mpeg2ts-init-segments">
+          <h4><span class="secno">12.3.2 </span>Initialization Segments</h4>
+          <p>An MPEG-2 TS initialization segment consists of a single PAT and a single PMT.</p>
+          <p>The user agent must 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> if any of the following conditions are met:</p>
+          <ol>
+            <li>A PAT is not present in the <a href="#init-segment">initialization segment</a></li>
+            <li>A PMT is not present in the <a href="#init-segment">initialization segment</a></li>
+          </ol>
+          The user agent must accept and ignore other SI, such as CAT, that are invariant for all subsequent media segments.
+        </section>
+
+        <section id="mpeg2ts-media-segments">
+          <h4><span class="secno">12.3.3 </span>Media Segments</h4>
+
+          <p>The user agent must 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> if any of the following conditions are met:</p>
+          <ol>
+            <li>A media segment relies on initialization information in another media segment.</li>
+            <li>At least one PES packet does not have a PTS timestamp.</li>
+            <li>PCR is not present in the Segment prior to the first byte of a TS packet payload containing media data.</li>
+          </ol>
+
+          The user agent will accept and ignore PSI that is identical to the information in the last initialization segment which may appear repeatedly throughout the segment.
+        </section>
+
+        <section id="mpeg2ts-random-access-points">
+          <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">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 
+          created.  This offset must be applied to the timestamps as part of the conversion process from MPEG-2 TS packets
+          into <a href="#coded-frame">coded frames</a> for the <a href="#sourcebuffer-coded-frame-processing">coded frame processing algorithm</a>. This results in the coded frame timestamps 
+          for a packet being computed by the following equations:</p>
+          <pre>Coded Frame Presentation Timestamp = (MPEG-2 TS presentation timestamp) + <var>MPEG2TS_timestampOffset</var>
+Coded Frame Decode Timestamp = (MPEG-2 TS decode timestamp) + <var>MPEG2TS_timestampOffset</var></pre>
+
+          <p><var><a href="#mpeg2ts-timestampOffset">MPEG2TS_timestampOffset</a></var> is updated in the following ways:</p>
+          <ul>
+            <li>Each time a timestamp rollover is detected, 2^33 must be added to <var>MPEG2TS_timestampOffset</var>.</li>
+            <li>When a discontinuity is detected, <var>MPEG2TS_timestampOffset</var> must be adjusted to make the timestamps after the discontinuity appear
+              to come immediately after the timestamps before the discontinuity.</li>
+            <li>When <code><a href="#widl-SourceBuffer-abort-void">abort()</a></code> is called, <var>MPEG2TS_timestampOffset</var> must be set to 0.</li>
+            <li>When <code><a href="#widl-SourceBuffer-timestampOffset">timestampOffset</a></code> is successfully set, <var>MPEG2TS_timestampOffset</var> must be set to 0.</li>
+          </ul>
+        </section>
+      </section>
+    </section>
+
+
+
+    <section id="examples">
+      <!--OddPage--><h2><span class="secno">13. </span>Examples</h2>
+      <p>Example use of the Media Source Extensions</p>
+      <div class="block">
+        <div class="blockContent">
+          <pre class="code">&lt;script&gt;
+  function onSourceOpen(videoTag, e) {
+    var mediaSource = e.target;
+    var sourceBuffer = mediaSource.addSourceBuffer('video/webm; codecs="vorbis,vp8"');
+
+    videoTag.addEventListener('seeking', onSeeking.bind(videoTag, mediaSource));
+    videoTag.addEventListener('progress', onProgress.bind(videoTag, mediaSource));
+
+    var initSegment = GetInitializationSegment();
+
+    if (initSegment == null) {
+      // Error fetching the initialization segment. Signal end of stream with an error.
+      mediaSource.endOfStream("network");
+      return;
+    }
+
+    // Append the initialization segment.
+    var firstAppendHandler = function(e) {
+      var sourceBuffer = e.target;
+      sourceBuffer.removeEventListener('updateend', firstAppendHandler);
+
+      // Append some initial media data.
+      appendNextMediaSegment(mediaSource);
+    };
+    sourceBuffer.addEventListener('updateend', firstAppendHandler);
+    sourceBuffer.appendBuffer(initSegment);
+  }
+
+  function appendNextMediaSegment(mediaSource) {
+    if (mediaSource.readyState == "ended")
+      return;
+
+    // If we have run out of stream data, then signal end of stream.
+    if (!HaveMoreMediaSegments()) {
+      mediaSource.endOfStream();
+      return;
+    }
+
+    // Make sure the previous append is not still pending.
+    if (mediaSource.sourceBuffers[0].updating)
+        return;
+
+    var mediaSegment = GetNextMediaSegment();
+
+    if (!mediaSegment) {
+      // Error fetching the next media segment.
+      mediaSource.endOfStream("network");
+      return;
+    }
+
+    mediaSource.sourceBuffers[0].appendBuffer(mediaSegment);
+  }
+
+  function onSeeking(mediaSource, e) {
+    var video = e.target;
+
+    // Abort current segment append.
+    mediaSource.sourceBuffers[0].abort();
+
+    // Notify the media segment loading code to start fetching data at the
+    // new playback position.
+    SeekToMediaSegmentAt(video.currentTime);
+
+    // Append a media segment from the new playback position.
+    appendNextMediaSegment(mediaSource);
+  }
+
+  function onProgress(mediaSource, e) {
+    appendNextMediaSegment(mediaSource);
+  }
+&lt;/script&gt;
+
+&lt;video id="v" autoplay&gt; &lt;/video&gt;
+
+&lt;script&gt;
+  var video = document.getElementById('v');
+  var mediaSource = new MediaSource();
+  mediaSource.addEventListener('sourceopen', onSourceOpen.bind(this, video));
+  video.src = window.URL.createObjectURL(mediaSource);
+&lt;/script&gt;
+          </pre>
+        </div>
+      </div>
+    </section>
+
+    <section id="acknowledgements">
+      <!--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">15. </span>Revision History</h2>
+      <table class="old-table">
+        <thead>
+          <tr>
+            <th>Version</th>
+            <th>Comment</th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr>
+            <td>26 July 2013</td>
+            <td>
+              <ul>
+                <li>Bug 22136 - Added text for Inband SPS/PPS support.</li>
+                <li>Bug 22776 - Clarified that implementations are only required to support one SourceBuffer configuration at a time.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/2b2d8865de83/media-source/media-source.html">18 July 2013</a></td>
+            <td>
+              <ul>
+                <li>Bug 22117 - Reword byte stream specs in terms of UA behavior.</li>
+                <li>Bug 22148 - Replace VideoPlaybackQuality.playbackJitter with VideoPlaybackQuality.totalFrameDelay.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/b98190a4472c/media-source/media-source.html">02 July 2013</a></td>
+            <td>
+              <ul>
+                <li>Bug 22401 - Fix typo</li>
+                <li>Bug 22134 - Clarify byte stream format enforcement.</li>
+                <li>Bug 22431 - Convert videoPlaybackQuality attribute to getVideoPlaybackQuality() method.</li>
+                <li>Bug 22109 - Renamed 'coded frame sequence' to 'coded frame group' to avoid confusion around multiple 'sequence' concepts.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/63675668846c/media-source/media-source.html">05 June 2013</a></td>
+            <td>
+              <ul>
+                <li>Bug 22139 - Added a note clarifying that byte stream specs aren't defining new storage formats.</li>
+                <li>Bug 22148 - Added playbackJitter metric.</li>
+                <li>Bug 22134 - Added minimal number of SourceBuffers requirements.</li>
+                <li>Bug 22115 - Make algorithm abort text consistent.</li>
+                <li>Bug 22113 - Address typos.</li>
+                <li>Bug 22065 - Fix infinite loop in coded frame processing algorithm.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/1ac9c2205a7b/media-source/media-source.html">01 June 2013</a></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>
+                <li>Bug 21953 - Add NaN handling to appendWindowEnd setter algorithm.</li>
+                <li>Alphabetize definitions section.</li>
+                <li>Changed endOfStream('decode') references to make it clear that JavaScript can't intercept these calls.</li>
+                <li>Fix links for all types in the IDL that are defined in external specifications.</li>
+              </ul>
+            </td>
+          </tr><tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/9ff5e42736b6/media-source/media-source.html">06 May 2013</a></td>
+            <td>
+              <ul>
+                <li>Bug 20901 - Remove AbortMode and add AppendMode.</li>
+                <li>Bug 21911 - Change MediaPlaybackQuality.creationTime to DOMHighResTimeStamp.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/b60bf8077d9c/media-source/media-source.html">02 May 2013</a></td>
+            <td>
+              <ul>
+                <li>Reworked ambiguous text in a variety of places.</li>
+                <li>Added Acknowledgements section.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/ffb76048861e/media-source/media-source.html">30 April 2013</a></td>
+            <td>
+              <ul>
+                <li>Bug 21822 - Fix 'fire ... event ... at the X attribute' text.</li>
+                <li>Bug 21819 &amp; 21328 - Remove 'compressed' from coded frame definition.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr><td><a href="https://dvcs.w3.org/hg/html-media/raw-file/237133bfdd57/media-source/media-source.html">24 April 2013</a></td>
+            <td>
+              <ul>
+                <li>Bug 21796 - Removed issue box from 'Append Error' algorithm.</li>
+                <li>Bug 21703 - Changed appendWindowEnd to 'unrestricted double'.</li>
+                <li>Bug 20760 - Adding MediaPlaybackQuality object.</li>
+                <li>Bug 21536 - Specify the origin of media data appended.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr><td><a href="https://dvcs.w3.org/hg/html-media/raw-file/f7f2b7226543/media-source/media-source.html">08 April 2013</a></td>
+            <td>
+              <ul>
+                <li>Bug 21327 - Crossfade clarifications.</li>
+                <li>Bug 21334 - Clarified seeking behavoir.</li>
+                <li>Bug 21326 - Add a note stating some implementations may choose to add fades to/from silence.</li>
+                <li>Bug 21375 - Clarified decode dependency removal.</li>
+                <li>Bug 21376 - Replace 100ms limit with 2x last frame duration limit.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/rev/1e6898152c5b">26 March 2013</a></td>
+            <td>
+              <ul>
+                <li>Bug 21301 - Change timeline references to "media timeline" links.</li>
+                <li>Bug 19676 - Clarified "fade out coded frames" definition.</li>
+                <li>Bug 21276 - Convert a few append error scenarios to endOfStream('decode') errors.</li>
+                <li>Bug 21376 - Changed 'time' to 'decode time' to append sequence definition.</li>
+                <li>Bug 21374 - Clarify the abort() behavior.</li>
+                <li>Bug 21373 - Clarified incremental parsing text in segment parser loop.</li>
+                <li>Bug 21364 - Remove redundant condition from remove overlapped frame step.</li>
+                <li>Bug 21327 - Clarify what to do with a splice that starts with an audio frame with a duration less than 5ms.</li>
+                <li>Update to ReSpec 3.1.48</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/f0fb58d45f96/media-source/media-source.html">12 March 2013</a></td>
+            <td>
+              <ul>
+                <li>Bug 21112 - Add appendWindowStart &amp; appendWindowEnd attributes.</li>
+                <li>Bug 19676 - Clarify overlapped frame definitions and splice logic.</li>
+                <li>Bug 21172 - Added coded frame removal and eviction algorithms.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/dcd406812201/media-source/media-source.html">05 March 2013</a></td>
+            <td>
+              <ul>
+                <li>Bug 21170 - Remove 'stream aborted' step from stream append loop algorithm.</li>
+                <li>Bug 21171 - Added informative note about when addSourceBuffer() might throw an QUOTA_EXCEEDED_ERR exception.</li>
+                <li>Bug 20901 - Add support for 'continuation' and 'timestampOffset' abort modes.</li>
+                <li>Bug 21159 - Rename appendArrayBuffer to appendBuffer() and add ArrayBufferView overload.</li>
+                <li>Bug 21198 - Remove redundant 'closed' readyState checks.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/668a1c82fb88/media-source/media-source.html">25 February 2013</a></td>
+            <td>
+              <ul>
+                 <li>Remove Source Buffer Model section since all the behavior is covered by the algorithms now.</li>
+                 <li>Bug 20899 - Remove media segments must start with a random access point requirement.</li>
+                 <li>Bug 21065 - Update example code to use updating attribute instead of old appending attribute.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+            <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/d5956e93b991/media-source/media-source.html">19 February 2013</a></td>
+            <td>
+              <ul>
+                 <li>Bug 19676, 20327 - Provide more detail for audio &amp; video splicing.</li>
+                 <li>Bug 20900 - Remove complete access unit constraint.</li>
+                 <li>Bug 20948 - Setting timestampOffset in 'ended' triggers a transition to 'open'</li>
+                 <li>Bug 20952 - Added update event.</li>
+                 <li>Bug 20953 - Move end of append event firing out of segment parser loop.</li>
+                 <li>Bug 21034 - Add steps to fire addtrack and removetrack events.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/77975abeec41/media-source/media-source.html">05 February 2013</a></td>
+            <td>
+              <ul>
+                <li>Bug 19676 - Added a note clarifying that the internal timestamp representation doesn't have to be a double.</li>
+                <li>Added steps to the coded frame processing algorithm to remove old frames when new ones overlap them.</li>
+                <li>Fix isTypeSupported() return type.</li>
+                <li>Bug 18933 - Clarify what top-level boxes to ignore for ISO-BMFF.</li>
+                <li>Bug 18400 - Add a check to avoid creating huge hidden gaps when out-of-order appends occur w/o calling abort().</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/b35722b0cd8f/media-source/media-source.html">31 January 2013</a></td>
+            <td>
+              <ul>
+                <li>Make remove() asynchronous.</li>
+                <li>Added steps to various algorithms to throw an INVALID_STATE_ERR exception when async appends or remove() are pending.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/aae26333e7d1/media-source/media-source.html">30 January 2013</a></td>
+            <td>
+              <ul>
+                <li>Remove early abort step on 0-byte appends so the same events fire as a normal append with bytes.</li>
+                <li>Added definition for 'enough data to ensure uninterrupted playback'.</li>
+                <li>Updated buffered ranges algorithm to properly compute the ranges for Philip's example.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/fd2a58eec443/media-source/media-source.html">15 January 2013</a></td>
+            <td>Replace setTrackInfo() and getSourceBuffer() with AudioTrack, VideoTrack, and TextTrack extensions.</td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/52a85235137b/media-source/media-source.html">04 January 2013</a></td>
+            <td>
+              <ul>
+                <li>Renamed append() to appendArrayBuffer() and made appending asynchronous.</li>
+                <li>Added SourceBuffer.appendStream().</li>
+                <li>Added SourceBuffer.setTrackInfo() methods.</li>
+                <li>Added issue boxes to relevant sections for outstanding bugs.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/53ea7c19edd2/media-source/media-source.html">14 December 2012</a></td>
+            <td>
+              Pubrules, Link Checker, and Markup Validation fixes.
+            </td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/e1c91093dfdc/media-source/media-source.html">13 December 2012</a></td>
+            <td>
+              <ul>
+                <li>Added MPEG-2 Transport Stream section.</li>
+                <li>Added text to require abort() for out-of-order appends.</li>
+                <li>Renamed "track buffer" to "decoder buffer".</li>
+                <li>Redefined "track buffer" to mean the per-track buffers that hold the SourceBuffer media data.</li>
+                <li>Editorial fixes.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/ee6e8ae9337c/media-source/media-source.html">08 December 2012</a></td>
+            <td>
+              <ul>
+                <li>Added MediaSource.getSourceBuffer() methods.</li>
+                <li>Section 2 cleanup.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/43be42e69533/media-source/media-source.html">06 December 2012</a></td>
+            <td>
+              <ul>
+                <li>append() now throws a QUOTA_EXCEEDED_ERR when the SourceBuffer is full.</li>
+                <li>Added unique ID generation text to Initialization Segment Received algorithm.</li>
+                <li>Remove 2.x subsections that are already covered by algorithm text.</li>
+                <li>Rework byte stream format text so it doesn't imply that the MediaSource implementation must support all formats supported by the
+                  HTMLMediaElement.</li>
+              </ul>
+            </td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/0c638da9a67a/media-source/media-source.html">28 November 2012</a></td>
+            <td>
+              <ul>
+                <li>Added transition to HAVE_METADATA when current playback position is removed.</li>
+                <li>Added remove() calls to duration change algorithm.</li>
+                <li>Added MediaSource.isTypeSupported() method.</li>
+                <li>Remove initialization segments are optional text.</li>
+              </ul>
+            </td>
+          </tr>
+	  <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/3e4d27b3a98f/media-source/media-source.html">09 November 2012</a></td>
+            <td>Converted document to ReSpec.</td>
+          </tr>
+	  <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/e029f71aafca/media-source/media-source.html">18 October 2012</a></td>
+            <td>Refactored SourceBuffer.append() &amp; added SourceBuffer.remove().</td>
+          </tr>
+	  <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/6d127e69c9f8/media-source/media-source.html">8 October 2012</a></td>
+            <td>
+	      <ul>
+	        <li>Defined what HTMLMediaElement.seekable and HTMLMediaElement.buffered should return.</li>
+	        <li>Updated seeking algorithm to run inside Step 10 of the HTMLMediaElement seeking algorithm.</li>
+	        <li>Removed transition from "ended" to "open" in the seeking algorithm.</li>
+	        <li>Clarified all the event targets.</li>
+	      </ul>
+	    </td>
+          </tr>
+	  <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/7bab66368f2c/media-source/media-source.html">1 October 2012</a></td>
+            <td>Fixed various addsourcebuffer &amp; removesourcebuffer bugs and allow append() in ended state.</td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/349559debcc3/media-source/media-source.html">13 September 2012</a></td>
+            <td>Updated endOfStream() behavior to change based on the value of HTMLMediaElement.readyState.</td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/ca093bbbbefb/media-source/media-source.html">24 August 2012</a></td>
+            <td>
+	      <ul>
+	        <li>Added early abort on to duration change algorithm.</li>
+	        <li>Added createObjectURL() IDL &amp; algorithm.</li>
+                <li>Added Track ID &amp; Track description definitions.</li>
+                <li>Rewrote start overlap for audio frames text.</li>
+                <li>Removed rendering silence requirement from section 2.5.</li>
+	      </ul>
+	    </td>
+          </tr>
+	  <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/340786fcae83/media-source/media-source.html">22 August 2012</a></td>
+            <td>
+	      <ul>
+	        <li>Clarified WebM byte stream requirements.</li>
+	        <li>Clarified SourceBuffer.buffered return value.</li>
+	        <li>Clarified addsourcebuffer &amp; removesourcebuffer event targets.</li>
+	        <li>Clarified when media source attaches to the HTMLMediaElement.</li>
+	        <li>Introduced duration change algorithm and update relevant algorithms to use it.</li>
+	      </ul>
+	    </td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/032f7b8681d1/media-source/media-source.html">17 August 2012</a></td>
+            <td>Minor editorial fixes.</td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/29687c019735/media-source/media-source.html">09 August 2012</a></td>
+            <td>Change presentation start time to always be 0 instead of using format specific rules about the first media segment appended.</td>
+          </tr>
+	  <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/087ea42f59c8/media-source/media-source.html">30 July 2012</a></td>
+            <td>Added SourceBuffer.timestampOffset and MediaSource.duration.</td>
+          </tr>
+          <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/ab36e8e882c6/media-source/media-source.html">17 July 2012</a></td>
+            <td>Replaced SourceBufferList.remove() with MediaSource.removeSourceBuffer().</td>
+          </tr>
+	  <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/b499a199e427/media-source/media-source.html">02 July 2012</a></td>
+            <td>Converted to the object-oriented API</td>
+          </tr>
+	  <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/9bbfe09653e4/media-source/media-source.html">26 June 2012</a></td>
+            <td>Converted to Editor's draft.</td>
+          </tr>
+	  <tr>
+	    <td><a href="https://dvcs.w3.org/hg/html-media/raw-file/e433598d22a7/media-source/media-source.html">0.5</a></td>
+            <td>Minor updates before proposing to <abbr title="World Wide Web Consortium">W3C</abbr> HTML-WG.</td>
+          </tr>
+          <tr>
+            <td><a href="http://html5-mediasource-api.googlecode.com/svn/tags/0.4/draft-spec/mediasource-draft-spec.html">0.4</a></td>
+            <td>Major revision. Adding source IDs, defining buffer model, and clarifying byte stream formats.</td>
+          </tr>
+	  <tr>
+            <td><a href="http://html5-mediasource-api.googlecode.com/svn/tags/0.3/draft-spec/mediasource-draft-spec.html">0.3</a></td>
+            <td>Minor text updates.</td>
+          </tr>
+          <tr>
+            <td><a href="http://html5-mediasource-api.googlecode.com/svn/tags/0.2/draft-spec/mediasource-draft-spec.html">0.2</a></td>
+            <td>Updates to reflect initial WebKit implementation.</td>
+          </tr>
+          <tr>
+            <td><a href="http://html5-mediasource-api.googlecode.com/svn/tags/0.1/draft-spec/mediasource-draft-spec.html">0.1</a></td>
+            <td>Initial Proposal</td>
+          </tr>
+        </tbody>
+      </table>
+    </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><section id="references" class="appendix"><!--OddPage--><h2><span class="secno">A. </span>References</h2><section id="informative-references"><h3><span class="secno">A.1 </span>Informative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips; M. Davis. <a href="http://tools.ietf.org/html/bcp47"><cite>Tags for Identifying Languages</cite></a>. September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/html/bcp47">http://tools.ietf.org/html/bcp47</a>
+</dd><dt id="bib-FILE-API">[FILE-API]</dt><dd>Arun Ranganathan; Jonas Sicking. <a href="http://www.w3.org/TR/2012/WD-FileAPI-20121025"><cite>File API</cite></a>. 25 October 2012. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2012/WD-FileAPI-20121025">http://www.w3.org/TR/2012/WD-FileAPI-20121025</a>
+</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>
--- a/media-source/media-source-respec.html	Fri Jul 26 08:28:43 2013 -0700
+++ b/media-source/media-source-respec.html	Fri Jul 26 08:57:16 2013 -0700
@@ -96,10 +96,7 @@
       @media screen { code :link, code :visited { color: inherit; } }
 
       /* fix bug entry form styling */
-      body > form {
-      padding: 4px;
-      border: 1px solid red;
-      background-color: white;
+      body > form { padding: 4px; border: 1px solid red; background-color: white; }
     </style>
   </head>
   <body>
--- a/media-source/media-source.html	Fri Jul 26 08:28:43 2013 -0700
+++ b/media-source/media-source.html	Fri Jul 26 08:57:16 2013 -0700
@@ -35,10 +35,7 @@
       @media screen { code :link, code :visited { color: inherit; } }
 
       /* fix bug entry form styling */
-      body > form {
-      padding: 4px;
-      border: 1px solid red;
-      background-color: white;
+      body > form { padding: 4px; border: 1px solid red; background-color: white; }
     </style>
   <style>/*****************************************************************
  * ReSpec 3 CSS