HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/6837

File a bug

SVNBugCommentTime (UTC)
6837Prepare a WebVTT standard. Remove the WebVTT text from the HTML standard; refer to the WebVTT spec instead. Drop PeerConnection (moved to W3C WebRTC WG). Clean up some internal annotations (sorry, this affects a number of topics but is purely editorial). Fix some WebIDL issues flagged by recent updates to the WebIDL checker.2011-11-28 23:04
Index: source
===================================================================
--- source	(revision 6836)
+++ source	(revision 6837)
@@ -14,18 +14,19 @@
  !-->
 <!--START validation-->
 <pre class="idl">
- interface URL { };
- interface Blob { };
- interface File : Blob { };
- interface FileCallback { };
- interface FileList { };
- interface ArrayBuffer { };
- interface HTMLCollection { };
- interface DOMTokenList { };
- interface DOMSettableTokenList { attribute any value; };
+ interface URL { }; // URL API
+ interface Blob { }; // File API
+ interface File : Blob { }; // File API
+ interface FileCallback { }; // File API
+ interface FileList { }; // File API
+ interface ArrayBuffer { }; // WebGL
+ interface Uint8ClampedArray { }; // WebGL
+ interface XMLDocument { }; // DOM Core
+ interface HTMLCollection { }; // DOM Core
+ interface DOMTokenList { }; // DOM Core
+ interface DOMSettableTokenList { attribute any value; }; // DOM Core
 </pre>
-<!--START complete--><!--START epub-->
-<!--START html--><!--START dev-html-->
+<!--START complete--><!--START dev-html-->
 
    <!-- An advisory for those reading this source. -->
 
@@ -53,11 +54,10 @@
         but for now we are living with them. -->
 
 <!--START w3c-html-->
-
   <h2 id="introduction">Introduction</h2>
-
 <!--END w3c-html-->
 
+
 <!--END dev-html-->
   <h3 id="abstract">Where does this specification fit?</h3>
 
@@ -81,55 +81,35 @@
   all) are developed at the WHATWG, in some cases in conjunction with
   the W3C and IETF.</p>
 
+
   <p>The WHATWG work is all published in one specification
 
-<!--END complete--><!--END epub-->
+<!--END complete-->
   (known as "<a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">HTML</a>"),
-<!--END html--><!--END dev-html-->
-<!--START complete--><!--START epub-->
+<!--END dev-html-->
+<!--START complete-->
   (the one you are reading right now),
-<!--START html--><!--START dev-html-->
+<!--START dev-html-->
 
   parts of which are republished in a variety of other forms,
   including an edition optimized for Web developers
 
-<!--END complete--><!--END epub--><!--END html-->
+<!--END complete-->
   (which you are reading right now).
 <!--END dev-html-->
-<!--START complete--><!--START epub--><!--START html-->
+<!--START complete-->
   (known as <a href="http://developers.whatwg.org/">HTML5</a>).
 <!--START dev-html-->
 
-  <!-- and one which focuses mainly on the core HTML language -->
 
-<!--END complete--><!--END epub--><!--END dev-html-->
-  <!-- (which you are reading right now). -->
-<!--END html-->
-<!--START complete--><!--START epub--><!--START dev-html-->
-  <!-- (known as the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">HTML Living Standard</a>). -->
-<!--START html-->
-
-  In addition, two subparts of the specification are republished as
-  separate documents, for ease of reference:
-  <a href="http://www.whatwg.org/specs/web-apps/current-work/webvtt.html">WebVTT</a>
-  and
-  <a href="http://www.whatwg.org/specs/web-apps/current-work/webrtc.html">WebRTC</a>.
-  </p>
-
   <p>The W3C also publishes parts of this specification as separate
   documents. One of these parts is called "HTML5"; it is a subset of
-
-<!--END complete--><!--END epub--><!--END dev-html-->
+<!--END dev-html-->
   this specification (the HTML Living Standard).
-<!--END html-->
-<!--START complete--><!--START epub-->
-  this specification (the HTML Living Standard).
-<!--END complete--><!--END epub-->
+<!--END complete-->
 <!--START dev-html-->
-  the <a
-  href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">HTML
-  Living Standard</a>.
-<!--START html--><!--START complete--><!--START epub-->
+  the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">HTML Living Standard</a>.
+<!--START complete-->
 
   </p>
 
@@ -250,9 +230,7 @@
   specifications and are not currently available anywhere else:</p>
 
   <ul>
-   <li>The <code>PeerConnection</code> API and related video-conferencing features.</li> <!--PEERCONNECTION-->
    <li>New hyperlink features: the <code title="attr-hyperlink-download">download</code> attribute to make download links and the <code title="attr-hyperlink-ping">ping</code> attribute for <span>hyperlink auditing</span>.</li> <!--DOWNLOAD--><!--PING-->
-   <li>The <span>WebVTT</span> format and some <span>text track</span> API features.</li> <!--TTVTT-->
    <li>The <code title="dom-document-cssElementMap">cssElementMap</code> feature for defining <span title="CSS element reference identifier">CSS element reference identifiers</span>.</li> <!--CSSREF-->
    <li>An experimental specification of the legacy <code title="dom-find">window.find()</code> API.</li><!--FIND-->
    <li>Some predefined <a href="#mdvocabs">Microdata vocabularies</a>.</li>
@@ -287,7 +265,8 @@
    <li><a href="http://www.w3.org/TR/SVG/">SVG</a>
    <li><a href="http://www.w3.org/TR/MathML/">MathML</a>
    <li><a href="http://dev.w3.org/2006/webapi/XMLHttpRequest-2/">XMLHttpRequest</a>
-   <li>Parts of <a href="http://www.w3.org/Style/CSS/current-work">CSS</a>.</li>
+   <li>Parts of <a href="http://www.w3.org/Style/CSS/current-work">CSS</a>
+   <li><a href="http://dev.w3.org/html5/webvtt/">WebVTT</a>
   </ul>
 -->
 
@@ -466,7 +445,7 @@
 
   <p>Since then, both groups have been working together.</p>
 
-<!--END complete--><!--END epub--><!--END html--><!--END dev-html--><!--w3c-html--><!--VERSION-->
+<!--END complete--><!--END dev-html--><!--w3c-html--><!--VERSION-->
 
 <!--PUB-N-->  <p>The <a href="http://www.whatwg.org/specs/web-apps/current-work/">HTML
 <!--PUB-N-->  specification</a> published by the WHATWG is not identical to
@@ -487,7 +466,7 @@
 <!--PUB-Y-->  other features were omitted because at the W3C they are published as
 <!--PUB-Y-->  separate specifications.</p>
 
-<!--START complete--><!--START epub--><!--START html--><!--START dev-html--><!--w3c-html--><!--VERSION-->
+<!--START complete--><!--START dev-html--><!--w3c-html--><!--VERSION-->
 
   <p>A separate document has been published by the W3C HTML working
   group to document the differences between the HTML specified in this
@@ -574,10 +553,10 @@
   <code>text/html</code> <span>MIME type</span>, then it will be
   processed as an HTML document by Web browsers.
 
-  <!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--VERSION-->
+  <!--END dev-html--><!--END complete--><!--VERSION-->
   This specification defines version 5 of the HTML syntax, known as
   "HTML5".
-  <!--START html--><!--START dev-html--><!--START complete--><!--START epub--><!--END w3c-html--><!--VERSION-->
+  <!--START dev-html--><!--START complete--><!--END w3c-html--><!--VERSION-->
   This specification defines the latest HTML syntax, known simply as
   "HTML".
   <!--START w3c-html--><!--VERSION-->
@@ -593,10 +572,10 @@
   document labeled as XML from being rendered fully, whereas they
   would be ignored in the HTML syntax.
 
-  <!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--VERSION-->
+  <!--END dev-html--><!--END complete--><!--VERSION-->
   This specification defines version 5 of the XHTML syntax, known as
   "XHTML5".
-  <!--START html--><!--START dev-html--><!--START complete--><!--START epub--><!--END w3c-html--><!--VERSION-->
+  <!--START dev-html--><!--START complete--><!--END w3c-html--><!--VERSION-->
   This specification defines the latest XHTML syntax, known simply as
   "XHTML".
   <!--START w3c-html--><!--VERSION-->
@@ -678,19 +657,19 @@
    interact with and modify content, which are described in this
    section.</dd>
 
-<!--END html--><!--END dev-html--><!--END w3c-html-->
+<!--END dev-html--><!--END w3c-html-->
    <dt><a href="#workers">Web workers</a></dt>
 
    <dd>This specification defines an API for background threads in
    JavaScript.</dd>
-<!--START html--><!--START dev-html--><!--START w3c-html-->
+<!--START dev-html--><!--START w3c-html-->
 
-<!--END html--><!--END dev-html--><!--END w3c-html-->
+<!--END dev-html--><!--END w3c-html-->
    <dt><a href="#webstorage">Web storage</a></dt>
 
    <dd>This specification defines a client-side storage mechanism
    based on name-value pairs.</dd>
-<!--START html--><!--START dev-html--><!--START w3c-html-->
+<!--START dev-html--><!--START w3c-html-->
 
 <!--END w3c-html--><!--POSTMSG-->
    <dt><a href="#comms">The communication APIs</a></dt>
@@ -698,10 +677,10 @@
    <dd>This section describes some mechanisms that applications
    written in HTML can use to communicate with other applications from
    different domains running on the same client.
-<!--END html--><!--END dev-html-->
+<!--END dev-html-->
    It also introduces a server-push event stream mechanism, and a
    two-way full-duplex socket protocol for scripts.
-<!--START html--><!--START dev-html-->
+<!--START dev-html-->
    </dd>
 <!--START w3c-html--><!--POSTMSG-->
 
@@ -1893,7 +1872,7 @@
    style.</p></blockquote></dd>
 
 <!--(the following is not included in the WHATWG spec for quality reasons)-->
-<!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--HPAAIG--><!--FORK-->
+<!--END dev-html--><!--END complete--><!--HPAAIG--><!--FORK-->
    <dt><cite>HTML to Platform Accessibility APIs Implementation Guide</cite> <a href="#refsHPAAIG">[HPAAIG]</a></dt>
 
    <dd><blockquote><p>This is draft documentation mapping HTML
@@ -1902,7 +1881,7 @@
    on deriving the accessible names and descriptions for HTML
    elements. It also provides accessible feature implementation
    examples.</p></blockquote></dd>
-<!--START html--><!--START dev-html--><!--START complete--><!--START epub--><!--HPAAIG--><!--FORK-->
+<!--START dev-html--><!--START complete--><!--HPAAIG--><!--FORK-->
 
   </dl>
 
@@ -2375,9 +2354,9 @@
   implementors)</span>.</p>
 
   <p><dfn>Conforming
-<!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--CONFORMANCE--><!--VERSION-->
+<!--END dev-html--><!--END complete--><!--CONFORMANCE--><!--VERSION-->
   HTML5
-<!--START html--><!--START dev-html--><!--START complete--><!--START epub--><!--CONFORMANCE--><!--VERSION-->
+<!--START dev-html--><!--START complete--><!--CONFORMANCE--><!--VERSION-->
   documents</dfn> are those that comply with all
   the conformance criteria for documents. For readability, some of
   these conformance requirements are phrased as conformance
@@ -2533,11 +2512,11 @@
     "MUST" requirement because it has been proven to be impossible. <a
     href="#refsCOMPUTABLE">[COMPUTABLE]</a>)</p>
 
-    <!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--VERSION-->
+    <!--END dev-html--><!--END complete--><!--VERSION-->
     <p>The term "HTML5 validator" can be used to refer to a
     conformance checker that itself conforms to the applicable
     requirements of this specification.</p>
-    <!--START html--><!--START dev-html--><!--START complete--><!--START epub--><!--END w3c-html--><!--VERSION-->
+    <!--START dev-html--><!--START complete--><!--END w3c-html--><!--VERSION-->
     <p>The term "HTML validator" can be used to refer to a
     conformance checker that itself conforms to the applicable
     requirements of this specification.</p>
@@ -2598,9 +2577,9 @@
 
     <p>Authoring tools and markup generators must generate
     <span>conforming
-<!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--CONFORMANCE--><!--VERSION-->
+<!--END dev-html--><!--END complete--><!--CONFORMANCE--><!--VERSION-->
     HTML5
-<!--START html--><!--START dev-html--><!--START complete--><!--START epub--><!--CONFORMANCE--><!--VERSION-->
+<!--START dev-html--><!--START complete--><!--CONFORMANCE--><!--VERSION-->
     documents</span>. Conformance criteria that apply to authors also
     apply to authoring tools, where appropriate.</p>
 
@@ -2975,6 +2954,32 @@
 
    </dd>
 
+   <dt>WebVTT</dt>
+
+   <dd>
+
+    <p>Implementations may support <dfn>WebVTT</dfn> as a text track
+    format for subtitles, captions, chapter titles, metadata, etc, for
+    media resources. <a href="#refsWEBVTT">[WEBVTT]</a></p>
+
+    <p>The following terms, used in this specification, are defined in
+    the WebVTT specification:</p>
+
+    <ul class="brief">
+     <li><dfn>WebVTT file</dfn>
+     <li><dfn>WebVTT file using cue text</dfn>
+     <li><dfn>WebVTT file using chapter title text</dfn>
+     <li><dfn>WebVTT file using only nested cues</dfn>
+     <li><dfn>WebVTT parser</dfn>
+     <li><dfn>WebVTT cue settings</dfn> and how to <dfn>parse the WebVTT settings</dfn>
+     <li>The <dfn>rules for updating the display of WebVTT text tracks</dfn>
+     <li>The <dfn>WebVTT cue text DOM construction rules</dfn>
+     <li>The <dfn>WebVTT cue text rendering rules</dfn>
+     <li>The <dfn>WebVTT cue text parsing rules</dfn>
+    </ul>
+
+   </dd>
+
    <dt>URIs, IRIs, IDNA</dt>
 
    <dd>
@@ -3080,7 +3085,7 @@
 
    </dd>
 
-<!--END html--><!--END dev-html--><!--END w3c-html-->
+<!--END dev-html--><!--END w3c-html-->
 
    <dt>The WebSocket protocol</dt>
 
@@ -3115,7 +3120,7 @@
 
    </dd>
 
-<!--START html--><!--START dev-html--><!--START w3c-html-->
+<!--START dev-html--><!--START w3c-html-->
 
   </dl>
 
@@ -3317,7 +3322,7 @@
   random junk is just that, junk, and not conforming at all. As far as
   conformance goes, what matters in a particular community is what
   that community <em>agrees</em> is applicable.</p>
-<!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--CONFORMANCE--><!--FORK-->
+<!--END dev-html--><!--END complete--><!--CONFORMANCE--><!--FORK-->
 
 <!-- The following segment replaces the above in the W3C copy due to a
 WG decision. The text is not included in the WHATWG version because
@@ -3376,7 +3381,7 @@
   element is NOT a <a href="#conforming-documents">conforming HTML5
   document</a>, even if the element happens to be syntactically
   correct HTML5.)</p>
-<!--START html--><!--START dev-html--><!--START complete--><!--START epub--><!--CONFORMANCE--><!--FORK-->
+<!--START dev-html--><!--START complete--><!--CONFORMANCE--><!--FORK-->
 
   <hr>
 
@@ -13947,7 +13952,7 @@
 
   <div class="impl">
 
-<!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!-- EDITORIAL: this paragraph is redundant with WAI-ARIA and doesn't really make any sense anyway; see bug 9437 --><!--FORK-->
+<!--END dev-html--><!--END complete--><!-- EDITORIAL: this paragraph is redundant with WAI-ARIA and doesn't really make any sense anyway; see bug 9437 --><!--FORK-->
   <p>The WAI-ARIA specification neither requires or forbids user
   agents from enhancing native presentation and interaction behaviors
   on the basis of WAI- ARIA markup. Even mainstream user agents might
@@ -13956,7 +13961,7 @@
   fields or landmark navigation. User agents are encouraged to
   maximize their usefulness to users, including users without
   disabilities.</p>
-<!--START html--><!--START dev-html--><!--START complete--><!--START epub--><!-- EDITORIAL --><!--FORK-->
+<!--START dev-html--><!--START complete--><!-- EDITORIAL --><!--FORK-->
 
   <p>Conformance checkers are encouraged to phrase errors such that
   authors are encouraged to use more appropriate elements rather than
@@ -14999,10 +15004,10 @@
   used both in the <code>head</code> element and in the
   <code>body</code> of the page, subject to the constraints of the
   microdata model.</p>
-<!--START w3c-html--><!--MD--><!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--MD-->
+<!--START w3c-html--><!--MD--><!--END dev-html--><!--END complete--><!--MD-->
   <p>A <code>link</code> element must have <code
   title="attr-link-rel">rel</code> attribute.</p>
-<!--START html--><!--START dev-html--><!--START complete--><!--START epub--><!--MD-->
+<!--START dev-html--><!--START complete--><!--MD-->
 
   <p>The types of link indicated (the relationships) are given by the
   value of the <dfn title="attr-link-rel"><code>rel</code></dfn>
@@ -15461,7 +15466,7 @@
   title="attr-itemprop">itemprop</code> is specified, then the <code
   title="attr-meta-content">content</code> attribute must also be
   specified. Otherwise, it must be omitted.</p>
-<!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--START w3c-html--><!--MD-->
+<!--END dev-html--><!--END complete--><!--START w3c-html--><!--MD-->
   <p>Exactly one of the <code title="attr-meta-name">name</code>,
   <code title="attr-meta-http-equiv">http-equiv</code>, and <code
   title="attr-meta-charset">charset</code> attributes must be
@@ -15471,7 +15476,7 @@
   title="attr-meta-http-equiv">http-equiv</code> is specified, then
   the <code title="attr-meta-content">content</code> attribute must
   also be specified. Otherwise, it must be omitted.</p>
-<!--START html--><!--START dev-html--><!--START complete--><!--START epub--><!--WD-->
+<!--START dev-html--><!--START complete--><!--WD-->
 
   <p>The <dfn title="attr-meta-charset"><code>charset</code></dfn>
   attribute specifies the character encoding used by the
@@ -22894,7 +22899,7 @@
 
   </div>
 
-<!--END w3c-html-->
+<!--END w3c-html--><!--FORK-->
   <div class="example">
 
    <p>In this example, another article's publication date is marked up
@@ -22908,7 +22913,7 @@
 &lt;/article></pre>
 
   </div>
-<!--START w3c-html-->
+<!--START w3c-html--><!--FORK-->
 
   <div class="example">
 
@@ -25798,14 +25803,14 @@
   scheme &mdash; the image should be specified in the site's CSS, not
   in the markup of the document.</p>
 
-<!--END html--><!--END complete--><!--END epub--><!--END dev-html--><!--FORK-->
+<!--END complete--><!--END dev-html--><!--FORK-->
   <p>Exceptions to this rule, in cases where CSS cannot be used to
   display an entirely decorative image, are covered by the HTML5:
   Techniques for providing useful text alternatives. <a href="#refsHTMLALTTECHS">[HTMLALTTECHS]</a>
   Authors are also encouraged to consult the Web Content Accessibility
   Guidelines 2.0 for more detailed information and acceptable
   techniques. <a href="#refsWCAG">[WCAG]</a></p>
-<!--START html--><!--START complete--><!--START epub--><!--START dev-html--><!--FORK-->
+<!--START complete--><!--START dev-html--><!--FORK-->
 
   <!-- The above paragraph is omitted in the WHATWG copy and replaced
   with the explicit requirement below because accessibility is better
@@ -26842,9 +26847,9 @@
     title="dom-document-cookie">document.cookie</code> IDL
     attribute</a>, and blocks access to <code
     title="dom-localStorage">localStorage</code>.
-    <!--END complete--><!--END epub-->
+    <!--END complete-->
     <a href="#refsWEBSTORAGE">[WEBSTORAGE]</a>
-    <!--START complete--><!--START epub-->
+    <!--START complete-->
     </p>
 
     <div class="note">
@@ -28619,7 +28624,7 @@
   also be used to provide chapter titles. For users who would rather
   not use a media element at all, transcripts or other textual
   alternatives can be provided by simply linking to them in the prose
-  near the <code>video</code> element.</p>
+  near the <code>video</code> element. <a href="#refsWEBVTT">[WEBVTT]</a></p>
 
   <p>The <code>video</code> element is a <span>media element</span>
   whose <span>media data</span> is ostensibly video data, possibly
@@ -29017,7 +29022,7 @@
   be provided to aid navigation, using the <code>track</code> element
   and a WebVTT file. And, naturally, transcripts or other textual
   alternatives can be provided by simply linking to them in the prose
-  near the <code>audio</code> element.</p>
+  near the <code>audio</code> element. <a href="#refsWEBVTT">[WEBVTT]</a></p>
 
   <p>The <code>audio</code> element is a <span>media element</span>
   whose <span>media data</span> is ostensibly audio data.</p>
@@ -29429,13 +29434,12 @@
 
   </div>
 
-<!--END w3c-html--><!--TTVTT-->
   <p>If the element's <span>track URL</span> identifies a
   <span>WebVTT</span> resource, and the element's <code
   title="attr-track-kind">kind</code> attribute is not in the <span
   title="attr-track-kind-metadata">metadata</span> state, then the
   <span>WebVTT</span> file must be a <span>WebVTT file using cue
-  text</span>.</p>
+  text</span>. <a href="#refsWEBVTT">[WEBVTT]</a></p>
 
   <p>Furthermore, if the element's <span>track URL</span> identifies a
   <span>WebVTT</span> resource, and the element's <code
@@ -29443,8 +29447,7 @@
   title="attr-track-kind-chapters">chapters</span> state, then the
   <span>WebVTT</span> file must be both a <span>WebVTT file using
   chapter title text</span> and a <span>WebVTT file using only nested
-  cues</span>.</p>
-<!--START w3c-html--><!--TTVTT-->
+  cues</span>. <a href="#refsWEBVTT">[WEBVTT]</a></p>
 
   <p>The <dfn title="attr-track-srclang"><code>srclang</code></dfn>
   attribute gives the language of the text track data. The value must
@@ -29931,9 +29934,9 @@
   is special-cased here; if any parameter appears with it, it
   <!--END w3c-html--><!--FORK-->
   will <!-- the WG decision that led to this text had a "should", but this is a non-normative section -->
-  <!--START w3c-html--><!--END html--><!--END complete--><!--END epub--><!--END dev-html--><!--FORK-->
+  <!--START w3c-html--><!--END complete--><!--END dev-html--><!--FORK-->
   should
-  <!--START html--><!--START complete--><!--START epub--><!--START dev-html--><!--FORK-->
+  <!--START complete--><!--START dev-html--><!--FORK-->
   be treated just like any other <span>MIME type</span>.
 
   This is a deviation from the rule <!-- in RFC 2046, section 1,
@@ -32712,11 +32715,9 @@
    tracks</span> in <var title="">affected tracks</var> that are <span
    title="text track showing">showing</span> or <span title="text
    track showing by default">showing by default</span>.
-<!--END w3c-html--><!--TTVTT-->
    For example, for <span title="text track">text tracks</span>
    based on <span>WebVTT</span>, the <span>rules for updating the
-   display of WebVTT text tracks</span>.
-<!--START w3c-html--><!--TTVTT-->
+   display of WebVTT text tracks</span>. <a href="#refsWEBVTT">[WEBVTT]</a>
    </p></li>
 
   </ol>
@@ -34604,10 +34605,8 @@
     <p>A list of <span title="text track cue">text track
     cues</span>, along with <dfn>rules for updating the text track
     rendering</dfn>.
-<!--END w3c-html--><!--TTVTT-->
     For example, for <span>WebVTT</span>, the <span>rules for updating
-    the display of WebVTT text tracks</span>.
-<!--START w3c-html--><!--TTVTT-->
+    the display of WebVTT text tracks</span>. <a href="#refsWEBVTT">[WEBVTT]</a>
     </p>
 
     <p>The <span title="text track list of cues">list of cues of a
@@ -34686,7 +34685,6 @@
     consecutive lines displayed to the right of each other<!-- used for
     mongolian -->).</p>
 
-<!--END w3c-html--><!--TTVTT-->
     <p>If the <span title="text track cue writing direction">writing
     direction</span> is <span title="text track cue horizontal
     writing direction">horizontal</span>, then <span title="text
@@ -34701,11 +34699,9 @@
     video, and <span title="text track cue text position">text
     position</span> and <span title="text track cue size">size</span>
     percentages are relative to the height of the video.</p>
-<!--START w3c-html--><!--TTVTT-->
 
    </dd>
 
-<!--END w3c-html--><!--TTVTT-->
    <dt><dfn title="text track cue snap-to-lines flag">A snap-to-lines flag</dfn>
    <dd>
     <p>A boolean indicating whether the <span title="text track cue
@@ -34775,7 +34771,6 @@
     by the <span title="text track cue writing direction">writing
     direction</span>.</p>
    </dd>
-<!--START w3c-html--><!--TTVTT-->
 
    <dt><dfn title="text track cue size">A size</dfn>
    <dd>
@@ -34785,7 +34780,6 @@
     track cue writing direction">writing direction</span>.</p>
    </dd>
 
-<!--END w3c-html--><!--TTVTT-->
    <dt><dfn title="text track cue alignment">An alignment</dfn>
    <dd>
     <p>An alignment for the text of each line of the cue, either <dfn
@@ -34799,7 +34793,6 @@
     title="text track cue writing direction">writing
     direction</span>. <a href="#refsBIDI">[BIDI]</a></p>
    </dd>
-<!--START w3c-html--><!--TTVTT-->
 
    <dt><dfn title="text track cue text">The text of the cue</dfn>
    <dd>
@@ -34847,11 +34840,9 @@
     flag for all the affected cues, apply the <span>rules for updating
     the text track rendering</span> of those <span title="text
     track">text tracks</span>.
-<!--END w3c-html--><!--TTVTT-->
     For example, for <span title="text track">text tracks</span>
     based on <span>WebVTT</span>, the <span>rules for updating the
-    display of WebVTT text tracks</span>.</p>
-<!--START w3c-html--><!--TTVTT-->
+    display of WebVTT text tracks</span>. <a href="#refsWEBVTT">[WEBVTT]</a></p>
    </dd>
 
    <dt>The <dfn title="text track cue display state">display state</dfn>
@@ -34884,7 +34875,7 @@
   with identical <span title="text track cue end time">end
   times</span> must be sorted in the order they were created (so
   e.g. for cues from a <span>WebVTT</span> file, that would be the
-  order in which the cues were listed in the file).</p>
+  order in which the cues were listed in the file). <a href="#refsWEBVTT">[WEBVTT]</a></p>
 
 
   <h6>Sourcing in-band text tracks</h6>
@@ -35026,7 +35017,7 @@
   Associated with the list are the <span>rules for updating the text
   track rendering</span> appropriate for the format in question; for
   <span>WebVTT</span>, this is the <span>rules for updating the
-  display of WebVTT text tracks</span>.</p>
+  display of WebVTT text tracks</span>. <a href="#refsWEBVTT">[WEBVTT]</a></p>
 
   <p>When a <code>track</code> element's parent element changes and
   the new parent is a <span>media element</span>, then the user agent
@@ -35198,7 +35189,7 @@
     to the appropriate parser (e.g. the <span>WebVTT parser</span><!--
     if the file starts with the "<code title="">WEBVTT</code>"
     signature-->) as it is received, with the <span>text track list of
-    cues</span> being used for that parser's output.</p>
+    cues</span> being used for that parser's output. <a href="#refsWEBVTT">[WEBVTT]</a></p>
 
     <p class="critical">This specification does not currently say
     whether or how to check the MIME types of text tracks, or whether
@@ -35331,8 +35322,6 @@
   </div>
 
 
-<!--END w3c-html--><!--TTVTT-->
-<div data-component="other Hixie drafts (editor: Ian Hickson)">
   <div class="impl">
 
   <h6><dfn>Guidelines for exposing cues</dfn> in various formats as
@@ -35395,8 +35384,6 @@
   </dl>
 
   </div>
-</div>
-<!--START w3c-html--><!--TTVTT-->
 
 
   <h6>Text track API</h6>
@@ -35777,11 +35764,10 @@
     <span>text track mode</span> to the <span>text track hidden</span>
     mode, and its <span>text track list of cues</span> to an empty
     list.
-<!--END w3c-html--><!--TTVTT-->
     Associate the <span>text track list of cues</span> with the
     <span>rules for updating the display of WebVTT text tracks</span>
     as its <span>rules for updating the text track rendering</span>.
-<!--START w3c-html--><!--TTVTT-->
+    <a href="#refsWEBVTT">[WEBVTT]</a>
     </p>
 
    </li>
@@ -36087,7 +36073,7 @@
    and let the rules for its interpretation be the <span>WebVTT cue
    text parsing rules</span>, the <span>WebVTT cue text rendering
    rules</span>, and the <span>WebVTT cue text DOM construction
-   rules</span>.</p></li>
+   rules</span>. <a href="#refsWEBVTT">[WEBVTT]</a></p></li>
 
    <!-- default settings -->
 
@@ -36120,7 +36106,7 @@
    string.</p></li>
 
    <li><p><span>Parse the WebVTT settings</span> for <var
-   title="">cue</var>.</p></li>
+   title="">cue</var>. <a href="#refsWEBVTT">[WEBVTT]</a></p></li>
 
    <li><p>Return the <code>TextTrackCue</code> object representing
    <var title="">cue</var>.</p></li>
@@ -36264,11 +36250,9 @@
   <code>DocumentFragment</code> for the <span>media element</span>'s
   <code>Document</code>, using the appropriate rules for doing
   so.
-<!--END w3c-html--><!--TTVTT-->
   For example, for <span>WebVTT</span>, those rules are the
   <span>WebVTT cue text parsing rules</span> and the <span>WebVTT cue
-  text DOM construction rules</span>.
-<!--START w3c-html--><!--TTVTT-->
+  text DOM construction rules</span>. <a href="#refsWEBVTT">[WEBVTT]</a>
   </p>
 
   </div>
@@ -36362,14 +36346,13 @@
 
   </div>
 
-<!--END w3c-html--><!--TTVTT-->
   <div class="example">
 
    <p>The following snippet of a <span>WebVTT file</span> shows how
    nested chapters can be marked up. The file describes three
    50-minute chapters, "Astrophysics", "Computational Physics", and
    "General Relativity". The first has three subchapters, the second
-   has four, and the third has two.</p>
+   has four, and the third has two. <a href="#refsWEBVTT">[WEBVTT]</a></p>
 
    <pre>WEBVTT
 
@@ -36410,7 +36393,6 @@
 The General Relativistic Field Equations</pre>
 
   </div>
-<!--START w3c-html--><!--TTVTT-->
 
 
   <div class="impl">
@@ -36457,14 +36439,12 @@
 
   </div>
 
-<!--END w3c-html--><!--TTVTT-->
-<!--START webvtt-->
+<!--END w3c-html--><!--END complete-->
 <div data-component="other Hixie drafts (editor: Ian Hickson)">
   <h5>WebVTT</h5>
+<!--FIXUP dev-html +4-->
+<!--START webvtt-->
 
-  <p>The <dfn>WebVTT</dfn> format (Web Video Text Tracks) is a
-  format intended for marking up external text track resources.</p>
-
   <!-- v2 feature requests:
 
          Explicitly allow random comments on the line after the
@@ -36493,8 +36473,11 @@
   -->
 
 
-  <h6>Introduction</h6>
+  <h2>Introduction</h2>
 
+  <p>The <dfn>WebVTT</dfn> format (Web Video Text Tracks) is a
+  format intended for marking up external text track resources.</p>
+
   <p>The main use for WebVTT files is captioning video content. Here
   is a sample file that captions an interview:</p>
 
@@ -36540,8 +36523,65 @@
 &lt;v Roger Bingham>You know I'm so excited my glasses are falling off here.</pre>
 
 
-  <h6>Syntax</h6>
+<!--END dev-html-->
+  <h2>Conformance</h2>
 
+  <p class="XXX">This section remains to be written. In the meantime, please see the HTML standard. <a href="#refsHTML">[HTML]</a></p>
+
+  <h3>Dependencies</h3>
+
+  <p>This specification relies upon the following terms defined in the
+  HTML standard. <a href="#refsHTML">[HTML]</a></p>
+
+  <ul class="brief">
+   <li><dfn>MIME type</dfn>
+   <li><dfn>Decoded as UTF-8, with error handling</dfn>
+   <li><dfn>Case-sensitive</dfn>
+   <li><dfn>Collect a sequence of characters</dfn>
+   <li><dfn>Space character</dfn>
+   <li><dfn>Skip whitespace</dfn>
+   <li><dfn>HTML namespace</dfn>
+   <li><dfn>Media element</dfn>
+   <li><dfn>Current playback position</dfn>
+   <li><dfn>Expose a user interface to the user</dfn>
+   <li><dfn>Text track</dfn>
+   <li><dfn>Text track kind</dfn>
+   <li><dfn>Text track mode</dfn>
+   <li><dfn>Text track showing</dfn>
+   <li><dfn>Text track showing by default</dfn>
+   <li><dfn>Text track cue</dfn>
+   <li><dfn>Text track list of cues</dfn>
+   <li><dfn>Text track cue order</dfn>
+   <li><dfn>Text track cue identifier</dfn>
+   <li><dfn>Text track cue start time</dfn>
+   <li><dfn>Text track cue end time</dfn>
+   <li><dfn>Text track cue alignment</dfn>
+   <li><dfn>Text track cue start alignment</dfn>
+   <li><dfn>Text track cue middle alignment</dfn>
+   <li><dfn>Text track cue end alignment</dfn>
+   <li><dfn>Text track cue line position</dfn>
+   <li><dfn>Text track cue automatic line position</dfn>
+   <li><dfn>Text track cue computed line position</dfn>
+   <li><dfn>Text track cue pause-on-exit flag</dfn>
+   <li><dfn>Text track cue size</dfn>
+   <li><dfn>Text track cue snap-to-lines flag</dfn>
+   <li><dfn>Text track cue text position</dfn>
+   <li><dfn>Text track cue writing direction</dfn>
+   <li><dfn>Text track cue horizontal writing direction</dfn>
+   <li><dfn>Text track cue vertical growing right writing direction</dfn>
+   <li><dfn>Text track cue vertical growing left writing direction</dfn>
+   <li><dfn>Text track cue text</dfn>
+   <li><dfn>Text track cue active flag</dfn>
+   <li><dfn>Text track cue display state</dfn>
+   <li><dfn>Rules for updating the text track rendering</dfn>
+  </ul>
+
+  <h2>The WebVTT file format</h2>
+<!--START dev-html-->
+<!--FIXUP dev-html -1-->
+
+  <h3>Syntax</h3>
+
   <p>A <dfn>WebVTT file</dfn> must consist of a <span>WebVTT file
   body</span> encoded as UTF-8 and labeled with the <span>MIME
   type</span> <code>text/vtt</code>. <a href="#refsRFC3629">[RFC3629]</a></p>
@@ -37078,7 +37118,7 @@
 
   <div class="impl">
 
-  <h6>Parsing</h6>
+  <h3>Parsing</h3>
 
   <p>A <dfn>WebVTT parser</dfn>, given an input byte stream and a
   <span>text track list of cues</span> <var title="">output</var>,
@@ -37834,7 +37874,7 @@
   </ol>
 
 
-  <h6><dfn>WebVTT cue text parsing rules</dfn></h6>
+  <h3><dfn>WebVTT cue text parsing rules</dfn></h3>
 
   <p>A <dfn>WebVTT Node Object</dfn> is a conceptual construct used to
   represent components of <span>WebVTT cue text</span> so that its
@@ -38635,7 +38675,7 @@
   </ol>
 
 
-  <h6><dfn>WebVTT cue text DOM construction rules</dfn></h6>
+  <h3><dfn>WebVTT cue text DOM construction rules</dfn></h3>
 
   <p>To convert a <span>List of WebVTT Node Objects</span> to a DOM
   tree for <code>Document</code> <var title="">owner</var>, user
@@ -38701,9 +38741,10 @@
 
   </div>
 
-</div>
+<!--FIXUP dev-html -3-->
 <!--END webvtt-->
-<!--START w3c-html--><!--TTVTT-->
+</div>
+<!--START w3c-html--><!--START complete-->
 
 <!--TOPIC:Video and Audio-->
   <h5>User interface</h5>
@@ -39657,9 +39698,9 @@
   that element. When created, a <code>canvas</code> element must not
   have a <span>primary context</span>.</p>
 
-<!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--2DCONTEXT-->
+<!--END dev-html--><!--END complete--><!--2DCONTEXT-->
   <p>The most commonly used primary context is the <a href="http://dev.w3.org/html5/2dcontext/">HTML Canvas 2D Context</a>.
-<!--START html--><!--START complete--><!--START epub--><!--START dev-html--><!--2DCONTEXT-->
+<!--START complete--><!--START dev-html--><!--2DCONTEXT-->
 
   <p>The <dfn title="dom-canvas-getContext"><code>getContext(<var
   title="">contextId</var>, <var title="">args...</var>)</code></dfn>
@@ -44754,7 +44795,7 @@
 
   -->
 
-<!--END html--><!--END complete--><!--END epub--><!--END dev-html--><!--START w3c-html--><!--FORK-->
+<!--END complete--><!--END dev-html--><!--START w3c-html--><!--FORK-->
 
   <p>Tables should not be used as layout aids.
 
@@ -44772,7 +44813,7 @@
   intent of the author to tools that wish to extract tabular data from
   the document.</p>
 
-<!--START html--><!--START complete--><!--START epub--><!--START dev-html--><!--FORK-->
+<!--START complete--><!--START dev-html--><!--FORK-->
 
   <p class="note">There are a variety of alternatives to using HTML
   tables for layout, primarily using CSS positioning and the CSS table
@@ -66298,7 +66339,7 @@
 
   <h3>Encoding microdata</h3>
 
-<!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--MD-->
+<!--END dev-html--><!--END complete--><!--MD-->
 
   <p>The following attributes are added as <span>global
   attributes</span> to <span>HTML elements</span>:</p>
@@ -66311,7 +66352,7 @@
    <li><code title="attr-itemtype">itemtype</code></li>
   </ul>
 
-<!--START html--><!--START dev-html--><!--START complete--><!--START epub--><!--MD-->
+<!--START dev-html--><!--START complete--><!--MD-->
 
 
   <h4>The microdata model</h4>
@@ -66974,7 +67015,7 @@
 
   <h3>Microdata DOM API</h3>
 
-<!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--MD-->
+<!--END dev-html--><!--END complete--><!--MD-->
   <pre class="idl">partial interface <span>Document</span> { <!--WARNING: ALSO DUPLICATED IN Document SECTION-->
   NodeList <span title="dom-document-getItems">getItems</span>(optional DOMString typeNames); // <span>microdata</span>
 };
@@ -66989,7 +67030,7 @@
   readonly attribute <span>HTMLPropertiesCollection</span> <span title="dom-properties">properties</span>;
            attribute any <span title="dom-itemValue">itemValue</span>;
 };</pre>
-<!--START complete--><!--START epub--><!--START html--><!--START dev-html--><!--MD-->
+<!--START complete--><!--START dev-html--><!--MD-->
 
   <dl class="domintro">
 
@@ -67190,7 +67231,7 @@
 
 
 
-<!--END complete--><!--END epub--><!--END html--><!--END dev-html--><!--MD-->
+<!--END complete--><!--END dev-html--><!--MD-->
 <!--YYY-->
   <h3>Other changes to HTML5</h3>
 
@@ -67237,7 +67278,7 @@
   </div>
 
 <!--END microdata-->
-<!--START complete--><!--START epub--><!--START html--><!--START dev-html--><!--MD-->
+<!--START complete--><!--START dev-html--><!--MD-->
 
   <h3 id="mdvocabs">Microdata vocabularies</h3>
 
@@ -72188,13 +72229,13 @@
 
   <h4>The <code>WindowProxy</code> object</h4>
 
-<!--END complete--><!--END epub--><!--END html--><!--END dev-html--><!--END w3c-html-->
+<!--END complete--><!--END dev-html--><!--END w3c-html-->
 <!-- this is for the purposes of the IDL validator -->
 <pre class="idl">
 [NoInterfaceObject]
 interface <dfn>WindowProxy</dfn>: <span>Window</span> {};
 </pre>
-<!--START complete--><!--START epub--><!--START html--><!--START dev-html--><!--START w3c-html-->
+<!--START complete--><!--START dev-html--><!--START w3c-html-->
 
   <p>As mentioned earlier, each <span>browsing context</span> has a
   <dfn><code>WindowProxy</code></dfn> object. This object is unusual
@@ -75393,9 +75434,9 @@
     title="dom-WebSocket">WebSocket()</code> constructor whose global
     object is the <code>Document</code>'s <code>Window</code> object.
 
-<!--END complete--><!--END epub-->
+<!--END complete-->
     <a href="#refsWEBSOCKET">[WEBSOCKET]</a>
-<!--START complete--><!--START epub-->
+<!--START complete-->
 
     </p>
 
@@ -75406,19 +75447,6 @@
 
    </li>
 
-   <li>
-
-    <p>If the <code>Document</code>'s <code>Window</code> object <span
-    title="concept-PeerConnection-owner">owns</span> any
-    <code>PeerConnection</code> objects whose
-    <span><code>PeerConnection</code> readiness state</span> is not
-    <code title="dom-PeerConnection-CLOSED">CLOSED</code>, then set
-    <code>Document</code>'s <var
-    title="concept-document-salvageable">salvageable</var> state to
-    false.</p>
-
-   </li>
-
    <li><p>If the <code>Document</code>'s <var
    title="concept-document-salvageable">salvageable</var> state is
    false, <span title="concept-EventSource-forcibly-close">forcibly
@@ -75874,9 +75902,9 @@
   <code>SharedWorkerGlobalScope</code> object. A <span>cache
   host</span> can be associated with an <span>application
   cache</span>.
-  <!--END complete--><!--END epub-->
+  <!--END complete-->
   <a href="#refsWEBWORKERS">[WEBWORKERS]</a>
-  <!--START complete--><!--START epub-->
+  <!--START complete-->
   </p>
 
   <p>A <code>Document</code> initially is not associated with an
@@ -75888,9 +75916,9 @@
 
   <p>A <code>SharedWorkerGlobalScope</code> can be associated with an
   <span>application cache</span> when it is created.
-  <!--END complete--><!--END epub-->
+  <!--END complete-->
   <a href="#refsWEBWORKERS">[WEBWORKERS]</a>
-  <!--START complete--><!--START epub-->
+  <!--START complete-->
   </p>
 
   <p>Each <span>cache host</span> has an associated
@@ -77773,9 +77801,9 @@
    <dd>
 
     <p>(In a shared worker.) Returns the <code>ApplicationCache</code> object that applies to the current shared worker.
-    <!--END complete--><!--END epub-->
+    <!--END complete-->
     <a href="#refsWEBWORKERS">[WEBWORKERS]</a>
-    <!--START complete--><!--START epub-->
+    <!--START complete-->
     </p>
 
    </dd>
@@ -77858,9 +77886,9 @@
   attribute on <code>SharedWorkerGlobalScope</code> objects must
   return the <code>ApplicationCache</code> object associated with the
   worker.
-  <!--END complete--><!--END epub-->
+  <!--END complete-->
   <a href="#refsWEBWORKERS">[WEBWORKERS]</a>
-  <!--START complete--><!--START epub-->
+  <!--START complete-->
   </p>
 
   <p class="note">A <code>Window</code> or
@@ -78648,11 +78676,11 @@
   context</span> always has an <span>event loop</span> coordinating
   its activities.</p>
 
-  <!--END complete--><!--END epub-->
+  <!--END complete-->
   <p class="note">Other specifications can define new kinds of event
   loops that aren't associated with browsing contexts; in particular,
   the Web Workers specification does so.</p>
-  <!--START complete--><!--START epub-->
+  <!--START complete-->
 
   <p>An <span>event loop</span> has one or more <dfn title="task
   queue">task queues</dfn>. A <span>task queue</span> is an ordered
@@ -80134,9 +80162,9 @@
   <p class="note">The <code>WindowTimers</code> interface adds to the
   <code>Window</code> interface and the <code>WorkerUtils</code>
   interface (part of Web Workers).
-  <!--END complete--><!--END epub-->
+  <!--END complete-->
   <a href="#refsWEBWORKERS">[WEBWORKERS]</a>
-  <!--START complete--><!--START epub-->
+  <!--START complete-->
   </p>
 
   <p>Each object that implements the <code>WindowTimers</code>
@@ -81737,9 +81765,9 @@
     <code title="dom-localStorage">localStorage</code> API, the
     browser will block other scripts from accessing cookies or storage
     until the first script finishes.
-    <!--END complete--><!--END epub-->
+    <!--END complete-->
     <a href="#refsWEBSTORAGE">[WEBSTORAGE]</a>
-    <!--START complete--><!--START epub-->
+    <!--START complete-->
     </p>
 
     <p>Calling the <code
@@ -81750,9 +81778,9 @@
     <p>Values of cookies and items in the <code>Storage</code> objects
     of <code title="dom-localStorage">localStorage</code> attributes
     can change after calling this method, whence its name.
-    <!--END complete--><!--END epub-->
+    <!--END complete-->
     <a href="#refsWEBSTORAGE">[WEBSTORAGE]</a>
-    <!--START complete--><!--START epub-->
+    <!--START complete-->
     </p>
 
    </dd>
@@ -84919,12 +84947,12 @@
 
    </li>
 
-<!--END complete--><!--END epub--><!--END html--><!--END dev-html--><!--START w3c-html--><!--MD-->
+<!--END complete--><!--END dev-html--><!--START w3c-html--><!--MD-->
 
    <li>Perform <dfn>drag-and-drop initialization steps</dfn> defined
    in any <span>other applicable specifications</span>.</li>
 
-<!--START complete--><!--START epub--><!--START html--><!--START dev-html--><!--MD-->
+<!--START complete--><!--START dev-html--><!--MD-->
 
    <li>
 
@@ -86187,2713 +86215,11 @@
   <p class="XXX"><dfn title="dom-find">window.find()</dfn> goes here</p>
 
 <!--START w3c-html--><!--FIND-->
-<!--TOPIC:HTML-->
 
+<!--END dev-html--><!--END w3c-html-->
 
 
-<!--START rtc--><!--END w3c-html--><!--PEERCONNECTION-->
-<div data-component="other Hixie drafts (editor: Ian Hickson)">
 
-  <h2>Video conferencing and peer-to-peer communication</h2>
-
-  <h3>Introduction</h3>
-
-  <!--END dev-html--><p><i>This section is non-normative.</i></p><!--START dev-html-->
-
-  <p>There are a number of facets to video-conferencing in HTML:</p>
-
-  <ul>
-
-   <li>Getting a multimedia stream (video, audio, or both) from local
-   devices (video cameras, microphones, Web cams) or from prerecorded
-   files provided by the user.</li>
-
-   <li>Recording such streams locally.</li>
-
-   <li>Connecting to remote peers using NAT-traversal technologies
-   such as ICE, STUN, and TURN.</li>
-
-   <li>Sending the locally-produced streams to remote peers and
-   receiving streams from remote peers.</li>
-
-   <li>Displaying such streams (both the locally-produced ones and the
-   remotely-obtained ones) locally using the <code>video</code> or
-   <code>audio</code> elements.</li>
-
-   <li>Sending arbitrary data to remote peers.</li>
-
-  </ul>
-
-  <p>This section defines the APIs used for these features.</p>
-
-
-  <h3>Obtaining local multimedia content</h3>
-
-  <pre class="idl">[NoInterfaceObject]
-interface <dfn>NavigatorUserMedia</dfn> {
-  void <span title="dom-navigator-getUserMedia">getUserMedia</span>(DOMString options, <span>NavigatorUserMediaSuccessCallback</span>? successCallback, optional <span>NavigatorUserMediaErrorCallback</span>? errorCallback);
-};
-<span>Navigator</span> implements <span>NavigatorUserMedia</span>;
-
-[Callback, NoInterfaceObject]
-interface <dfn>NavigatorUserMediaSuccessCallback</dfn> {
-  void <span title="dom-NavigatorUserMediaSuccessCallback-handleEvent">handleEvent</span>(<span>LocalMediaStream</span> stream);
-};
-
-[NoInterfaceObject]<!-- this is based on PositionError in geolocation -->
-interface <dfn>NavigatorUserMediaError</dfn> {
-  const unsigned short <span title="dom-NavigatorUserMediaError-PERMISSION_DENIED">PERMISSION_DENIED</span> = 1;<!--
-  const unsigned short <span title="dom-NavigatorUserMediaError-UNAVAILABLE">UNAVAILABLE</span> = 2;
-  const unsigned short <span title="dom-NavigatorUserMediaError-TIMEOUT">TIMEOUT</span> = 3;-->
-  readonly attribute unsigned short <span title="dom-NavigatorUserMediaError-code">code</span>;<!--
-  readonly attribute DOMString <span title="dom-NavigatorUserMediaError-message">message</span>;-->
-};
-
-[Callback, NoInterfaceObject]
-interface <dfn>NavigatorUserMediaErrorCallback</dfn> {
-  void <span title="dom-NavigatorUserMediaSuccessCallback-handleEvent">handleEvent</span>(<span>NavigatorUserMediaError</span> error);
-};</pre>
-
-  <dl class="domintro">
-
-   <dt><var title="">window</var> . <code title="dom-navigator">navigator</code> . <code title="dom-navigator-getUserMedia">getUserMedia</code>(<var title="">options</var>, <var title="">successCallback</var> [, <var title="">errorCallback</var> ] )</dt>
-
-   <dd>
-
-    <p>Prompts the user for permission to use their Web cam or other
-    video or audio input.</p>
-
-    <p>The <var title="">options</var> argument is a string of
-    comma-separated values, each of which is itself a space-separated
-    list of tokens, the first token of which is from the following
-    list:</p>
-
-    <dl>
-
-
-     <dt>"<code title="">audio</code>"</dt>
-
-     <dd>The provided media needs to include audio data.</dd>
-
-
-     <dt>"<code title="">video</code>"</dt>
-
-     <dd>The provided media needs to include video data. The token can
-     be followed by the tokens "<code title="">user</code>" or "<code
-     title="">environment</code>" to indicate the preferred cameras to
-     use.</dd>
-
-
-    </dl>
-
-    <p>If the user accepts, the <var title="">successCallback</var> is
-    invoked, with a suitable <code>LocalMediaStream</code> object as
-    its argument.</p>
-
-    <p>If the user declines, the <var title="">errorCallback</var> (if
-    any) is invoked.</p>
-
-   </dd>
-
-
-   <dt><var title="">error</var> . <code title="dom-NavigatorUserMediaError-code">code</code></dt>
-
-   <dd>
-
-    <p>Returns the current error's error code. At this time, this will
-    always be 1, for which the constant <code
-    title="dom-NavigatorUserMediaError-PERMISSION_DENIED">PERMISSION_DENIED</code>
-    is defined.</p>
-
-   </dd>
-
-  </dl>
-
-  <div class="impl">
-
-  <p>When the <dfn
-  title="dom-navigator-getUserMedia"><code>getUserMedia()</code></dfn>
-  method is called, the user agent must run the following steps:</p>
-
-  <ol>
-
-   <li><p>Let <var title="">options</var> be the method's first
-   argument.</p></li>
-
-   <li><p>Let <var title="">successCallback</var> be the callback
-   indicated by the method's second argument.</p></li>
-
-   <li><p>Let <var title="">errorCallback</var> be the callback
-   indicated by the method's third argument, if any, or null
-   otherwise.</p></li>
-
-   <li><p>If <var title="">successCallback</var> is null, abort these
-   steps.</p></li> <!-- we could throw an exception instead (that's
-   why the method doesn't return until later: so that we can add an
-   exception here, or for /options/ below, without changing the
-   algorithm) -->
-
-   <li><p>Let <var title="">audio</var> be false.</p></li>
-
-   <li><p>Let <var title="">video</var> be false.</p></li>
-
-   <li><p>Let <var title="">camera preference</var> be the empty
-   set.</p></li>
-
-   <li><p><span title="split a string on commas">Split <var
-   title="">options</var> on commas</span> to obtain <var
-   title="">list of options</var>.</p></li>
-
-   <li>
-
-    <p>For each string <var title="">option</var> in <var
-    title="">list of options</var>, run the following substeps:</p>
-
-    <ol>
-
-     <li><p><span title="split a string on spaces">Split <var
-     title="">option</var> on spaces</span> to obtain <var
-     title="">list of suboptions</var>.</p></li>
-
-     <li><p>If the first token in <var title="">list of
-     suboptions</var> is a <span>case-sensitive</span> match for the
-     string "<code title="">audio</code>", let <var
-     title="">audio</var> be true.</p></li>
-
-     <li><p>If the first token in <var title="">list of
-     suboptions</var> is a <span>case-sensitive</span> match for the
-     string "<code title="">video</code>", run these subsubsteps:</p>
-
-      <ol>
-
-       <li><p>Let <var title="">video</var> be true.</li>
-
-       <li><p>If <var title="">list of suboptions</var> contains a
-       token that is a <span>case-sensitive</span> match for the
-       string "<code title="">user</code>", add any cameras that face
-       towards the user to the <var title="">camera preference</var>
-       set.</p></li>
-
-       <li><p>If <var title="">list of suboptions</var> contains a
-       token that is a <span>case-sensitive</span> match for the
-       string "<code title="">environment</code>", add any cameras
-       that face away from the user to the <var title="">camera
-       preference</var> set.</p></li>
-
-      </ol>
-
-     </li>
-
-    </ol>
-
-   </li>
-
-   <!-- any error handling for /options/ should be done here (that's
-   why the method doesn't return until the next step: so we can add
-   exception throwing here) -->
-
-   <li><p>If both <var title="">audio</var> and <var title="">video</var>
-   are still false, then throw a <code>NotSupportedError</code>
-   exception and abort these steps.</p></li>
-
-   <li><p>Return, and run the remaining steps asynchronously.</p></li>
-
-   <li><p>Optionally, e.g. based on a previously-established user
-   preference, for security reasons, or due to platform limitations,
-   jump to the step labeled <i>failure</i> below.</p></li>
-
-   <li>
-
-    <p>Prompt the user in a user-agent-specific manner for permission
-    to provide the <span>entry script</span>'s <span>origin</span>
-    with a <code>LocalMediaStream</code> object representing a media
-    stream.</p>
-
-    <p>If <var title="">audio</var> is true, then the provided media
-    should include an audio track. If <var title="">audio</var>
-    is false, then the provided media must not include an audio
-    track.</p>
-
-    <p>If <var title="">video</var> is true, then the provided media
-    should include a video track. If <var title="">video</var> is
-    false, then the provided media must not include a video
-    track.</p>
-
-    <p>User agents are encouraged to default to using the user's
-    primary or system default camera and/or microphone (as
-    appropriate) to generate the media stream. User agents may allow
-    users to use any media source, including pre-recorded media
-    files.</p>
-
-    <p>If <var title="">video</var> is true, then the user agent
-    should encourage the user to provide a camera from the <var
-    title="">camera preference</var> set.</p>
-
-    <p>User agents may wish to offer the user more control over the
-    provided media. For example, a user agent could offer to enable a
-    camera light or flash, or to change settings such as the frame
-    rate or shutter speed.</p>
-
-    <p>If the user grants permission to use local recording devices,
-    user agents are encouraged to include a prominent indicator that
-    the devices are "hot" (i.e. an "on-air" or "recording"
-    indicator).</p>
-
-    <p>If the user denies permission, jump to the step labeled
-    <i>failure</i> below. If the user never responds, this algorithm
-    stalls on this step.</p>
-
-   </li>
-
-   <li><p>Let <var title="">stream</var> be the
-   <code>LocalMediaStream</code> object for which the user granted
-   permission.</p></li>
-
-   <li><p><span>Queue a task</span> to invoke <var
-   title="">successCallback</var> with <var title="">stream</var> as
-   its argument.</p></li>
-
-   <li><p>Abort these steps.</p></li>
-
-   <li><p><i>Failure</i>: If <var title="">errorCallback</var> is
-   null, abort these steps.</p></li>
-
-   <li><p>Let <var title="">error</var> be a new
-   <code>NavigatorUserMediaError</code> object whose <code
-   title="dom-NavigatorUserMediaError-code">code</code> attribute has
-   the numeric value 1 (<code
-   title="dom-NavigatorUserMediaError-PERMISSION_DENIED">PERMISSION_DENIED</code>).</p></li>
-
-   <li><p><span>Queue a task</span> to invoke <var
-   title="">errorCallback</var> with <var title="">error</var> as its
-   argument.</p></li>
-
-  </ol>
-
-  <p>The <span>task source</span> for these <span
-  title="concept-task">tasks</span> is the <span>user interaction task
-  source</span>.</p>
-
-  <hr>
-
-  <p>The <dfn title="dom-NavigatorUserMediaError-code"><code>code</code></dfn>
-  attribute of a <code>NavigatorUserMediaError</code> object must return the code
-  for the error, which must be <!--one of--> the following:</p>
-
-  <dl>
-
-   <dt><dfn title="dom-NavigatorUserMediaError-PERMISSION_DENIED"><code>PERMISSION_DENIED</code></dfn> (numeric value 1)</dt>
-
-   <dd>The user denied the page permission to use the user's media devices.</dd>
-
-  </dl>
-
-  </div>
-
-  <div class="example">
-
-   <p>A voice chat feature in a game could attempt to get access to
-   the user's microphone by calling the API as follows:</p>
-
-   <pre>&lt;script>
- navigator.getUserMedia('audio', gotAudio);
- function gotAudio(stream) {
-   // ... use 'stream' ...
- }
-&lt;/script></pre>
-
-  </div>
-
-  <div class="example">
-
-   <p>A video-conferencing system would ask for both audio and video:</p>
-
-   <pre>&lt;script>
- function beginCall() {
-   navigator.getUserMedia('audio,video user', gotStream);
- }
- function gotStream(stream) {
-   // ... use 'stream' ...
- }
-&lt;/script></pre>
-
-  </div>
-
-
-
-  <h3>Stream API</h3>
-
-  <h4>Introduction</h4>
-
-  <p>The <code>MediaStream</code> interface is used to represent
-  streams of media data, typically (but not necessarily) of audio
-  and/or video content, e.g. from a local camera or a remote site. The
-  data from a <code>MediaStream</code> object does not necessarily
-  have a canonical binary form; for example, it could just be "the
-  video currently coming from the user's video camera". This allows
-  user agents to manipulate media streams in whatever fashion is most
-  suitable on the user's platform.</p>
-
-  <p>Each <code>MediaStream</code> object can represent zero or more
-  tracks, in particular audio and video tracks. Tracks can contain
-  multiple channels of parallel data; for example a single audio track
-  could have nine channels of audio data to represent a 7.2 surround
-  sound audio track.</p>
-
-  <p>Each track represented by a <code>MediaStream</code> object has a
-  corresponding <code>MediaStreamTrack</code> object.</p>
-
-  <p>A <code>MediaStream</code> object has an input and an output. The
-  input depends on how the object was created: a
-  <code>LocalMediaStream</code> object generated by a <code
-  title="dom-navigator-getUserMedia">getUserMedia()</code> call, for
-  instance, might take its input from the user's local camera, while a
-  <code>MediaStream</code> created by a <code>PeerConnection</code>
-  object will take as input the data received from a remote peer. The
-  output of the object controls how the object is used, e.g. what is
-  saved if the object is written to a file, what is displayed if the
-  object is used in a <code>video</code> element, or indeed what is
-  transmitted to a remote peer if the object is used with a
-  <code>PeerConnection</code> object.</p>
-
-  <p>Each track in a <code>MediaStream</code> object can be disabled,
-  meaning that it is muted in the object's output. All tracks are
-  initially enabled.</p>
-
-  <p id="finishedMute">A <code>MediaStream</code> can be <span
-  title="concept-stream-finished">finished</span>, indicating that its
-  inputs have forever stopped providing data. When a
-  <code>MediaStream</code> object is finished, all its tracks are
-  muted regardless of whether they are enabled or disabled.</p>
-
-  <p>The output of a <code>MediaStream</code> object must correspond
-  to the tracks in its input. Muted audio tracks must be replaced with
-  silence. Muted video tracks must be replaced with blackness.</p>
-
-  <p>A <code>MediaStream</code> object's output can be "forked" by
-  creating a new <code>MediaStream</code> object from it using the
-  <code title="dom-MediaStream">MediaStream()</code> constructor. The
-  new <code>MediaStream</code> object's input is the output of the
-  object from which it was created, with any disabled tracks removed,
-  and its output is therefore at most a subset of that "parent"
-  object. (Merely muted tracks are not removed, so the tracks do not
-  change when the parent is finished.) When such a fork's parent
-  finishes, the fork is also said to have finished.</p>
-
-  <p><img src="images/media-stream-1.png" alt=""></p><!-- no alt since
-  it's all described in the previous paragraphs: this is just a
-  summary -->
-
-<!--
-c.clearRect(0, 0, 640, 480);
-c.save();
-try {
-  with (c) {
-    save();
-    strokeStyle = '#AA0000';
-    lineWidth = 20;
-    beginPath();
-    moveTo(50,98);
-    lineTo(550, 98);
-    stroke();
-  }
-  mediaStream(c,50,10, true);
-
-} finally {
-  c.restore();
-}
-
-function cameraIcon(c,x,y) {
-  with (c) { save(); try {
-    translate(x,y);
-    fillRect(-10,-10,20,20);
-    beginPath();
-    moveTo(7,0);
-    lineTo(20,-10);
-    lineTo(20,10);
-    fill();
-    font = '100 8px "Press Start 2P", sans-serif';
-    textAlign = 'center';
-    textBaseline = 'top';
-    fillText('Camera', 4, 15);
-  } finally { restore(); } }
-}
-
-function mediaStream(c,x,y,vid) {
-  with (c) {
-    save();
-    translate(x-10,y-97);
-
-    // cable
-    fillStyle = 'black';
-    font = '100 10px "Press Start 2P", sans-serif';
-    textAlign = 'right';
-    fillText('Input', 95, 170);
-    textAlign = 'left';
-    fillText('Output', 407, 170);
-
-    // media stream
-    fillStyle = '#EE8800';
-    strokeStyle = '#FFCC00';
-    lineWidth = 6;
-    fillRect(100,100,300,170);
-    strokeRect(100,100,300,170);
-    fillStyle = 'black';
-    font = '900 12px "Press Start 2P", sans-serif';
-    textAlign = 'left';
-    fillText('MediaStream', 110, 123);
-
-    // tracks
-    textAlign = 'left';
-    strokeStyle = '#CC3300';
-    fillStyle = '#FFFF00';
-    lineWidth = 4;
-    globalAlpha = vid ? 1 : 0.4;
-    fillRect(120,140,100,110);
-    strokeRect(120,140,100,110);
-    globalAlpha = 1;
-    fillRect(238,140,100,110);
-    strokeRect(238,140,100,110);
-    fillStyle = 'black';
-    font = '900 10px "Press Start 2P", sans-serif';
-    globalAlpha = vid ? 1 : 0.4;
-    fillText('Track', 123, 155);
-    fillText('(video)', 123, 170);
-    globalAlpha = 1;
-    fillText('Track', 241, 155);
-    fillText('(stereo', 241, 170);
-    fillText(' audio)', 241, 185);
-
-    // channels
-    strokeStyle = '#999999';
-    fillStyle = '#FFFFFF';
-    lineWidth = 2;
-    fillRect(245,191,86,23);
-    strokeRect(245,191,86,23);
-    fillRect(245,220,86,23);
-    strokeRect(245,220,86,23);
-    fillStyle = 'black';
-    font = '100 8px "Press Start 2P", sans-serif';
-    textAlign = 'left';
-    textBaseline = 'alphabetic';
-    fillText('left', 249, 202);
-    fillText('channel', 249, 211);
-    fillText('right', 249, 231);
-    fillText('channel', 249, 240);
-
-    // track check marks
-    fillStyle = 'black';
-    font = '900 35px "Lucida Grande", sans-serif';
-    textAlign = 'center';
-    textBaseline = 'middle';
-    fillText(vid ? '\u2713' : '\u2716', 220, 245);
-    fillText('\u2713', 338, 245);
-
-    restore();
-  }
-}
--->
-
-  <p>This can be used, for instance, in a video-conferencing scenario
-  to display the local video from the user's camera and microphone in
-  a local monitor, while only transmitting the audio to the remote
-  peer (e.g. in response to the user using a "video mute"
-  feature).</p>
-
-  <p><img src="images/media-stream-2.png" alt=""></p><!-- again, no
-  alt since it's all described in the previous paragraphs: this is
-  just a summary -->
-
-<!--
-c.clearRect(0, 0, 640, 480);
-c.save();
-try {
-  with (c) {
-    save();
-    strokeStyle = '#AA0000';
-    lineWidth = 20;
-    beginPath();
-    moveTo(50,98);
-    lineTo(550, 98);
-    lineTo(550, 210);
-    lineTo(50, 210);
-    lineTo(50, 320);
-    lineTo(550, 320);
-    lineTo(550,420);
-    stroke();
-    beginPath();
-    moveTo(50,320);
-    lineTo(50,420);
-    stroke();
-    restore();
-    fillStyle = 'black';
-    font = '100 10px "Press Start 2P", sans-serif';
-    textAlign = 'center';
-    fillText('<video>', 50, 440);
-    fillText('PeerConnection', 550, 440);
-    font = '100 8px "Press Start 2P", sans-serif';
-  }
-  cameraIcon(c,25,98)
-  mediaStream(c,50,10, true);
-  mediaStream(c,50,233, false);
-
-  with (c) {
-    font = '100 8px "Press Start 2P", sans-serif';
-    textAlign = 'left';
-    textBaseline = 'middle';
-    fillStyle = 'gray';
-
-    fillText('from', 4, 130);
-    fillText('getUserMedia()', 4, 140);
-
-    fillText('via URL.createObjectURL()', 4, 450);
-
-    textAlign = 'center';
-    fillText('via addStream()', 550, 450);
-  }
-} finally {
-  c.restore();
-}
-
-function cameraIcon(c,x,y) {
-  with (c) { save(); try {
-    translate(x,y);
-    fillRect(-10,-10,20,20);
-    beginPath();
-    moveTo(7,0);
-    lineTo(20,-10);
-    lineTo(20,10);
-    fill();
-    font = '100 8px "Press Start 2P", sans-serif';
-    textAlign = 'center';
-    textBaseline = 'top';
-    fillText('Camera', 4, 15);
-  } finally { restore(); } }
-}
-
-function mediaStream(c,x,y,vid) {
-  with (c) {
-    save();
-    translate(x-10,y-97);
-
-    // cable
-    fillStyle = 'black';
-    font = '100 10px "Press Start 2P", sans-serif';
-    textAlign = 'right';
-    fillText('Input', 95, 170);
-    textAlign = 'left';
-    fillText('Output', 407, 170);
-
-    // media stream
-    fillStyle = '#EE8800';
-    strokeStyle = '#FFCC00';
-    lineWidth = 6;
-    fillRect(100,100,300,170);
-    strokeRect(100,100,300,170);
-    fillStyle = 'black';
-    font = '900 12px "Press Start 2P", sans-serif';
-    textAlign = 'left';
-    fillText(!vid ? 'MediaStream' : 'LocalMediaStream', 110, 123);
-
-    // tracks
-    textAlign = 'left';
-    strokeStyle = '#CC3300';
-    fillStyle = '#FFFF00';
-    lineWidth = 4;
-    globalAlpha = vid ? 1 : 0.4;
-    fillRect(120,140,100,110);
-    strokeRect(120,140,100,110);
-    globalAlpha = 1;
-    fillRect(238,140,100,110);
-    strokeRect(238,140,100,110);
-    fillStyle = 'black';
-    font = '900 10px "Press Start 2P", sans-serif';
-    globalAlpha = vid ? 1 : 0.4;
-    fillText('Track', 123, 155);
-    fillText('(video)', 123, 170);
-    globalAlpha = 1;
-    fillText('Track', 241, 155);
-    fillText('(stereo', 241, 170);
-    fillText(' audio)', 241, 185);
-
-    // channels
-    strokeStyle = '#999999';
-    fillStyle = '#FFFFFF';
-    lineWidth = 2;
-    fillRect(245,191,86,23);
-    strokeRect(245,191,86,23);
-    fillRect(245,220,86,23);
-    strokeRect(245,220,86,23);
-    fillStyle = 'black';
-    font = '100 8px "Press Start 2P", sans-serif';
-    textAlign = 'left';
-    textBaseline = 'alphabetic';
-    fillText('left', 249, 202);
-    fillText('channel', 249, 211);
-    fillText('right', 249, 231);
-    fillText('channel', 249, 240);
-
-    // track check marks
-    fillStyle = 'black';
-    font = '900 35px "Lucida Grande", sans-serif';
-    textAlign = 'center';
-    textBaseline = 'middle';
-    fillText(vid ? '\u2713' : '\u2716', 220, 245);
-    fillText('\u2713', 338, 245);
-
-    restore();
-  }
-}
--->
-
-  <p>When a track in a <code>MediaStream</code> <var
-  title="">parent</var> is disabled, any <code>MediaStreamTrack</code>
-  objects corresponding to the tracks in any <code>MediaStream</code>
-  objects that were created from <var title="">parent</var> are
-  disassociated from any track, and must not be reused for tracks
-  again. If a disabled track in a <code>MediaStream</code> <var
-  title="">parent</var> is re-enabled, from the perspective of any
-  <code>MediaStream</code> objects that were created from <var
-  title="">parent</var> it is a new track and thus new
-  <code>MediaStreamTrack</code> objects must be created for the tracks
-  that correspond to the re-enabled track.</p>
-
-  <hr>
-
-  <p>The <code>LocalMediaStream</code> interface is used when the user
-  agent is generating the stream's data (e.g. from a camera or
-  streaming it from a local video file). It allows authors to control
-  individual tracks during the generation of the content, e.g. to
-  allow the user to temporarily disable a local camera during a
-  video-conference chat.</p>
-
-  <p>When a <code>LocalMediaStream</code> object is being generated
-  from a local file (as opposed to a live audio/video source), the
-  user agent should stream the data from the file in real time, not
-  all at once. This reduces the ease with which pages can distinguish
-  live video from pre-recorded video, which can help protect the
-  user's privacy.</p>
-
-
-  <h4>Interface definitions</h4>
-
-  <!-- v2: support reading the bits from the stream directly, for use
-  with streaming over WebSocket? Or do we rely on FileReader for that?
-  sicking suggests defining a DataStream or BlobStream interface that
-  you can get from a Stream to get to the underlying data; such an
-  object would then be readable using the File API -->
-
-  <pre class="idl">[<span title="dom-MediaStream">Constructor</span>(<span>MediaStream</span> parentStream)]
-interface <dfn>MediaStream</dfn> : <span>EventTarget</span> {
-  readonly attribute DOMString <span title="dom-MediaStream-label">label</span>;
-  readonly attribute <span>MediaStreamTrack</span>[] <span title="dom-MediaStream-tracks">tracks</span>;
-
-  <span>MediaStreamRecorder</span> <span title="dom-MediaStream-record">record</span>();
-<!--
-  const unsigned short <span title="dom-MediaStream-LOADING">LOADING</span> = 0; -->
-  const unsigned short <span title="dom-MediaStream-LIVE">LIVE</span> = 1;
-  const unsigned short <span title="dom-MediaStream-ENDED">ENDED</span> = 2;
-  readonly attribute unsigned short <span title="dom-MediaStream-readyState">readyState</span>;
-  [TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-MediaStream-onended">onended</span>;
-};
-
-interface <dfn>LocalMediaStream</dfn> : <span>MediaStream</span> {
-  void <span title="dom-MediaStream-stop">stop</span>();
-};
-
-interface <dfn>MediaStreamTrack</dfn> {
-  readonly attribute DOMString <span title="dom-MediaStreamTrack-kind">kind</span>;
-  readonly attribute DOMString <span title="dom-MediaStreamTrack-label">label</span>;
-           attribute boolean <span title="dom-MediaStreamTrack-enabled">enabled</span>;
-};</pre>
-
-  <dl class="domintro">
-
-   <dt><var title="">stream</var>  = new <code title="dom-MediaStream">MediaStream</code>( <var title="">parentStream</var> )</dt>
-
-   <dd>
-
-    <p>Creates a new <code>MediaStream</code> object whose tracks are the enabled tracks of <var title="">parentStream</var>.</p>
-
-   </dd>
-
-
-   <dt><var title="">stream</var> . <code title="dom-MediaStream-label">label</code></dt>
-
-   <dd>
-
-    <p>Returns a label that is unique to this stream, so that streams
-    can be recognised after they are sent through the
-    <code>PeerConnection</code> API.</p>
-
-   </dd>
-
-
-   <dt><var title="">recorder</var> = <var title="">stream</var> . <code title="dom-MediaStream-record">record</code>()</dt>
-
-   <dd>
-
-    <p>Begins recording the stream. The returned
-    <code>MediaStreamRecorder</code> object provides access to the
-    recorded data.</p>
-
-   </dd>
-
-
-   <dt><var title="">stream</var> . <code title="dom-MediaStream-stop">stop</code>()</dt>
-
-   <dd>
-
-    <p>Permanently stops the generation of media data for the stream.</p>
-
-   </dd>
-
-
-   <dt><var title="">stream</var> . <code title="dom-MediaStream-tracks">tracks</code></dt>
-
-   <dd>
-
-    <p>Returns a <code>MediaStreamTrack</code> array representing
-    the tracks that can be enabled and disabled.</p>
-
-   </dd>
-
-
-   <dt><var title="">track</var> = <var title="">stream</var> . <code title="dom-MediaStream-tracks">tracks</code>[<var title="">index</var>]</dt>
-
-   <dd>
-
-    <p>Returns the specified <code>MediaStreamTrack</code> object.</p>
-
-   </dd>
-
-
-   <dt><var title="">track</var> . <code title="dom-MediaStreamTrack-kind">kind</code></dt>
-
-   <dd>
-
-    <p>Returns the string "<code title="">audio</code>" if the track
-    is an audio track, and the string "<code title="">video</code>" if
-    it is a video track.</p>
-
-   </dd>
-
-
-   <dt><var title="">track</var> . <code title="dom-MediaStreamTrack-label">label</code></dt>
-
-   <dd>
-
-    <p>Returns the label of the given track, if known, or the empty string otherwise.</p>
-
-   </dd>
-
-
-   <dt><var title="">track</var> . <code title="dom-MediaStreamTrack-enabled">enabled</code> [ = <var title="">value</var> ]</dt>
-
-   <dd>
-
-    <p>Returns true if the given track is active in the <code>MediaStream</code>'s output, and false otherwise.</p>
-
-    <p>Can be set, to change whether the track is enabled or not.</p>
-
-   </dd>
-
-  </dl>
-
-  <div class="impl">
-
-  <p>The <dfn title="dom-MediaStream"><code>MediaStream(<var
-  title="">parentStream</var>)</code></dfn> constructor must return a
-  new <code>MediaStream</code> object whose tracks at any moment in
-  time are the enabled tracks of <var title="">parentStream</var> at
-  that moment, and whose <code
-  title="dom-MediaStream-label">label</code> is equal to the <var
-  title="">parentStream</var>'s.</p>
-
-  <p>The <dfn
-  title="dom-MediaStream-readyState"><code>readyState</code></dfn>
-  attribute represents the state of the stream. It must return the
-  value to which the user agent last set it (as defined below). It can
-  have the following values:</p>
-
-  <dl>
-
-   <dt><dfn title="dom-MediaStream-LIVE"><code>LIVE</code></dfn> (numeric value 1)</dt>
-
-   <dd>The stream is active (the user agent is making a best-effort
-   attempt to receive or generate data in real time).</dd>
-
-   <dt><dfn title="dom-MediaStream-ENDED"><code>ENDED</code></dfn> (numeric value 2)</dt>
-
-   <dd>The stream has finished (the user agent is no longer receiving
-   or generating data, and will never receive or generate more data
-   for this stream).</dd>
-
-  </dl>
-
-  <p>When a <code>MediaStream</code> object is created, its <code
-  title="dom-MediaStream-readyState">readyState</code> attribute must
-  be set to <code title="dom-MediaStream-LIVE">LIVE</code> (1), unless
-  it is being created using the <code
-  title="dom-MediaStream">MediaStream()</code> constructor whose
-  argument is a <code>MediaStream</code> object whose <code
-  title="dom-MediaStream-readyState">readyState</code> attribute has
-  the value <code title="dom-MediaStream-ENDED">ENDED</code> (2), in
-  which case the <code>MediaStream</code> object must be created with
-  its <code title="dom-MediaStream-readyState">readyState</code>
-  attribute set to <code title="dom-MediaStream-ENDED">ENDED</code>
-  (2).</p>
-
-  <p>A <code>MediaStream</code> object is said to <i>end</i> when the
-  user agent learns that no more data will ever be forthcoming for
-  this stream.</p>
-
-  <p>When a <code>MediaStream</code> object ends for any reason (e.g.
-  because the user rescinds the permission for the page to use the
-  local camera, or because the data comes from a finite file and the
-  file's end has been reached and the user has not requested that it
-  be looped, or because the stream comes from a remote peer and the
-  remote peer has permanently stopped sending data, or because the
-  <code>MediaStream</code> was created from another
-  <code>MediaStream</code> and that stream has just itself ended), it
-  is said to be <dfn title="concept-stream-finished">finished</dfn>.
-  When this happens for any reason other than the <code
-  title="dom-MediaStream-stop">stop()</code> method being invoked, the
-  user agent must <span>queue a task</span> that runs the following
-  steps:</p>
-
-  <ol>
-
-   <li><p>If the object's <code
-   title="dom-MediaStream-readyState">readyState</code> attribute has the
-   value <code title="dom-MediaStream-ENDED">ENDED</code> (2) already, then
-   abort these steps. (The <code title="dom-MediaStream-stop">stop()</code>
-   method was probably called just before the stream stopped for other
-   reasons, e.g. the user clicked an in-page stop button and then the
-   user-agent-provided stop button.)</p></li>
-
-   <li><p>Set the object's <code
-   title="dom-MediaStream-readyState">readyState</code> attribute to <code
-   title="dom-MediaStream-ENDED">ENDED</code> (2).</p></li>
-
-   <li><p><span>Fire a simple event</span> named <code
-   title="event-MediaStream-ended">ended</code> at the object.</p></li>
-
-  </ol>
-
-  <p>As soon as a <code>MediaStream</code> object is <span
-  title="concept-stream-finished">finished</span>, the stream's tracks
-  start outputting only silence and/or blackness, as appropriate, <a
-  href="#finishedMute">as defined earlier</a>.</p>
-
-  <p>If the end of the stream was reached due to a user request, the
-  <span>task source</span> for this <span
-  title="concept-task">task</span> is the <span>user interaction task
-  source</span>. Otherwise the <span>task source</span> for this <span
-  title="concept-task">task</span> is the <span>networking task
-  source</span>.</p>
-
-  <hr>
-
-  <p>When a <code>LocalMediaStream</code> object's <dfn
-  title="dom-MediaStream-stop"><code>stop()</code></dfn> method is
-  invoked, the user agent must <span>queue a task</span> that runs the
-  following steps:</p>
-
-  <ol>
-
-   <li><p>If the object's <code
-   title="dom-MediaStream-readyState">readyState</code> attribute is
-   in the <code title="dom-MediaStream-ENDED">ENDED</code> (2) state,
-   then abort these steps.</p></li>
-
-   <li><p>Permanently stop the generation of data for the stream. If
-   the data is being generated from a live source (e.g. a microphone
-   or camera), and no other stream is being generated from a live
-   source, then the user agent should remove any active "on-air"
-   indicator. If the data is being generated from a prerecorded source
-   (e.g. a video file), any remaining content in the file is ignored.
-   The stream is <span
-   title="concept-stream-finished">finished</span>. The stream's
-   tracks start outputting only silence and/or blackness, as
-   appropriate, <a href="#finishedMute">as defined
-   earlier</a>.</p></li>
-
-   <li><p>Set the object's <code
-   title="dom-MediaStream-readyState">readyState</code> attribute to
-   <code title="dom-MediaStream-ENDED">ENDED</code> (2).</p></li>
-
-   <li><p><span>Fire a simple event</span> named <code
-   title="event-MediaStream-ended">ended</code> at the object.</p></li>
-
-  </ol>
-
-  <p>The <span>task source</span> for the <span
-  title="concept-task">tasks</span> queued for the <code
-  title="dom-MediaStream-stop">stop()</code> method is the <span>DOM
-  manipulation task source</span>.</p>
-
-  <hr>
-
-  <p>When a <code>LocalMediaStream</code> object is created, the user
-  agent must generate a globally unique identifier string, and must
-  initialize the object's <code title="dom-MediaStream-label">label</code>
-  attribute to that string. Such strings must only use characters in
-  the ranges U+0021, U+0023 to U+0027, U+002A to U+002B, U+002D to
-  U+002E, U+0030 to U+0039, U+0041 to U+005A, U+005E to U+007E, and
-  must be 36 characters long.</p> <!-- UUIDs have 36 characters
-  including hyphens; the ranges above comes from RFC4574 (the a=label:
-  thing in SDP) -->
-
-  <p>When a <code>MediaStream</code> is created to represent a stream
-  obtained from a remote peer, the <code
-  title="dom-MediaStream-label">label</code> attribute is initialized from
-  information provided by the remote source.</p> <!-- described below
-  -->
-
-  <p>When a <code>MediaStream</code> is created from another using the
-  <code title="dom-MediaStream">MediaStream()</code> constructor, the
-  <code title="dom-MediaStream-label">label</code> attribute is
-  initialized from the original.</p> <!-- described above -->
-
-  <p>The <dfn title="dom-MediaStream-label"><code>label</code></dfn>
-  attribute must return the value to which it was initialized when the
-  object was created.</p>
-
-  <p class="note">The label of a <code>MediaStream</code> object is
-  unique to the source of the stream, but that does not mean it is not
-  possible to end up with duplicates. For example, when a
-  <code>MediaStream</code> object is created from another using the
-  <code title="dom-MediaStream">MediaStream()</code> constructor, the
-  fork has the same label as the original. Similarly, a locally
-  generated stream could be sent from one user to a remote peer using
-  <code>PeerConnection</code>, and then sent back to the original user
-  in the same manner, in which case the original user will have
-  multiple streams with the same label (the locally-generated one and
-  the one received from the remote peer).</p>
-
-  <hr>
-
-  <p>When the <dfn
-  title="dom-MediaStream-record"><code>record()</code></dfn> method is
-  invoked, the user agent must return a new
-  <code>MediaStreamRecorder</code> object associated with the stream.</p>
-
-  <hr>
-
-  <p>A <code>MediaStream</code> can have multiple audio and video
-  sources (e.g. because the user has multiple microphones, or because
-  the real source of the stream is a <span>media resource</span> with
-  many media tracks). The stream represented by a
-  <code>MediaStream</code> thus has zero or more tracks.</p>
-
-  <hr>
-
-  <p>The <dfn title="dom-MediaStream-tracks"><code>tracks</code></dfn>
-  attribute must return a <span title="platform array objects">platform array
-  object</span> for objects of type <code>MediaStreamTrack</code> that is
-  <i>fixed length</i> and <i>read only</i>. The same object must be
-  returned each time the attribute is accessed. <a
-  href="#refsWEBIDL">[WEBIDL]</a></p>
-
-  <p>The array must contain the <code>MediaStreamTrack</code> objects
-  that correspond to the tracks of the stream. The relative order of
-  all tracks in a user agent must be stable. All audio tracks must
-  precede all video tracks. Tracks that come from a <span>media
-  resource</span> whose format defines an order must be in the order
-  defined by the format; tracks that come from a <span>media
-  resource</span> whose format does not define an order must be in the
-  relative order in which the tracks are declared in that <span>media
-  resource</span>. Within these constraints, the order is user-agent
-  defined.</p> <!-- doesn't matter currently since I can't think of
-  any way that you can get multiple tracks together. It would matter
-  if we allowed a MediaStream() constructor that took an array of
-  streams, though, or if getUserMedia() could return multiple audio or
-  video tracks. -->
-
-  <p>The <dfn
-  title="dom-MediaStreamTrack-kind"><code>MediaStreamTrack.kind</code></dfn>
-  attribute must return the string "<code title="">audio</code>" if
-  the object's corresponding track is or was an audio track, "<code
-  title="">video</code>" if the corresponding track is or was a video
-  track, and a user-agent defined string otherwise.</p>
-
-  <p>User agents may label audio and video sources (e.g. "Internal
-  microphone" or "External USB Webcam"). The <dfn
-  title="dom-MediaStreamTrack-label"><code>MediaStreamTrack.label</code></dfn>
-  attribute must return the label of the object's corresponding track,
-  if any. If the corresponding track has or had no label, the
-  attribute must instead return the empty string.</p>
-
-  <p class="note">Thus the <code
-  title="dom-MediaStreamTrack-kind">kind</code> and <code
-  title="dom-MediaStreamTrack-label">label</code> attributes do not change
-  value, even if the <code>MediaStreamTrack</code> object is disassociated
-  from its corresponding track.</p>
-
-  <p>The <dfn
-  title="dom-MediaStreamTrack-enabled"><code>MediaStreamTrack.enabled</code></dfn>
-  attribute, on getting, must return the last value to which it was
-  set. On setting, it must be set to the new value, and then, if the
-  <code>MediaStreamTrack</code> object is still associated with a track,
-  must enable the track if the new value is true, and disable it
-  otherwise.</p>
-
-  <p class="note">Thus, after a <code>MediaStreamTrack</code> is
-  disassociated from its track, its <code
-  title="dom-MediaStreamTrack-enabled">enabled</code> attribute still
-  changes value when set, it just doesn't do anything with that new
-  value.</p>
-
-  <hr>
-
-  <p>The following are the <span>event handlers</span> (and their
-  corresponding <span title="event handler event type">event handler
-  event types</span>) that must be supported, as IDL attributes, by
-  all objects implementing the <code>MediaStream</code> interface:</p>
-
-  <table>
-   <thead>
-    <tr><th><span title="event handlers">Event handler</span> <th><span>Event handler event type</span>
-   <tbody>
-    <tr><td><dfn title="handler-MediaStream-onended"><code>onended</code></dfn> <td> <code title="event-MediaStream-ended">ended</code>
-  </table>
-
-  </div>
-
-  <div class="example">
-
-   <p>This sample code exposes a button. When clicked, the button is
-   disabled and the user is prompted to offer a stream. The user can
-   cause the button to be re-enabled by providing a stream (e.g.
-   giving the page access to the local camera) and then disabling the
-   stream (e.g. revoking that access).</p>
-
-   <pre>
-&lt;input type="button" value="Start" onclick="start()" id="startBtn">
-&lt;script>
- var startBtn = document.getElementById('startBtn');
- function start() {
-   navigator.getUserMedia('audio,video', gotStream);
-   startBtn.disabled = true;
- }
- function gotStream(stream) {
-   stream.onended = function () {
-     startBtn.disabled = false;
-   }
- }
-&lt;/script></pre>
-
-  </div>
-
-  <pre class="idl">interface <dfn>MediaStreamRecorder</dfn> {
-  void <span title="dom-MediaStreamRecorder-getRecordedData">getRecordedData</span>(<span>BlobCallback</span>? callback);
-};
-
-[Callback, NoInterfaceObject]
-interface <dfn>BlobCallback</dfn> {
-  void <span title="dom-BlobCallback-handleEvent">handleEvent</span>(<span>Blob</span> blob);
-};</pre>
-
-  <dl class="domintro">
-
-   <dt><var title="">recorder</var> . <code title="dom-MediaStreamRecorder-getRecordedData">getRecordedData</code>(<var title="">callback</var>)</dt>
-
-   <dd>
-
-    <p>Creates a <code>Blob</code> of the recorded data, and invokes
-    the provided callback with that <code>Blob</code>.</p>
-
-   </dd>
-
-  </dl>
-
-  <div class="impl">
-
-  <p>When the <dfn
-  title="dom-MediaStreamRecorder-getRecordedData"><code>getRecordedData()</code></dfn>
-  method is called, the user agent must run the following steps:</p>
-
-  <ol>
-
-   <li><p>Let <var title="">callback</var> be the callback
-   indicated by the method's first argument.</p></li>
-
-   <li><p>If <var title="">callback</var> is null, abort these
-   steps.</p></li> <!-- we could throw an exception instead (that's
-   why the method doesn't return until later: so that we can add an
-   exception here without changing the algorithm) -->
-
-   <li><p>Let <var title="">data</var> be the data that was streamed
-   by the <code>MediaStream</code> object from which the
-   <code>MediaStreamRecorder</code> was created since the creation of the
-   <code>MediaStreamRecorder</code> object.</li>
-
-   <li><p>Return, and run the remaining steps asynchronously.</p></li>
-
-   <li><p>Generate a file that containing <var title="">data</var> in
-   a format supported by the user agent for use in <code>audio</code>
-   and <code>video</code> elements.</p></li>
-
-   <li><p>Let <var title="">blob</var> be a <code>Blob</code> object
-   representing the contents of the file generated in the previous
-   step. <a href="#refsFILEAPI">[FILEAPI]</a></p>
-
-   <li><p><span>Queue a task</span> to invoke <var
-   title="">callback</var> with <var title="">blob</var> as its
-   argument.</p></li>
-
-  </ol>
-
-  <p class="note">The <code
-  title="dom-MediaStreamRecorder-getRecordedData">getRecordedData()</code>
-  method can be called multiple times on one
-  <code>MediaStreamRecorder</code> object; each time, it will create a new
-  file as if this was the first time the method was being called. In
-  particular, the method does not stop or reset the recording when the
-  method is called.</p>
-
-  </div>
-
-  <div class="example">
-
-   <p>This example allows people to record a short audio message and
-   upload it to the server. This example even shows rudimentary error
-   handling.</p>
-
-   <pre>&lt;input type="button" value="&#x26AB;" onclick="msgRecord()" id="recBtn">
-&lt;input type="button" value="&#x25FC;" onclick="msgStop()" id="stopBtn" disabled>
-&lt;p id="status">To start recording, press the &#x26AB; button.&lt;/p>
-&lt;script>
- var recBtn = document.getElementById('recBtn');
- var stopBtn = document.getElementById('stopBtn');
- function report(s) {
-   document.getElementById('status').textContent = s;
- }
- function msgRecord() {
-   report('Attempting to access microphone...');
-   navigator.getUserMedia('audio', gotStream, noStream);
-   recBtn.disabled = true;
- }
- var msgStream, msgStreamRecorder;
- function gotStream(stream) {
-   report('Recording... To stop, press to &#x25FC; button.');
-   msgStream = stream;
-   msgStreamRecorder = stream.record();
-   stopBtn.disabled = false;
-   stream.onended = function () {
-     msgStop();     
-   }
- }
- function msgStop() {
-   report('Creating file...');
-   stopBtn.disabled = true;
-   msgStream.onended = null;
-   msgStream.stop();
-   msgStreamRecorder.getRecordedData(msgSave);
- }
- function msgSave(blob) {
-   report('Uploading file...');
-   var x = new XMLHttpRequest();
-   x.open('POST', 'uploadMessage');
-   x.send(blob);
-   x.onload = function () {
-     report('Done! To record a new message, press the &#x26AB; button.');
-     recBtn.disabled = false;
-   };
-   x.onerror = function () {
-     report('Failed to upload message. To try recording a message again, press the &#x26AB; button.');
-     recBtn.disabled = false;
-   };
- }
- function noStream() {
-   report('Could not obtain access to your microphone. To try again, press the &#x26AB; button.');
-   recBtn.disabled = false;
- }
-&lt;/script></pre>
-
-  </div>
-
-  <pre class="idl">partial interface <dfn title="dom-URL">URL</dfn> {
-  static DOMString <span title="dom-URL-createObjectURL">createObjectURL</span>(<span>MediaStream</span> stream);
-};</pre>
-
-  <dl class="domintro">
-
-   <dt><var title="">window</var> . <code title="dom-URL">URL</code> . <code title="dom-URL-createObjectURL">createObjectURL</code>(<var title="">stream</var>)</dt>
-
-   <dd>
-
-    <p>Mints a <span>Blob URL</span> to refer to the given <code>MediaStream</code>.</p>
-
-   </dd>
-
-  </dl>
-
-  <div class="impl">
-
-  <p>When the <dfn
-  title="dom-URL-createObjectURL"><code>createObjectURL()</code></dfn>
-  method is called with a <code>MediaStream</code> argument, the user agent
-  must return a unique <span>Blob URL</span> for the given
-  <code>MediaStream</code>. <a href="#refsFILEAPI">[FILEAPI]</a></p>
-
-  <p>For audio and video streams, the data exposed on that stream must
-  be in a format supported by the user agent for use in
-  <code>audio</code> and <code>video</code> elements.</p>
-
-  <p class="bookkeeping">A <dfn>Blob URL</dfn> is the same as what the
-  File API specification calls a <span>Blob URI</span>, except that
-  anything in the definition of that feature that refers to
-  <code>File</code> and <code>Blob</code> objects is hereby extended
-  to also apply to <code>MediaStream</code> and
-  <code>LocalMediaStream</code> objects.</p>
-
-  </div>
-
-  <div class="example">
-
-   <p>This example allows people to take photos of themselves from the
-   local video camera.</p>
-
-   <pre>&lt;article>
- &lt;style scoped>
-  video { transform: scaleX(-1); }
-  p { text-align: center; }
- &lt;/style>
- &lt;h1>Snapshot Kiosk&lt;/h1>
- &lt;section id="splash">
-  &lt;p id="errorMessage">Loading...&lt;/p>
- &lt;/section>
- &lt;section id="app" hidden>
-  &lt;p>&lt;video id="monitor" autoplay>&lt;/video> &lt;canvas id="photo">&lt;/canvas>
-  &lt;p>&lt;input type=button value="&amp;#x1F4F7;" onclick="snapshot()">
- &lt;/section>
- &lt;script>
-  navigator.getUserMedia('video user', gotStream, noStream);
-  var video = document.getElementById('monitor');
-  var canvas = document.getElementById('photo');
-  function gotStream(stream) {
-    video.src = URL.createObjectURL(stream);
-    video.onerror = function () {
-      stream.stop();
-    };
-    stream.onended = noStream;
-    video.onloadedmetadata = function () {
-      canvas.width = video.videoWidth;
-      canvas.height = video.videoHeight;
-      document.getElementById('splash').hidden = true;
-      document.getElementById('app').hidden = false;
-    };
-  }
-  function noStream() {
-    document.getElementById('errorMessage').textContent = 'No camera available.';
-  }
-  function snapshot() {
-    canvas.getContext('2d').drawImage(video, 0, 0);
-  }
- &lt;/script>
-&lt;/article></pre>
-
-  </div>
-
-
-
-  <h3>Peer-to-peer connections</h3>
-
-  <h4>Introduction</h4>
-
-  <!--END dev-html--><p><i>This section is non-normative.</i></p><!--START dev-html-->
-
-  <p>To send audio, video, or data to another peer, the
-  <code>PeerConnection</code> interface can be used.</p>
-
-  <p>This interface uses the ICE, SDP, STUN, and TURN technologies to
-  perform NAT traversal and codec negotiation. This is entirely
-  abstracted from the interface, so as to make the API as simple as
-  possible to use.</p>
-
-  <p>In order to bootstrap a peer-to-peer connection, a page has to
-  first have an indirect communications channel, known as the
-  <i>signaling channel</i>, via which messages can be exchanged with
-  the other peer. Typically, this will take the form of
-  <code>XMLHttpRequest</code>-based or <code>WebSocket</code>-based
-  communication through the server: messages are sent to the server
-  with a session identifier, and the server then routes them to the
-  other peer using the same session. The precise details of this
-  signaling channel are left up to the page author.</p>
-
-  <p>Once a signaling channel has been established, one peer is
-  arbitrarily picked as the initiator of the peer-to-peer connection.
-  Typically, this would be the peer whose user initiated the call (in
-  the telephonic sense).</p>
-
-  <p>This initiating peer creates a <code>PeerConnection</code>
-  object, passing it a configuration string and a signaling callback.
-  The configuration string is how the user agent is informed of STUN
-  and TURN servers, and is described in more detail in the next
-  section. The signaling callback is a function that takes one
-  argument, a string, which it then sends on the signaling
-  channel.</p>
-
-  <p>After creating the <code>PeerConnection</code> object, the script
-  can use the <code
-  title="dom-PeerConnection-addStream">addStream()</code> method to
-  add any audio or video streams to be sent.</p>
-
-  <p>Once the script that created the <code>PeerConnection</code>
-  object has finished, the user agent will invoke the callback with an
-  initial offer, containing any audio or video streams. The precise
-  format of the string sent to the callback is not important for the
-  purposes of the page author; it is simply an opaque string to be
-  sent to the other peer over the signaling channel established
-  earlier.</p>
-
-  <p>When the other peer, the receiving peer, receives this initial
-  offer, it similarly creates a <code>PeerConnection</code> object
-  with a configuration string and signaling callback, and then calls
-  the <code
-  title="dom-PeerConnection-processSignalingMessage">processSignalingMessage()</code>
-  method with, as its argument, the initial offer received from the
-  initiating peer. It can also use the <code
-  title="dom-PeerConnection-addStream">addStream()</code> method to
-  add any audio or video streams to be sent back.</p>
-
-  <p>Once the script that created the receiving peer's
-  <code>PeerConnection</code> object has finished, the receiving
-  peer's user agent invokes its callback to send a response. Again,
-  the author treats this as an opaque string to be sent back to the
-  initating peer over the signaling channel.</p>
-
-  <p>Messages can be sent back and forth an arbitrary number of times
-  over the signaling channel as the user agents negotiate codecs, as
-  streams get added or removed, etc.</p>
-
-  <p>Finally when the connection is to be ended the <code
-  title="dom-PeerConnection-close">close()</code> method is invoked on
-  the <code>PeerConnection</code> objects.</p>
-
-
-  <h4>Interface definitions</h4>
-
-  <pre class="idl">[<span title="dom-PeerConnection">Constructor</span>(DOMString serverConfiguration, <span>SignalingCallback</span> signalingCallback)]
-interface <dfn>PeerConnection</dfn> : <span>EventTarget</span> {
-  void <span title="dom-PeerConnection-processSignalingMessage">processSignalingMessage</span>(DOMString message);
-
-  const unsigned short <span title="dom-PeerConnection-NEW">NEW</span> = 0;
-  const unsigned short <span title="dom-PeerConnection-NEGOTIATING">NEGOTIATING</span> = 1;
-  const unsigned short <span title="dom-PeerConnection-ACTIVE">ACTIVE</span> = 2;
-  const unsigned short <span title="dom-PeerConnection-CLOSED">CLOSED</span> = 3;
-  readonly attribute unsigned short <span title="dom-PeerConnection-readyState">readyState</span>;
-
-  void <span title="dom-PeerConnection-send">send</span>(DOMString text); <!-- v2: binary -->
-  void <span title="dom-PeerConnection-addStream">addStream</span>(<span>MediaStream</span> stream);
-  void <span title="dom-PeerConnection-removeStream">removeStream</span>(<span>MediaStream</span> stream);
-  readonly attribute <span>MediaStream</span>[] <span title="dom-PeerConnection-localStreams">localStreams</span>;
-  readonly attribute <span>MediaStream</span>[] <span title="dom-PeerConnection-remoteStreams">remoteStreams</span>;
-
-  void <span title="dom-PeerConnection-close">close</span>();
-
-  // <span class="XXX">connection quality information</span>
-  [TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-PeerConnection-onconnecting">onconnecting</span>;
-  [TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-PeerConnection-onopen">onopen</span>;<!--
-  [TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-PeerConnection-onerror">onerror</span>;
-  [TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-PeerConnection-onclose">onclose</span>;-->
-  [TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-PeerConnection-onmessage">onmessage</span>;
-  [TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-PeerConnection-onaddstream">onaddstream</span>;
-  [TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-PeerConnection-onremovestream">onremovestream</span>;
-};
-
-[Callback, NoInterfaceObject]
-interface <dfn>SignalingCallback</dfn> {
-  void <span title="dom-SignalingCallback-handleEvent">handleEvent</span>(DOMString message, <span>PeerConnection</span> source);
-};</pre>
-
-  <p>A <code>PeerConnection</code> allows two users to communicate
-  directly, browser-to-browser. Communications are coordinated via a
-  signaling channel provided by script in the page via the server,
-  e.g. using <code>XMLHttpRequest</code>.</p>
-
-  <dl class="domintro">
-
-   <dt><var title="">connection</var> = new <code title="dom-PeerConnection">PeerConnection</code>(<var title="">serverConfiguration</var>, <var title="">signalingCallback</var>)</dt>
-
-   <dd>
-
-    <p>Creates a <code>PeerConnection</code> object.</p>
-
-    <p>The <var title="">serverConfiguration</var> string gives the address
-    of a STUN or TURN server to use to establish the connection. <a
-    href="#refsSTUN">[STUN]</a> <a href="#refsTURN">[TURN]</a></p>
-
-    <p>The allowed formats for this string are:</p>
-
-    <dl>
-
-     <dt>"<code title=""><var title="">TYPE</var> 203.0.113.2:3478</code>"
-     <dd>
-      <p>Indicates a specific IP address and port for the server.</p>
-     </dd>
-
-     <dt>"<code title=""><var title="">TYPE</var> relay.example.net:3478</code>"
-     <dd>
-      <p>Indicates a specific host and port for the server; the user agent will look up the IP address in DNS.</p>
-     </dd>
-
-     <dt>"<code title=""><var title="">TYPE</var> example.net</code>"
-     <dd>
-      <p>Indicates a specific domain for the server; the user agent will look up the IP address and port in DNS.</p>
-     </dd>
-
-    </dl>
-
-    <p>The "<code title=""><var title="">TYPE</var></code>" is one of:</p>
-
-    <dl>
-
-     <dt><code title="">STUN</code></dt>
-     <dd>Indicates a STUN server
-
-     <dt><code title="">STUNS</code></dt>
-     <dd>Indicates a STUN server that is to be contacted using a TLS session.
-
-     <dt><code title="">TURN</code></dt>
-     <dd>Indicates a TURN server
-
-     <dt><code title="">TURNS</code></dt>
-     <dd>Indicates a TURN server that is to be contacted using a TLS session.
-
-    </dl>
-
-    <p>The <var title="">signalingCallback</var> argument is a method
-    that will be invoked when the user agent needs to send a message
-    to the other host over the signaling channel. When the callback is
-    invoked, convey its first argument (a string) to the other peer
-    using whatever method is being used by the Web application to
-    relay signaling messages. (Messages returned from the other peer
-    are provided back to the user agent using the <code
-    title="dom-PeerConnection-processSignalingMessage">processSignalingMessage()</code>
-    method.)</p>
-
-   </dd>
-
-
-   <dt><var title="">connection</var> . <code title="dom-PeerConnection-readyState">readyState</code></dt>
-   <dd>
-    <p>Returns the current readiness state for the connection,
-    represented by a number from the following list:</p>
-    <dl>
-     <dt> <code>PeerConnection</code> . <code title="dom-PeerConnection-NEW">NEW</code> (0)</dt>
-     <dd>The object was just created, and no networking has yet occurred.</dd>
-     <dt> <code>PeerConnection</code> . <code title="dom-PeerConnection-NEGOTIATING">NEGOTIATING</code> (1)</dt>
-     <dd>The user agent is attempting to establish a connection.</dd>
-     <dt> <code>PeerConnection</code> . <code title="dom-PeerConnection-ACTIVE">ACTIVE</code> (2)</dt>
-     <dd>The connection is as good as its going to get.</dd>
-     <dt> <code>PeerConnection</code> . <code title="dom-PeerConnection-CLOSED">CLOSED</code> (3)</dt>
-     <dd>The connection is closed.</dd>
-    </dl>
-   </dd>
-
-
-   <dt><var title="">connection</var> . <code title="dom-PeerConnection-processSignalingMessage">processSignalingMessage</code>(<var title="">message</var>)</dt>
-
-   <dd>
-
-    <p>When a message is relayed from the remote peer over the
-    signaling channel is received by the Web application, pass it to
-    the user agent by calling the <code
-    title="dom-PeerConnection-processSignalingMessage">processSignalingMessage()</code>
-    method.</p>
-
-    <p>The order of messages is important. Passing messages to the
-    user agent in a different order than they were generated by the
-    remote peer's user agent can prevent a successful connection from
-    being established or degrade the connection's quality if one is
-    established.</p>
-
-   </dd>
-
-   <dt><var title="">connection</var> . <code title="dom-PeerConnection-send">send</code>(<var title="">text</var>)</dt>
-
-   <dd> <!-- v2: binary -->
-
-    <p>Attempts to send the given text to the remote peer. This uses
-    UDP, which is inherently unreliable; there is no guarantee that
-    every message will be received.</p>
-
-    <p>When a message sent in this manner from the other peer is
-    received, a <code title="event-MediaStream-message">message</code>
-    event is fired at the <code>PeerConnection</code> object.</p>
-
-    <p>The maximum length of <var title="">text</var> is 504 bytes
-    after encoding the string as UTF-8; attempting to send a payload
-    greater than 504 bytes results in an
-    <code>InvalidAccessError</code> exception.</p>
-
-   </dd>
-
-   <dt><var title="">connection</var> . <code title="dom-PeerConnection-addStream">addStream</code>(<var title="">stream</var>)</dt>
-
-   <dd>
-
-    <p>Attempts to starting sending the given stream to the remote
-    peer.</p>
-
-    <p>When the other peer starts sending a stream in this manner, an
-    <code title="event-MediaStream-addstream">addstream</code>
-    event is fired at the <code>PeerConnection</code> object.</p>
-
-   </dd>
-
-   <dt><var title="">connection</var> . <code title="dom-PeerConnection-removeStream">removeStream</code>(<var title="">stream</var>)</dt>
-
-   <dd>
-
-    <p>Stops sending the given stream to the remote peer.</p>
-
-    <p>When the other peer stops sending a stream in this manner, a
-    <code
-    title="event-MediaStream-removestream">removestream</code>
-    event is fired at the <code>PeerConnection</code> object.</p>
-
-   </dd>
-
-   <dt><var title="">connection</var> . <code title="dom-PeerConnection-localStreams">localStreams</code></dt>
-
-   <dd>
-
-    <p>Returns a live array containing the streams that the user agent
-    is currently attempting to transmit to the remote peer (those that
-    were added with <code
-    title="dom-PeerConnection-addStream">addStream()</code>).</p>
-
-   </dd>
-
-   <dt><var title="">connection</var> . <code title="dom-PeerConnection-remoteStreams">remoteStreams</code></dt>
-
-   <dd>
-
-    <p>Returns a live array containing the streams that the user agent
-    is currently receiving from the remote peer.</p>
-
-    <p>This array is updated when <code
-    title="event-MediaStream-addstream">addstream</code> and <code
-    title="event-MediaStream-removestream">removestream</code>
-    events are fired.</p>
-
-   </dd>
-
-  </dl>
-
-  <div class="impl">
-
-  <p>A <code>PeerConnection</code> object has an associated
-  <dfn><code>PeerConnection</code> signaling callback</dfn>, a
-  <dfn><code>PeerConnection</code> ICE Agent</dfn>, a
-  <dfn><code>PeerConnection</code> data UDP media stream</dfn>, a
-  <dfn><code>PeerConnection</code> readiness state</dfn> and an
-  <dfn>ICE started flag</dfn>. These are initialized when the object
-  is created.</p>
-
-  <p>The <span><code>PeerConnection</code> readiness state</span> can
-  have the following values:</p>
-
-  <dl>
-
-   <dt><dfn title="dom-PeerConnection-NEW"><code>NEW</code></dfn> (numeric value 0)</dt>
-
-   <dd>The object was just created and its ICE Agent has not yet been started.</dd>
-
-   <dt><dfn title="dom-PeerConnection-NEGOTIATING"><code>NEGOTIATING</code></dfn> (numeric value 1)</dt>
-
-   <dd>The ICE Agent is actively preforming ICE processing.</dd>
-
-   <dt><dfn title="dom-PeerConnection-ACTIVE"><code>ACTIVE</code></dfn> (numeric value 2)</dt>
-
-   <dd>The ICE Agent has concluded ICE processing. If any media streams were successfully negotiated, any relevant media is streaming.</dd>
-
-   <dt><dfn title="dom-PeerConnection-CLOSED"><code>CLOSED</code></dfn> (numeric value 3)</dt>
-
-   <dd>The <code title="dom-PeerConnection-close">close()</code> method has been invoked.</dd>
-
-  </dl>
-
-  <p>When the <dfn
-  title="dom-PeerConnection"><code>PeerConnection()</code></dfn>
-  constructor is invoked, the user agent must run the following steps.
-  This algorithm has a <span>synchronous section</span> (which is
-  triggered as part of the <span>event loop</span> algorithm). Steps
-  in the <span>synchronous section</span> are marked with
-  &#x231B;.</p>
-
-  <ol>
-
-   <li><p>Let <var title="">serverConfiguration</var> be the
-   constructor's first argument.</p></li>
-
-   <li><p>Let <var title="">signalingCallback</var> be the
-   constructor's second argument.</p></li>
-
-   <li><p>Let <var title="">connection</var> be a newly created
-   <code>PeerConnection</code> object.</p></li>
-
-   <li><p>Create an ICE Agent and let <var title="">connection</var>'s
-   <span><code>PeerConnection</code> ICE Agent</span> be that ICE
-   Agent. <a href="#refsICE">[ICE]</a></p></li>
-
-   <li><p>If <var title="">serverConfiguration</var> contains a U+000A LINE
-   FEED (LF) character or a U+000D CARRIAGE RETURN (CR) character (or
-   both), remove all characters from <var title="">serverConfiguration</var>
-   after the first such character.</p></li>
-
-   <li><p><span title="split a string on spaces">Split <var
-   title="">serverConfiguration</var> on spaces</span> to obtain <var
-   title="">configuration components</var>.</p></li>
-
-   <li>
-
-    <p>If <var title="">configuration components</var> has two or more
-    components, and the first component is a
-    <span>case-sensitive</span> match for one of the following
-    strings:</p>
-
-    <ul class="brief">
-     <li>"<code title="">STUN</code>"
-     <li>"<code title="">STUNS</code>"
-     <li>"<code title="">TURN</code>"
-     <li>"<code title="">TURNS</code>"
-    </ul>
-
-    <p>...then run the following substeps:</p>
-
-    <ol>
-
-     <li><p>Let <var title="">server type</var> be STUN if the first
-     component of <var title="">configuration components</var> is
-     "<code title="">STUN</code>" or "<code title="">STUNS</code>",
-     and TURN otherwise (the first component of <var
-     title="">configuration components</var> is "<code
-     title="">TURN</code>" or "<code title="">TURNS</code>").</p>
-
-     <li><p>Let <var title="">secure</var> be true if the first
-     component of <var title="">configuration components</var> is
-     "<code title="">STUNS</code>" or "<code title="">TURNS</code>",
-     and false otherwise.</p>
-
-     <li><p>Let <var title="">host</var> be the contents of the second
-     component of <var title="">configuration components</var> up to
-     the character before the first U+003A COLON character (:), if
-     any, or the entire string otherwise.</p></li>
-
-     <li><p>Let <var title="">port</var> be the contents of the second
-     component of <var title="">configuration components</var> from
-     the character after the first U+003A COLON character (:) up to
-     the end, if any, or the empty string otherwise.</p></li>
-
-     <li>
-
-      <p>Configure the <span><code>PeerConnection</code> ICE
-      Agent</span>'s STUN or TURN server as follows:</p>
-
-      <ul>
-
-       <li>If <var title="">server type</var> is STUN, the server is a
-       STUN server. Otherwise, <var title="">server type</var> is TURN
-       and the server is a TURN server.</li>
-
-       <li>If <var title="">secure</var> is true, the server is to be
-       contacted using TLS-over-TCP, otherwise, it is to be contacted
-       using UDP.</li>
-
-       <li>The IP address, host name, or domain name of the server is
-       <var title="">host</var>.</li>
-
-       <li>The port to use is <var title="">port</var>. If this is the
-       empty string, then only a domain name is configured (and the
-       ICE Agent will use DNS SRV requests to determine the IP address
-       and port).</li>
-
-       <li>The long-term username for the STUN or TURN server is
-       the <span title="ASCII serialization of an origin">ASCII
-       serialization</span> of the <span>entry script</span>'s
-       <span>origin</span>; the long-term password is the empty
-       string.</li>
-
-      </ul>
-
-      <p>If the given IP address, host name, domain name, or port are
-      invalid, then the user agent must act as if no STUN or TURN
-      server is configured.</p>
-
-     </li>
-
-    </ol>
-
-   </li>
-
-   <li><p>Let the <var title="">connection</var>'s
-   <span><code>PeerConnection</code> signaling callback</span> be
-   <var title="">signalingCallback</var>.</p></li>
-
-   <li><p>Set <var title="">connection</var>'s
-   <span><code>PeerConnection</code> readiness state</span> to <code
-   title="dom-PeerConnection-NEW">NEW</code> (0).</p></li>
-
-   <li><p>Set <var title="">connection</var>'s <span>ICE started
-   flag</span> to false.</p></li>
-
-   <li><p>Let <var title="">connection</var>'s
-   <span><code>PeerConnection</code> data UDP media stream</span> be a
-   new <span>data UDP media stream</span>.</p></li>
-
-   <li><p>Let <var title="">connection</var>'s <code
-   title="dom-PeerConnection-localStreams">localStreams</code>
-   attribute be an empty read-only <code>MediaStream</code> array. <a
-   href="#refsWEBIDL">[WEBIDL]</a></p></li>
-
-   <li><p>Let <var title="">connection</var>'s <code
-   title="dom-PeerConnection-remoteStreams">remoteStreams</code>
-   attribute be an empty read-only <code>MediaStream</code> array. <a
-   href="#refsWEBIDL">[WEBIDL]</a></p></li>
-
-   <li><p>Return <var title="">connection</var>, but continue these
-   steps asynchronously.</p></li>
-
-   <li><p><span>Await a stable state</span>. The <span>synchronous
-   section</span> consists of the remaining steps of this
-   algorithm. (Steps in <span title="synchronous section">synchronous
-   sections</span> are marked with &#x231B;.)</p></li>
-
-   <li><p>&#x231B; If <var title="">connection</var>'s <span>ICE
-   started flag</span> is still false, start the
-   <span><code>PeerConnection</code> ICE Agent</span> and send the
-   initial offer. The initial offer must include a media description
-   for the <span><code>PeerConnection</code> data UDP media
-   stream</span>, marked as "sendrecv", and for all the streams in
-   <code title="dom-PeerConnection-localStreams">localStreams</code>
-   (marked as "sendonly"). <a href="#refsICE">[ICE]</a> <a
-   href="#refsSDPOFFERANSWER">[SDPOFFERANSWER]</a></p></li>
-
-   <li><p>&#x231B; Let <var title="">connection</var>'s <span>ICE
-   started flag</span> be true.</p></li>
-
-   <li><p>&#x231B; If <var title="">connection</var>'s
-   <span><code>PeerConnection</code> readiness state</span> is still
-   <code title="dom-PeerConnection-NEW">NEW</code> (0), then
-   <span>queue a task</span> that sets it to <code
-   title="dom-PeerConnection-NEGOTIATING">NEGOTIATING</code> (1) and
-   then <span title="fire a simple event">fires a simple event</span>
-   named <code title="event-MediaStream-connecting">connecting</code> at the
-   <code>PeerConnection</code> object.</p>
-
-  </ol>
-
-  <p>When a <span><code>PeerConnection</code> ICE Agent</span> is
-  required to send SDP offers or answers, the user agent must follow
-  these steps:</p>
-
-  <ol>
-
-   <li><p>Let <var title="">sdp</var> be the SDP offer or answer to be
-   sent. <a href="#refsSDPOFFERANSWER">[SDPOFFERANSWER]</a></p></li>
-
-   <li><p>Let <var title="">message</var> be the concatenation of the
-   string "<code title="">SDP</code>", a U+000A LINE FEED (LF)
-   character, and <var title="">sdp</var>, in that order.</p></li>
-
-   <li><p><span>Queue a task</span> to invoke that
-   <span><code>PeerConnection</code> ICE Agent</span>'s
-   <span><code>PeerConnection</code> signaling callback</span> with
-   <var title="">message</var> as its first argument and the
-   <code>PeerConnection</code> as its second argument.</p></li>
-
-  </ol>
-
-  <p>All streams represented by <code>MediaStream</code> objects must be
-  marked as "sendonly" by the peer that initially adds the stream to
-  the session. The <code>PeerConnection</code> API does not support
-  bidirectional ("sendrecv") audio or video media streams. <a
-  href="#refsSDPOFFERANSWER">[SDPOFFERANSWER]</a></p>
-
-  <p>User agents may negotiate any codec and any resolution, bitrate,
-  or other quality metric. User agents are encouraged to initially
-  negotiate for the native resolution of the stream. For streams that
-  are then rendered (using a <code>video</code> element), user agents
-  are encouraged to renegotiate for a resolution that matches the
-  rendered display size.</p>
-
-  <p class="note">Starting with the native resolution means that if
-  the Web application notifies its peer of the native resolution as it
-  starts sending data, and the peer prepares its <code>video</code>
-  element accordingly, there will be no need for a renegotiation once
-  the stream is flowing.</p>
-
-  <p>All SDP media descriptions for streams represented by
-  <code>MediaStream</code> objects must include a label attribute ("<code
-  title="">a=label:</code>") whose value is the value of the
-  <code>MediaStream</code> object's <code
-  title="dom-MediaStream-label">label</code> attribute. <a
-  href="#refsSDP">[SDP]</a> <a href="#refsSDPLABEL">[SDPLABEL]</a></p>
-
-  <p><span title="PeerConnection ICE
-  Agent"><code>PeerConnection</code> ICE Agents</span> must not
-  generate any candidates for media streams whose media descriptions
-  do not have a label attribute ("<code title="">a=label:</code>"). <a
-  href="#refsICE">[ICE]</a> <a href="#refsSDP">[SDP]</a> <a
-  href="#refsSDPLABEL">[SDPLABEL]</a></p>
-
-  <p>When a user agent starts receiving media for a component and a
-  candidate was provided for that component by a
-  <span><code>PeerConnection</code> ICE Agent</span>, the user agent
-  must follow these steps:</p>
-
-  <ol>
-
-   <li><p>Let <var title="">connection</var> be the
-   <code>PeerConnection</code> whose ICE Agent is expecting this
-   media.</p></li>
-
-   <li><p>If there is already a <code>MediaStream</code> object for the
-   media stream to which this component belongs, then associate the
-   component with that media stream and abort these steps. (Some media
-   streams have multiple components; this API does not expose the
-   role of these individual components in ICE.)</p></li>
-
-   <li><p>Create a <code>MediaStream</code> object to represent the
-   media stream. Set its <code
-   title="dom-MediaStream-label">label</code> attribute to the value
-   of the SDP Label attribute for that component's media
-   stream.</p></li>
-
-   <li>
-
-    <p><span>Queue a task</span> to run the following substeps:</p>
-
-    <ol>
-    
-     <li><p>If the <var title="">connection</var>'s
-     <span><code>PeerConnection</code> readiness state</span> is <code
-     title="dom-PeerConnection-CLOSED">CLOSED</code> (3), abort these
-     steps.</p></li> <!-- close() was probably called just before this
-     task ran -->
-
-     <li><p>Add the newly created <code>MediaStream</code> object to the
-     end of <var title="">connection</var>'s <code
-     title="dom-PeerConnection-remoteStreams">remoteStreams</code>
-     array.</p></li>
-
-     <li><p><span>Fire a stream event</span> named <code
-     title="event-MediaStream-addstream">addstream</code> with the newly
-     created <code>MediaStream</code> object at the <var
-     title="">connection</var> object.</p></li>
-
-    </ol>
-
-   </li>
-
-  </ol>
-
-  <p>When a <span><code>PeerConnection</code> ICE Agent</span> finds
-  that a stream from the remote peer has been removed (its port has
-  been set to zero in a media description sent on the signaling
-  channel), the user agent must follow these steps:</p>
-
-  <ol>
-
-   <li><p>Let <var title="">connection</var> be the
-   <code>PeerConnection</code> whose <span><code>PeerConnection</code>
-   ICE Agent</span> has determined that a stream is being removed.</p></li>
-
-   <li><p>Let <var title="">stream</var> be the <code>MediaStream</code>
-   object that represents the media stream being removed, if any. If
-   there isn't one, then abort these steps.</p></li>
-
-   <li>
-
-    <p>By definition, <var title="">stream</var> is now <span
-    title="concept-stream-finished">finished</span>.</p>
-
-    <p class="note">A <span title="concept-task">task</span> is thus
-    <span title="queue a task">queued</span> to update <var
-    title="">stream</var> and fire an event.</p>
-
-   </li>
-
-   <li>
-
-    <p><span>Queue a task</span> to run the following substeps:</p>
-
-    <ol>
-    
-     <li><p>If the <var title="">connection</var>'s
-     <span><code>PeerConnection</code> readiness state</span> is <code
-     title="dom-PeerConnection-CLOSED">CLOSED</code> (3), abort these
-     steps.</p></li> <!-- close() was probably called just before this
-     task ran -->
-
-     <li><p>Remove <var title="">stream</var> from <var
-     title="">connection</var>'s <code
-     title="dom-PeerConnection-remoteStreams">remoteStreams</code>
-     array.</p></li>
-
-     <li><p><span>Fire a stream event</span> named <code
-     title="event-MediaStream-removestream">removestream</code> with <var
-     title="">stream</var> at the <var title="">connection</var>
-     object.</p></li>
-
-    </ol>
-
-   </li>
-
-  </ol>
-
-  <p>When the <dfn title="dom-PeerConnection-processSignalingMessage"><code
-  title="">processSignalingMessage()</code></dfn> method is invoked, the
-  user agent must run the following steps:</p>
-
-  <ol>
-
-   <li><p>Let <var title="">message</var> be the method's
-   argument.</p></li>
-
-   <li><p>Let <var title="">connection</var> be the
-   <code>PeerConnection</code> object on which the method was
-   invoked.</p></li>
-
-   <li><p>If <var title="">connection</var>'s
-   <span><code>PeerConnection</code> readiness state</span> is <code
-   title="dom-PeerConnection-CLOSED">CLOSED</code> (3), throw an
-   <code>InvalidStateError</code> exception.</p></li>
-
-   <li>
-
-    <p>If the first four characters of <var title="">message</var> are
-    not "<code title="">SDP</code>" followed by a U+000A LINE FEED
-    (LF) character, then abort these steps. (This indicates an error
-    in the signaling channel implementation. User agents may report
-    such errors to their developer consoles to aid debugging.)</p>
-
-    <p class="note">Future extensions to the
-    <code>PeerConnection</code> interface might use other prefix
-    values to implement additional features.</p>
-
-   </li>
-
-   <li><p>Let <var title="">sdp</var> be the string consisting of all
-   but the first four characters of <var
-   title="">message</var>.</p></li>
-
-   <li><p>If <var title="">connection</var>'s <span>ICE started
-   flag</span> is true, then pass <var title="">sdp</var> to the
-   <span><code>PeerConnection</code> ICE Agent</span> as a subsequent
-   offer or answer, to be interpreted as appropriate given the current
-   state of the ICE Agent, and abort these steps. <a
-   href="#refsICE">[ICE]</a></p></li>
-
-   <li>
-
-    <p>The <span>ICE started flag</span> is false. Start the
-    <span><code>PeerConnection</code> ICE Agent</span> and pass it
-    <var title="">sdp</var> as the initial offer from the other peer;
-    the ICE Agent will then (asynchronously) construct the initial
-    answer and transmit it as described above.</p>
-
-    <p>If there is a <span>remotely-initiated data UDP media
-    stream</span> in the initial offer, and it has an encryption key
-    advertised in its media description that is 16 bytes long, then
-    that is the <span><code>PeerConnection</code> data UDP media
-    stream</span>.</p>
-
-    <p>After the initial answer has been sent, the ICE Agent must add
-    all the streams in <code
-    title="dom-PeerConnection-localStreams">localStreams</code> to the
-    session, as described above. <a href="#refsICE">[ICE]</a></p>
-
-   </li>
-
-   <li><p>Let <var title="">connection</var>'s <span>ICE started
-   flag</span> be true.</p></li>
-
-   <li><p><span>Queue a task</span> that sets <var
-   title="">connection</var>'s <span><code>PeerConnection</code>
-   readiness state</span> to <code
-   title="dom-PeerConnection-NEGOTIATING">NEGOTIATING</code> (1) and
-   then <span title="fire a simple event">fires a simple event</span>
-   named <code title="event-MediaStream-connecting">connecting</code> at the
-   <code>PeerConnection</code> object.</p>
-
-  </ol>
-
-  <p>When a <span><code>PeerConnection</code> ICE Agent</span>
-  completes ICE processing (even if there are no active streams), the
-  user agent must <span>queue a task</span> that sets the
-  <code>PeerConnection</code> object's
-  <span><code>PeerConnection</code> readiness state</span> to <code
-  title="dom-PeerConnection-ACTIVE">ACTIVE</code> (2) and then <span
-  title="fire a simple event">fires a simple event</span> named <code
-  title="event-MediaStream-open">open</code> at the
-  <code>PeerConnection</code> object.</p>
-
-  <p>When a <span><code>PeerConnection</code> ICE Agent</span>
-  restarts ICE processing for any reason (e.g. because a peer is
-  adding or removing a stream), the user agent must <span>queue a
-  task</span> that sets the <code>PeerConnection</code> object's
-  <span><code>PeerConnection</code> readiness state</span> to <code
-  title="dom-PeerConnection-NEGOTIATING">NEGOTIATING</code> (1) and
-  then <span title="fire a simple event">fires a simple event</span>
-  named <code title="event-MediaStream-connecting">connecting</code> at the
-  <code>PeerConnection</code> object.</p>
-                                   
-  <p>The <dfn title="dom-PeerConnection-readyState"><code
-  title="">readyState</code></dfn> attribute must return the numeric
-  value of the <code>PeerConnection</code> object's
-  <span><code>PeerConnection</code> readiness state</span>.</p>
-
-  <p>When the <dfn title="dom-PeerConnection-send"><code
-  title="">send()</code></dfn> method is invoked, the
-  user agent must run the following steps:</p>
-
-  <ol> <!-- v2: binary -->
-
-   <li><p>Let <var title="">message</var> be the method's first
-   argument.</p></li>
-
-   <li><p>If the <code>PeerConnection</code> object's
-   <span><code>PeerConnection</code> readiness state</span> is <code
-   title="dom-PeerConnection-CLOSED">CLOSED</code> (3), throw an
-   <code>InvalidStateError</code> exception.</p></li>
-
-   <li><p>Let <var title="">data</var> be <var title="">message</var>
-   encoded as UTF-8. <a href="#refsRFC3629">[RFC3629]</a></p></li>
-
-   <li><p>If <var title="">data</var> is longer than 504 bytes,
-   throw an <code>InvalidAccessError</code> exception and abort these
-   steps.</p></li>
-   <!-- IPv4: 576 (min IPv4 MTU size) - 20 (IP header) - 8 (UDP header) - 44 (UDP data media stream overhead) = 504 -->
-   <!-- IPv6: 1280 (min IPv6 MTU size) - 40 (IP header) - 8 (UDP header) - 44 (UDP data media stream overhead) = 1188 -->
-
-   <li><p>If the <code>PeerConnection</code>'s
-   <span><code>PeerConnection</code> data UDP media stream</span> is
-   not an <span>active data UDP media stream</span>, abort these
-   steps. No message is sent.</p></li>
-
-   <li><p>If the user agent is rate-limiting packets sent using this
-   API, and sending the data packet at this time would exceed the
-   limit, then abort these steps. User agents may report this to the
-   user, e.g. in a development console.</p></li>
-
-   <li><p><span>Transmit a data packet to a peer</span> using the
-   <code>PeerConnection</code>'s <span><code>PeerConnection</code>
-   data UDP media stream</span> with <var title="">data</var> as the
-   message.</p></li>
-
-  </ol>
-
-  <p>When the <dfn title="dom-PeerConnection-addStream"><code
-  title="">addStream()</code></dfn> method is invoked, the user agent
-  must run the following steps:</p>
-
-  <ol>
-
-   <li><p>Let <var title="">stream</var> be the method's
-   argument.</p></li>
-
-   <li><p>If the <code>PeerConnection</code> object's
-   <span><code>PeerConnection</code> readiness state</span> is <code
-   title="dom-PeerConnection-CLOSED">CLOSED</code> (3), throw an
-   <code>InvalidStateError</code> exception.</p></li>
-
-   <li><p>If <var title="">stream</var> is already in the
-   <code>PeerConnection</code> object's <code
-   title="dom-PeerConnection-localStreams">localStreams</code> object,
-   then abort these steps.</p></li>
-
-   <li><p>Add <var title="">stream</var> to the end of the
-   <code>PeerConnection</code> object's <code
-   title="dom-PeerConnection-localStreams">localStreams</code>
-   object.</p></li>
-
-   <li><p>Return from the method.</p></li>
-
-   <li><p>If the <code>PeerConnection</code>'s <span>ICE
-   started flag</span> is false, then abort these steps.</p></li>
-
-   <li><p>Have the <code>PeerConnection</code>'s
-   <span><code>PeerConnection</code> ICE Agent</span> add a media
-   stream for <var title="">stream</var> the next time the user agent
-   <span title="provide a stable state">provides a stable
-   state</span>. Any other pending stream additions and removals must
-   be processed at the same time. <a
-   href="#refsICE">[ICE]</a></p></li> <!-- section 9.1.1.3 -->
-
-  </ol>
-  
-  <p>When the <dfn title="dom-PeerConnection-removeStream"><code
-  title="">removeStream()</code></dfn> method is invoked, the user agent
-  must run the following steps:</p>
-
-  <ol>
-
-   <li><p>Let <var title="">stream</var> be the method's
-   argument.</p></li>
-
-   <li><p>If the <code>PeerConnection</code> object's
-   <span><code>PeerConnection</code> readiness state</span> is <code
-   title="dom-PeerConnection-CLOSED">CLOSED</code> (3), throw an
-   <code>InvalidStateError</code> exception.</p></li>
-
-   <li><p>If <var title="">stream</var> is not in the
-   <code>PeerConnection</code> object's <code
-   title="dom-PeerConnection-localStreams">localStreams</code> object,
-   then abort these steps.</p></li>
-
-   <li><p>Remove <var title="">stream</var> from the
-   <code>PeerConnection</code> object's <code
-   title="dom-PeerConnection-localStreams">localStreams</code>
-   object.</p></li>
-
-   <li><p>Return from the method.</p></li>
-
-   <li><p>If the <code>PeerConnection</code>'s <span>ICE
-   started flag</span> is false, then abort these steps.</p></li>
-
-   <li><p>Have the <code>PeerConnection</code>'s
-   <span><code>PeerConnection</code> ICE Agent</span> remove the media
-   stream for <var title="">stream</var> the next time the user agent
-   <span title="provide a stable state">provides a stable
-   state</span>. Any other pending stream additions and removals must
-   be processed at the same time. <a
-   href="#refsICE">[ICE]</a></p></li> <!-- section 9.1.1.2 -->
-
-  </ol>
-
-  <p>The <dfn
-  title="dom-PeerConnection-localStreams"><code>localStreams</code></dfn>
-  and <dfn
-  title="dom-PeerConnection-remoteStreams"><code>remoteStreams</code></dfn>
-  attributes must return the read-only <code>MediaStream</code> arrays that
-  the attributes were respectively set to when the
-  <code>PeerConnection</code>'s constructor ran.</p>
-  
-  <p>When the <dfn title="dom-PeerConnection-close"><code
-  title="">close()</code></dfn> method is invoked, the user agent must
-  run the following steps:</p>
-
-  <ol>
-
-   <li><p>If the <code>PeerConnection</code> object's
-   <span><code>PeerConnection</code> readiness state</span> is <code
-   title="dom-PeerConnection-CLOSED">CLOSED</code> (3), throw an
-   <code>InvalidStateError</code> exception.</p></li>
-
-   <li><p>Destroy the <span><code>PeerConnection</code> ICE
-   Agent</span>, abruptly ending any active ICE processing and any
-   active streaming, and releasing any relevant resources (e.g. TURN
-   permissions).</p></li>
-
-   <li><p>Set the object's <span><code>PeerConnection</code> readiness
-   state</span> to <code
-   title="dom-PeerConnection-CLOSED">CLOSED</code> (3).</p></li>
-<!--
-   <li><p><span>Queue a task</span> to <span>fire a simple
-   event</span> named <code title="event-MediaStream-close">close</code> at the
-   <code>PeerConnection</code> object.</p></li>
--->
-  </ol>
-
-  <p class="note">The <code
-  title="dom-PeerConnection-localStreams">localStreams</code> and
-  <code title="dom-PeerConnection-remoteStreams">remoteStreams</code>
-  objects remain in the state they were in when the object was
-  closed.</p>
-
-  <hr>
-
-  <p>The following are the <span>event handlers</span> (and their
-  corresponding <span title="event handler event type">event handler
-  event types</span>) that must be supported, as IDL attributes, by
-  all objects implementing the <code>PeerConnection</code>
-  interface:</p>
-
-  <table>
-   <thead>
-    <tr><th><span title="event handlers">Event handler</span> <th><span>Event handler event type</span>
-   <tbody>
-    <tr><td><dfn title="handler-PeerConnection-onconnecting"><code>onconnecting</code></dfn> <td> <code title="event-MediaStream-connecting">connecting</code>
-    <tr><td><dfn title="handler-PeerConnection-onopen"><code>onopen</code></dfn> <td> <code title="event-MediaStream-open">open</code>
-<!--    <tr><td><dfn title="handler-PeerConnection-onerror"><code>onerror</code></dfn> <td> <code title="event-MediaStream-error">error</code>-->
-<!--    <tr><td><dfn title="handler-PeerConnection-onclose"><code>onclose</code></dfn> <td> <code title="event-MediaStream-close">close</code>-->
-    <tr><td><dfn title="handler-PeerConnection-onmessage"><code>onmessage</code></dfn> <td> <code title="event-MediaStream-message">message</code>
-    <tr><td><dfn title="handler-PeerConnection-onaddstream"><code>onaddstream</code></dfn> <td> <code title="event-MediaStream-addstream">addstream</code>
-    <tr><td><dfn title="handler-PeerConnection-onremovestream"><code>onremovestream</code></dfn> <td> <code title="event-MediaStream-removestream">removestream</code>
-  </table>
-
-  <hr>
-
-  <p>The <span>task source</span> for the <span
-  title="concept-task">tasks</span> listed in this section is the
-  <span>networking task source</span>.</p>
-
-  </div>
-
-  <div class="example">
-
-   <p>When two peers decide they are going to set up a connection to
-   each other, they both go through these steps. The STUN/TURN server
-   configuration describes a server they can use to get things like
-   their public IP address or to set up NAT traversal. They also have
-   to send data for the signaling channel to each other using the same
-   out-of-band mechanism they used to establish that they were going
-   to communicate in the first place.</p>
-
-   <pre>// the first argument describes the STUN/TURN server configuration
-var local = new PeerConnection('TURNS example.net', sendSignalingChannel);
-local.signalingChannel(...); // if we have a message from the other side, pass it along here
-
-// (aLocalStream is some LocalMediaStream object)
-local.addStream(aLocalStream); // start sending video
-
-function sendSignalingChannel(message) {
-  ... // send message to the other side via the signaling channel
-}
-
-function receiveSignalingChannel (message) {
-  // call this whenever we get a message on the signaling channel
-  local.signalingChannel(message);
-}
-
-local.onaddstream = function (event) {
-  // (videoElement is some &lt;video> element)
-  videoElement.src = URL.createObjectURL(event.stream);
-};</pre>
-
-  </div>
-
-  <p class="warning">To prevent network sniffing from allowing a
-  fourth party to establish a connection to a peer using the
-  information sent out-of-band to the other peer and thus spoofing the
-  client, the configuration information should always be transmitted
-  using an encrypted connection.</p>
-
-
-
-  <div class="impl">
-
-  <h3>The data stream</h3>
-
-  <p>All <code>PeerConnection</code> connections include a <dfn>data
-  UDP media stream</dfn>, which is used to send data packets
-  peer-to-peer, for instance game control packets. This data channel
-  is unreliable (packets are not guaranteed to be delivered), and
-  packets received out of order are discarded.</p>
-
-  <p>SDP media descriptions for <span title="data UDP media
-  stream">data UDP media streams</span> must use the "<code
-  title="">application</code>" media type, the "<code
-  title="">udp</code>" transport protocol, and the
-  "<code>application/html-peer-connection-data</code>" media format
-  description. <a href="#refsSDP">[SDP]</a></p>
-
-  <p>All SDP media descriptions for <span title="data UDP media
-  stream">data UDP media streams</span> must include a label attribute
-  ("<code title="">a=label:</code>") whose value is the string "<code
-  title="">data</code>". <a href="#refsSDP">[SDP]</a> <a
-  href="#refsSDPLABEL">[SDPLABEL]</a></p>
-
-  <p>All SDP media descriptions for <span title="data UDP media
-  stream">data UDP media streams</span> must also include a key field
-  ("<code title="">k=</code>"), with the value being a base64-encoded
-  representation of 16 cryptographically random bytes determined on a
-  per-ICE-Agent basis. <a href="#refsSDP">[SDP]</a></p>
-
-  <p><span title="PeerConnection ICE
-  Agent"><code>PeerConnection</code> ICE Agents</span> must attempt to
-  establish a connection for their <span><code>PeerConnection</code>
-  data UDP media stream</span> with the initial offer/answer exchange,
-  and must maintain that UDP media stream for the ICE Agents' whole
-  lifetime.</p>
-
-  <p>Each <span><code>PeerConnection</code> data UDP media
-  stream</span> has a <dfn>sending sequence number</dfn>, which must
-  initially be set to one (1), and a <dfn>most recently received
-  sequence number</dfn>, much must initially be zero (0).
-
-  <p>A <span>data UDP media stream</span> is an <dfn>active data UDP
-  media stream</dfn> if the <span><code>PeerConnection</code> ICE
-  Agent</span> has selected a destination for it. A <span>data UDP
-  media stream</span> can change active status many times during the
-  lifetime of its <code>PeerConnection</code> object (e.g. any time
-  the network topology changes and the ICE Agent performs an ICE
-  Restart). <a href="#refsICE">[ICE]</a></p>
-
-  <p>Bytes transmitted on a <span>data UDP media stream</span> are
-  masked so as to prevent cross-protocol attacks (<span>data UDP media
-  stream</span> always appear to contain random noise to other
-  protocols). For the purposes of masking, the <dfn>data UDP media
-  stream masking salt</dfn> is defined to be the following 16 bytes,
-  described here as hexadecimal numbers: DB 68 B5 FD 17 0E 15 77 56 AF
-  7A 3A 1A 57 75 02</p>
-  <!-- obtained thusly: head -c 16 /dev/urandom | hexdump -C -->
-
-  <p>Bytes transmitted on a <span>data UDP media stream</span> are
-  also hashed so as to prevent forgery attacks (an attacker cannot
-  change the data without knowing the key negotiated via the signaling
-  channel). For the purposes of this hashing, the <dfn>data UDP media
-  stream hashing salt</dfn> is defined to be the following 16 bytes,
-  described here as hexadecimal numbers: 4E 2F 96 AB 0A 39 92 A2 56 94
-  91 F5 7E 58 2E FA</p>
-  <!-- obtained thusly: head -c 16 /dev/urandom | hexdump -C -->
-
-  <p>When the user agent is to <dfn>transmit a data packet to a
-  peer</dfn> using a <span>data UDP media stream</span> and with a
-  byte string payload <var title="">raw message</var>, the user agent
-  must run the following steps:</p>
-
-  <ol>
-
-   <li><p>Let <var title="">nonce</var> be 16 cryptographically random
-   bytes.</p></li>
-
-   <li><p>Let <var title="">ice-key</var> be the 16 bytes given as the
-   encryption key for the <span>data UDP media stream</span> in its
-   media description, as defined above.</p></li>
-
-   <li><p>Let <var title="">sending sequence number</var> be the
-   current <span>sending sequence number</span>.</p></li>
-
-   <li><p>Increment the <span>sending sequence number</span> by one
-   (1).</p></li>
-
-   <li><p>Let <var title="">mask-key</var> be the first 16 bytes of the
-   HMAC-SHA1 of the 16 <span>data UDP media stream masking salt</span>
-   bytes keyed with the 16 <var title="">ice-key</var> bytes. <a
-   href="#refsHMAC">[HMAC]</a> <a href="#refsSHA1">[SHA1]</a></p></li>
-
-   <li><p>Let <var title="">typed raw message</var> be the
-   concatenation of the <var title="">sequence number</var> as a
-   big-endian 64 bit integer, three 0x00 bytes, a 0x01 byte, and <var
-   title="">raw message</var>.</p></li>
-
-   <li><p>Let <var title="">masked message</var> be the result of
-   encrypting <var title="">typed raw message</var> using AES-128-CTR
-   keyed with <var title="">mask-key</var> and using the 16 <var
-   title="">nonce</var> bytes as the initial counter value. <a
-   href="#refsAES128CTR">[AES128CTR]</a></p></li>
-
-   <li><p>Let <var title="">masked message with nonce</var> be the
-   concatenation of <var title="">nonce</var> and <var title="">masked
-   message</var>.</p></li>
-
-   <li><p>Let <var title="">hash-key</var> be the first 16 bytes of
-   the HMAC-SHA1 of the 16 <span>data UDP media stream hashing
-   salt</span> bytes keyed with the 16 <var title="">ice-key</var>
-   bytes. <a href="#refsHMAC">[HMAC]</a> <a
-   href="#refsSHA1">[SHA1]</a></p></li>
-
-   <li><p>Let <var title="">hash</var> be the first 16 bytes of the
-   HMAC-SHA1 of <var title="">masked message with nonce</var> keyed
-   with the 16 <var title="">hash-key</var> bytes. <a
-   href="#refsHMAC">[HMAC]</a> <a href="#refsSHA1">[SHA1]</a></p></li>
-
-   <li><p>Let <var title="">hashed masked message with nonce</var> be the
-   concatenation of <var title="">hash</var> and <var
-   title="">masked message with nonce</var>.</p></li>
-
-   <li><p>Send <var title="">hashed masked message with nonce</var> in
-   a UDP packet to the destination that the relevant
-   <span><code>PeerConnection</code> ICE Agent</span> has selected a
-   destination for the <span>data UDP media stream</span>.</p></li>
-
-  </ol>
-
-  <p>When a packet that is part of a <span>data UDP media
-  stream</span> is received, the user agent must run the following
-  steps:</p>
-
-  <ol> <!-- v2: binary -->
-
-   <li><p>Let <var title="">hashed masked message with nonce</var> be the UDP
-   packet's data.</p></li>
-
-   <li><p>If <var title="">hashed masked message with nonce</var> is
-   shorter than 32 bytes, then abort these steps.</p></li>
-
-   <li><p>Let <var title="">ice-key</var> be the 16 bytes given as the
-   encryption key for the <span>data UDP media stream</span> in the
-   media description for this media stream. <a
-   href="#refsSDP">[SDP]</a></p></li>
-
-   <li><p>Let <var title="">hash-key</var> be the first 16 bytes of
-   the HMAC-SHA1 of the 16 <span>data UDP media stream hashing
-   salt</span> bytes keyed with the 16 <var title="">ice-key</var>
-   bytes. <a href="#refsHMAC">[HMAC]</a> <a
-   href="#refsSHA1">[SHA1]</a></p></li>
-
-   <li><p>Let <var title="">hash</var> be the first 16 bytes of
-   the <var title="">hashed masked message with nonce</var>.</p></li>
-
-   <li><p>Let <var title="">masked message with nonce</var> be all but
-   the first 16 bytes of <var title="">hashed masked message with
-   nonce</var>.</p></li>
-
-   <li><p>If <var title="">hash</var> does not equal the first 16
-   bytes of the HMAC-SHA1 of <var title="">masked message with
-   nonce</var> keyed with the 16 <var title="">hash-key</var> bytes,
-   abort these steps. <a href="#refsHMAC">[HMAC]</a> <a
-   href="#refsSHA1">[SHA1]</a></p></li>
-
-   <li><p>Let <var title="">nonce</var> be the first 16 bytes of the
-   <var title="">masked message with nonce</var>.</p></li>
-
-   <li><p>Let <var title="">masked message</var> be all but the first
-   16 bytes of <var title="">masked message with nonce</var>.</p></li>
-
-   <li><p>Let <var title="">mask-key</var> be the first 16 bytes of the
-   HMAC-SHA1 of the 16 <span>data UDP media stream masking salt</span>
-   bytes keyed with the 16 <var title="">ice-key</var> bytes. <a
-   href="#refsHMAC">[HMAC]</a> <a href="#refsSHA1">[SHA1]</a></p></li>
-
-   <li><p>Let <var title="">typed raw message</var> be the result of
-   decrypting <var title="">masked message</var> using AES-128-CTR
-   keyed with <var title="">mask-key</var> and using the 16 <var
-   title="">nonce</var> bytes as the initial counter value. <a
-   href="#refsAES128CTR">[AES128CTR]</a></p></li>
-
-   <li><p>Let <var title="">sequence number</var> be the result of
-   interpreting the first eight bytes of <var title="">typed raw
-   message</var> as a 64 bit big-endian integer.</p></li>
-
-   <li><p>If <var title="">sequence number</var> is less than the
-   <span>most recently received sequence number</span> then abort
-   these steps.</p></li>
-
-   <li><p>Let the <span>most recently received sequence number</span>
-   be <var title="">sequence number</var>.</p></li>
-
-   <li><p>If the ninth, tenth, eleventh, and twelfth bytes of <var
-   title="">typed raw message</var> are not 0x00, 0x00, 0x00, and 0x01
-   respectively, then abort these steps.</p></li>
-
-   <li><p>Let <var title="">raw message</var> be the byte string
-   consisting of all but the first twelve bytes of <var title="">typed
-   raw message</var>.</p></li>
-
-   <li><p>Let <var title="">message</var> be <var title="">raw
-   message</var> <span>decoded as UTF-8, with error
-   handling</span>.</p></li>
-
-   <li><p>Create an event that uses the <code>MessageEvent</code>
-   interface, with the name <code
-   title="event-message">message</code>, which does not bubble, is not
-   cancelable, has no default action, and has a <code
-   title="dom-MessageEvent-data">data</code> attribute initialized to
-   <var title="">message</var>, and <span>queue a task</span> to
-   dispatch the event at the <code>PeerConnection</code> object
-   responsible for this side of the <span>data UDP media
-   stream</span>.</p></li>
-
-  </ol>
-
-  <p class="note">Though described above as being computed for each
-  packet, the <var title="">ice-key</var>, <var
-  title="">hash-key</var>, and <var title="">mask-key</var> values can
-  be precomputed as soon as the <span><code>PeerConnection</code> ICE
-  Agent</span> is started.</p>
-
-  <div class="note">
-
-  <p>The format of a packet sent over a <span>data UDP media
-  stream</span>, as generated and parsed by the algorithms above, is
-  as follows. The total overhead per packet is thus 44 bytes, of which
-  four are intended for future extensions.</p>
-
-  <pre>
-                /'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.
-+--------------+ +---------------+ +-ENCRYPTED------------------------------------------------------------+ :
-| 16 byte hash | | 16 byte nonce | | [ 8 bytes of sequence number ] [ 4 bytes of frame type ] [ data... ] | :
-+--------------+ +---------------+ +----------------------------------------------------------------------+ :
-                \...........................................................................................'
-</pre>
-
-  </div>
-
-  <p>A <dfn>remotely-initiated data UDP media stream</dfn> is the
-  first "sendrecv" media stream in the initial offer whose media is
-  "<code title="">application</code>", whose transport protocol is
-  "<code title="">udp</code>", whose media format description is
-  "<code>application/html-peer-connection-data</code>", and whose label
-  attribute ("<code title="">a=label:</code>") has the value "<code
-  title="">data</code>".</p>
-
-  <p>The <span>task source</span> for this <span
-  title="concept-task">task</span> is the <span>networking task
-  source</span>.</p>
-
-  </div>
-
-
-  <h4>Security considerations</h4>
-
-  <p>The <span>data UDP media stream</span> packet format is designed
-  to protect against several obvious attacks. The data is made to
-  appear pseudo-random, so that it cannot be used in a cross-protocol
-  attack, even if somehow the stream were to be directed at an
-  unsuspecting remote host. The data is hashed in such a way that it
-  cannot be modified in transit. That data is encrypted so that it
-  cannot be read in transit.</p>
-
-  <p>These security mechanisms rely in part on a key that is
-  negotiated over the signalling channel; as such, the security is
-  only as strong as the security of the signaling channel. Authors are
-  encouraged to use TLS to protect the signalling channel and the
-  page(s) hosting the application, and are encouraged to secure the
-  host used to relay the signalling channel.</p>
-
-  <div class="impl">
-
-  <p>To avoid network traffic congestion and other denial of service
-  attacks based on traffic volume, user agents should apply
-  rate-limiting to <span title="data UDP media stream">data UDP media
-  streams</span>.</p>
-
-  </div>
-
-
-  <h3>Garbage collection</h3>
-
-  <p>A <code>Window</code> object <dfn
-  title="concept-PeerConnection-owner">has a strong reference</dfn> to
-  any <code>PeerConnection</code> objects created from the constructor
-  whose global object is that <code>Window</code> object.</p> <!-- we
-  could be less strict here, e.g. dropping the reference when there's
-  no way for an event to be fired because there's no event handlers
-  registered and there's no way for the remote peer to notice anything
-  because no media is streaming; or e.g. dropping the reference when
-  the object reaches the CLOSED state. But as dropping the reference
-  in those cases is black-box indistinguishable from keeping the
-  reference, I haven't bothered to work out the exact rules. If you do
-  change this, see the /unloading document cleanup steps/. -->
-
-
-  <h3>Event definitions</h3>
-
-  <p>The <code title="event-MediaStream-addstream">addstream</code> and
-  <code title="event-MediaStream-removestream">removestream</code> events
-  use the <code>MediaStreamEvent</code> interface:</p>
-
-  <pre class="idl">[Constructor(DOMString type, optional <span>MediaStreamEventInit</span> eventInitDict)]
-interface <dfn>MediaStreamEvent</dfn> : <span>Event</span> {
-  readonly attribute <span>MediaStream</span>? <span title="dom-MediaStreamEvent-stream">stream</span>;
-};
-
-dictionary <dfn>MediaStreamEventInit</dfn> : <span>EventInit</span> {
-  DOMString <span>MediaStream</span>? stream;
-};</pre>
-
-  <div class="impl">
-
-  <p>The <dfn
-  title="dom-MediaStreamEvent-stream"><code>stream</code></dfn>
-  attribute must return the value it was initialized to. When the
-  object is created, this attribute must be initialized to null. It
-  represents the <code>MediaStream</code> object associated with the
-  event.</p>
-
-  <p><dfn title="fire a stream event">Firing a stream event named <var
-  title="">e</var></dfn> with a <code>MediaStream</code> <var
-  title="">stream</var> means that an event with the name <var
-  title="">e</var>, which does not bubble (except where otherwise
-  stated) and is not cancelable (except where otherwise stated), and
-  which uses the <code>MediaStreamEvent</code> interface with the
-  <code title="dom-MediaStreamEvent-stream">stream</code> attribute
-  initialized to <var title="">stream</var>, must be created and
-  dispatched at the given target.</p>
-
-  </div>
-
-
-  <h3 id="mediastreamevents">Event Summary</h3>
-
-  <!--END dev-html--><p><i>This section is non-normative.</i></p><!--START dev-html-->
-
-  <p>The following event fires on <code>MediaStream</code> objects:</p>
-
-  <table>
-   <thead>
-    <tr>
-     <th>Event name
-     <th>Interface
-     <th>Fired when...
-
-   <tbody>
-    <tr>
-     <td><dfn title="event-MediaStream-ended"><code>ended</code></dfn>
-     <td><code>Event</code>
-     <td>The <code>MediaStream</code> object will no longer stream any data, either because the user revoked the permissions, or because the source device has been ejected, or because the remote peer stopped sending data, or because the <code title="dom-MediaStream-stop">stop()</code> method was invoked.
-
-  </table>
-
-
-  <p>The following events fire on <code>PeerConnection</code> objects:</p>
-
-  <table>
-   <thead>
-    <tr>
-     <th>Event name
-     <th>Interface
-     <th>Fired when...
-
-   <tbody>
-
-    <tr>
-     <td><dfn title="event-MediaStream-connecting"><code>connecting</code></dfn>
-     <td><code>Event</code>
-     <td>The ICE Agent has begun negotiating with the peer. This can happen multiple times during the lifetime of the <code>PeerConnection</code> object.
-
-    <tr>
-     <td><dfn title="event-MediaStream-open"><code>open</code></dfn>
-     <td><code>Event</code>
-     <td>The ICE Agent has finished negotiating with the peer.
-
-<!--
-    <tr>
-     <td><dfn title="event-MediaStream-error"><code>error</code></dfn>
-     <td><code>Event</code>
-     <td>
-
-    <tr>
-     <td><dfn title="event-MediaStream-close"><code>close</code></dfn>
-     <td><code>Event</code>
-     <td>The <code title="dom-PeerConnection-close">close()</code> method was called.
--->
-
-    <tr>
-     <td><dfn title="event-MediaStream-message"><code>message</code></dfn>
-     <td><code>MessageEvent</code>
-     <td>A <span>data UDP media stream</span> message was received.
-
-    <tr>
-     <td><dfn title="event-MediaStream-addstream"><code>addstream</code></dfn>
-     <td><code>MediaStreamEvent</code>
-     <td>A new stream has been added to the <code title="dom-PeerConnection-remoteStreams">remoteStreams</code> array.
-
-    <tr>
-     <td><dfn title="event-MediaStream-removestream"><code>removestream</code></dfn>
-     <td><code>MediaStreamEvent</code>
-     <td>A stream has been removed from the <code title="dom-PeerConnection-remoteStreams">remoteStreams</code> array.
-
-  </table>
-
-</div>
-
-<!--END rtc--><!--START w3c-html--><!--PEERCONNECTION-->
-<!--END html--><!--END dev-html--><!--END w3c-html-->
-
-
-
-
-
-
   <div data-component="Web Workers (editor: Ian Hickson)"><!--TOPIC:Web Workers-->
 
   <h2 id="workers">Web workers</h2>
@@ -89378,14 +86704,14 @@
 
 
 
-<!--END complete--><!--END epub-->
+<!--END complete-->
   <!--FIXUP whatwg-workers +1-->
   <!--FIXUP workers +1-->
   <!--BOILERPLATE middle-w3c-api-intro-->
   <!--BOILERPLATE middle-w3c-js-disclaimer-->
   <!--FIXUP whatwg-workers -1-->
   <!--FIXUP workers -1-->
-<!--START complete--><!--START epub-->
+<!--START complete-->
 
   <h3>Infrastructure</h3>
 
@@ -89397,11 +86723,11 @@
   created any script running in the same <span>origin</span> can
   obtain a reference to that worker and communicate with it.</p>
 
-  <!--END complete--><!--END epub-->
+  <!--END complete-->
   <h4>Dependencies</h4>
   <p>The <dfn><code>MessagePort</code></dfn> interface is defined in
   the HTML specification. <a href="#refsHTML">[HTML]</a></p>
-  <!--START complete--><!--START epub-->
+  <!--START complete-->
 
 
   <h4>The global scope</h4>
@@ -89747,9 +87073,9 @@
     <p>If the attempt succeeds, then let <var title="">source</var> be
     the script resource <span>decoded as UTF-8, with error
     handling</span>.
-    <!--END complete--><!--END epub-->
+    <!--END complete-->
     <a href="#refsHTML">[HTML]</a>
-    <!--START complete--><!--START epub-->
+    <!--START complete-->
     </p>
 
     <p>Let <var title="">language</var> be JavaScript.</p>
@@ -90029,18 +87355,18 @@
   <span>origin</span> of the scripts running in the worker, using the
   <code>WorkerGlobalScope</code> object's <code
   title="handler-WorkerGlobalScope-onerror">onerror</code> attribute.
-  <!--END complete--><!--END epub-->
+  <!--END complete-->
   <a href="#refsHTML">[HTML]</a>
-  <!--START complete--><!--START epub-->
+  <!--START complete-->
   </p>
 
   <p>For shared workers, if the error is still <i
   title="concept-error-nothandled">not handled</i> afterwards, or if
   the error occurred while handling a previous script error, the error
   may be reported to the user.
-  <!--END complete--><!--END epub-->
+  <!--END complete-->
   <a href="#refsHTML">[HTML]</a>
-  <!--START complete--><!--START epub-->
+  <!--START complete-->
   </p>
 
   <p>For dedicated workers, if the error is still <i
@@ -90599,11 +87925,11 @@
 <span>WorkerUtils</span> implements <span>WindowTimers</span>;
 <span>WorkerUtils</span> implements <span>WindowBase64</span>;</pre>
 
-  <!--END complete--><!--END epub-->
+  <!--END complete-->
   <p>The <code>WindowTimers</code> and <code>WindowBase64</code>
   interfaces are defined in the HTML specification. <a
   href="#refsHTML">[HTML]</a></p>
-  <!--START complete--><!--START epub-->
+  <!--START complete-->
 
   <p>The DOM APIs (<code>Node</code> objects, <code>Document</code>
   objects, etc) are not available to workers in this version of this
@@ -90666,9 +87992,9 @@
       <p>If the attempt succeeds, then let <var title="">source</var> be
       the script resource <span>decoded as UTF-8, with error
       handling</span>.
-      <!--END complete--><!--END epub-->
+      <!--END complete-->
       <a href="#refsHTML">[HTML]</a>
-      <!--START complete--><!--START epub-->
+      <!--START complete-->
       </p>
 
       <p>Let <var title="">language</var> be JavaScript.</p>
@@ -90735,9 +88061,9 @@
   <p>Objects implementing the <code>WorkerNavigator</code> interface
   also implement the <code>NavigatorID</code> and
   <code>NavigatorOnLine</code> interfaces.
-  <!--END complete--><!--END epub-->
+  <!--END complete-->
   <a href="#refsHTML">[HTML]</a>
-  <!--START complete--><!--START epub-->
+  <!--START complete-->
   </p>
 
   <p>This <code>WorkerNavigator</code> interface must not exist if the
@@ -90825,9 +88151,9 @@
   title="dom-WorkerLocation-href">href</code> attribute), and the
   <span title="concept-uda-setter">common setter action</span> being a
   no-op, since the attributes are defined to be readonly.
-  <!--END complete--><!--END epub-->
+  <!--END complete-->
   <a href="#refsHTML">[HTML]</a>
-  <!--START complete--><!--START epub-->
+  <!--START complete-->
   </p>
 
   <p>The <code>WorkerLocation</code> interface must not exist if the
@@ -90842,7 +88168,7 @@
   </div><!--data-component-->
 
 
-<!--START html--><!--START dev-html--><!--START w3c-html-->
+<!--START dev-html--><!--START w3c-html-->
 <!--END w3c-html--><!--POSTMSG-->
 
   <h2 id="comms">Communication</h2>
@@ -90850,11 +88176,11 @@
   <div data-component="Web Messaging (editor: Ian Hickson)"><!--TOPIC:DOM APIs-->
 
 <!--START postmsg-->
-<!--END complete--><!--END epub--><!--END html--><!--END dev-html-->
+<!--END complete--><!--END dev-html-->
   <!--FIXUP postmsg +1-->
   <!--BOILERPLATE middle-w3c-api-intro-->
   <!--FIXUP postmsg -1-->
-<!--START complete--><!--START epub--><!--START html--><!--START dev-html-->
+<!--START complete--><!--START dev-html-->
 
   <h3>Event definitions</h3>
 
@@ -90862,10 +88188,10 @@
   sockets</span>, <span>cross-document messaging</span>, and
   <span>channel messaging</span> use the <dfn
   title="event-message"><code>message</code></dfn> event.
-  <!--END complete--><!--END epub-->
+  <!--END complete-->
   <a href="#refsEVENTSOURCE">[EVENTSOURCE]</a>
   <a href="#refsWEBSOCKET">[WEBSOCKET]</a>
-  <!--START complete--><!--START epub-->
+  <!--START complete-->
   </p>
 
   <p>The following interface is defined for this event:</p>
@@ -90985,7 +88311,7 @@
   </div><!--data-component-->
 
 <!--START w3c-html--><!--POSTMSG-->
-<!--END html--><!--END dev-html--><!--END w3c-html-->
+<!--END dev-html--><!--END w3c-html-->
 
 
   <h3 id="server-sent-events"><dfn>Server-sent events</dfn></h3>
@@ -91064,9 +88390,9 @@
   discussed further in the section below on <a
   href="#eventsource-push">connectionless push</a>.</p>
 
-<!--END complete--><!--END epub-->
+<!--END complete-->
   <!--BOILERPLATE middle-w3c-api-intro-->
-<!--START complete--><!--START epub-->
+<!--START complete-->
 
   <h4>The <code>EventSource</code> interface</h4>
 
@@ -91105,9 +88431,9 @@
    <span>URL</span> specified in the first argument, relative to the
    <span>entry script</span>'s <span title="script's base URL">base
    URL</span>.
-   <!--END complete--><!--END epub-->
+   <!--END complete-->
    <a href="#refsHTML">[HTML]</a>
-   <!--START complete--><!--START epub-->
+   <!--START complete-->
    </p></li>
 
    <li><p>If the previous step failed, then throw a
@@ -91486,9 +88812,9 @@
 
   <p>Streams must be <span>decoded as UTF-8, with error
   handling</span>.
-  <!--END complete--><!--END epub-->
+  <!--END complete-->
   <a href="#refsHTML">[HTML]</a>
-  <!--START complete--><!--START epub-->
+  <!--START complete-->
   </p>
 
   <p>One leading U+FEFF BYTE ORDER MARK character must be ignored if
@@ -91823,9 +89149,9 @@
   functionality on a per-page basis, or by sharing a single
   <code>EventSource</code> object using a <span
   title="SharedWorkerGlobalScope">shared worker</span>.
-  <!--END complete--><!--END epub-->
+  <!--END complete-->
   <a href="#refsWEBWORKERS">[WEBWORKERS]</a>
-  <!--START complete--><!--START epub-->
+  <!--START complete-->
   </p>
 
 
@@ -92091,9 +89417,9 @@
   implement an IRC client without proxying messages through a custom
   server.</p>
 
-<!--END complete--><!--END epub-->
+<!--END complete-->
   <!--BOILERPLATE middle-w3c-api-intro-->
-<!--START complete--><!--START epub-->
+<!--START complete-->
 
   <h4>The <code>WebSocket</code> interface</h4>
 
@@ -92669,9 +89995,9 @@
     <code>MessageEvent</code> interface, with the event name <code
     title="event-message">message</code>, which does not bubble, is
     not cancelable, and has no default action.
-    <!--END complete--><!--END epub-->
+    <!--END complete-->
     <a href="#refsHTML">[HTML]</a>
-    <!--START complete--><!--START epub-->
+    <!--START complete-->
     </p>
 
    </li>
@@ -93009,7 +90335,7 @@
 
   </div><!--data-component-->
 
-<!--START html--><!--START dev-html--><!--START w3c-html-->
+<!--START dev-html--><!--START w3c-html-->
 <!--END w3c-html--><!--POSTMSG-->
 
 
@@ -93357,9 +90683,9 @@
     <code>WindowProxy</code> object, and the <code
     title="dom-MessageEvent-ports">ports</code> attribute must be
     initialized to the <var title="">new ports</var> array.
-    <!--END complete--><!--END epub-->
+    <!--END complete-->
     <a href="#refsHTML">[HTML]</a>
-    <!--START complete--><!--START epub-->
+    <!--START complete-->
     </p> <!-- invariant: the global object is always a Window if the
     script can see this method -->
 
@@ -93911,9 +91237,9 @@
    interface, with the name <code
    title="event-message">message</code>, which does not bubble, is not
    cancelable, and has no default action.
-   <!--END complete--><!--END epub-->
+   <!--END complete-->
    <a href="#refsHTML">[HTML]</a>
-   <!--START complete--><!--START epub-->
+   <!--START complete-->
    </p></li>
 
    <li><p>Let the <code title="dom-MessageEvent-data">data</code>
@@ -93972,9 +91298,9 @@
    interface, with the name <code
    title="event-message">message</code>, which does not bubble, is not
    cancelable, and has no default action.
-   <!--END complete--><!--END epub-->
+   <!--END complete-->
    <a href="#refsHTML">[HTML]</a>
-   <!--START complete--><!--START epub-->
+   <!--START complete-->
    </p></li>
 
    <li><p>Let the <code title="dom-MessageEvent-data">data</code>
@@ -94089,7 +91415,7 @@
   </div><!--data-component-->
 
 <!--START w3c-html--><!--POSTMSG-->
-<!--END html--><!--END dev-html--><!--END w3c-html-->
+<!--END dev-html--><!--END w3c-html-->
 
 
 
@@ -94197,10 +91523,10 @@
   <p>Each site has its own separate storage area.</p>
 
 
-<!--END complete--><!--END epub-->
+<!--END complete-->
   <!--BOILERPLATE middle-w3c-api-intro-->
   <!--BOILERPLATE middle-w3c-js-disclaimer-->
-<!--START complete--><!--START epub-->
+<!--START complete-->
 
 
   <h4 id="storage">The API</h4>
@@ -94845,7 +92171,7 @@
 
 
 
-<!--START html--><!--START dev-html--><!--START w3c-html--><!--TOPIC:HTML Syntax and Parsing-->
+<!--START dev-html--><!--START w3c-html--><!--TOPIC:HTML Syntax and Parsing-->
 
   <h2 id="syntax"><dfn>The HTML syntax</dfn></h2>
 
@@ -106955,7 +104281,7 @@
   <p>Any subtitles or captions are expected to be overlayed directly
   on top of their <code>video</code> element, as defined by the
   relevant rendering rules; for <span>WebVTT</span>, those are the
-  <span>WebVTT cue text rendering rules</span> defined below.</p>
+  <span>WebVTT cue text rendering rules</span>. <a href="#refsWEBVTT">[WEBVTT]</a></p>
 
   <p>When the user agent starts <span title="expose a user interface
   to the user">exposing a user interface</span> for a
@@ -106967,7 +104293,7 @@
   track showing by default">showing by default</span> (e.g., for <span
   title="text track">text tracks</span> based on
   <span>WebVTT</span>, the <span>rules for updating the display of
-  WebVTT text tracks</span>).</p>
+  WebVTT text tracks</span>). <a href="#refsWEBVTT">[WEBVTT]</a></p>
 
   <p class="note">Resizing <code>video</code> and <code>canvas</code>
   elements does not interrupt video playback or clear the canvas.</p>
@@ -106984,18 +104310,12 @@
   </div>
 
 
-<!--TOPIC:Video Text Tracks-->
-  <div class="impl">
+<!--END w3c-html--><!--END complete--><!--END dev-html-->
+<!--START webvtt--><!--TOPIC:Video Text Tracks-->
+<div data-component="other Hixie drafts (editor: Ian Hickson)">
 
-  <h4>Timed text tracks</h4>
+  <h3><dfn>WebVTT cue text rendering rules</dfn></h3>
 
-  <p class="note">This section is intended to be moved to its own CSS
-  module once an editor is found to run with it.</p>
-
-<!--START webvtt-->
-
-  <h5><dfn>WebVTT cue text rendering rules</dfn></h5>
-
   <p>The <dfn>rules for updating the display of WebVTT text
   tracks</dfn> render the <span title="text track">text
   tracks</span> of a <span>media element</span> (specifically, a
@@ -107661,7 +104981,7 @@
   entirely.</p>
 
 
-  <h5>Applying CSS properties to <span title="WebVTT Node Object">WebVTT Node Objects</span></h5>
+  <h4>Applying CSS properties to <span title="WebVTT Node Object">WebVTT Node Objects</span></h4>
 
   <p>When following the <span>rules for updating the display of WebVTT
   text tracks</span>, user agents must set properties of <span
@@ -107748,7 +105068,7 @@
   values.</p>
 
 
-  <h5>CSS extensions</h5>
+  <h4>CSS extensions</h4>
 
   <p>When a user agent is rendering one or more <span title="text
   track cue">text track cues</span> according to the <span>WebVTT cue
@@ -107781,7 +105101,7 @@
   title="future-pseudo-class">':future'</span> pseudo-classes.</p>
 
 
-  <h6>The '::cue' pseudo-element</h6>
+  <h5>The '::cue' pseudo-element</h5>
 
   <p>The '<dfn title="pseudo-cue">::cue</dfn>' pseudo-element (with no
   argument) matches any <span>List of WebVTT Node Objects</span>
@@ -107959,7 +105279,7 @@
   the <span>WebVTT cue background box</span>.</p>
 
 
-  <h6>The ':past' and ':future' pseudo-classes</h6>
+  <h5>The ':past' and ':future' pseudo-classes</h5>
 
   <p>The <span title="past-pseudo-class">':past'</span> and <span
   title="future-pseudo-class">':future'</span> pseudo-classes
@@ -107992,13 +105312,11 @@
   <i>matched element</i>, entirely before the <span>WebVTT Node
   Object</span> <var title="">c</var>.</p>
 
-  </div>
+</div>
+<!--END webvtt-->
+<!--START w3c-html--><!--START complete--><!--START dev-html-->
 
-<!--END webvtt--><!--TTVTT-->
 
-
-
-
 <!--TOPIC:Rendering-->
   <div class="impl">
 
@@ -111413,13 +108731,13 @@
   </div>
 
 
-<!--START microdata-->
+<!--START microdata--><!--START webvtt-->
 
   <h2 id="iana">IANA considerations</h2>
 
   <!-- http://www.w3.org/2002/06/registering-mediatype.html -->
 
-<!--END microdata-->
+<!--END microdata--><!--END webvtt-->
 
   <h3><dfn><code>text/html</code></dfn></h3>
 
@@ -111936,103 +109254,11 @@
   <code>text/ping</code> resources.</p>
 <!--START w3c-html--><!--PING-->
 
-<!--END w3c-html--><!--TTVTT-->
-<div data-component="other Hixie drafts (editor: Ian Hickson)"><!--TOPIC:Video Text Tracks-->
-  <h3><dfn><code>text/vtt</code></dfn></h3>
-
-  <p>This registration is for community review and will be submitted
-  to the IESG for review, approval, and registration with IANA.</p>
-
-  <!--
-   To: ietf-types@iana.org
-   Subject: Registration of media type text/cues
-  -->
-
-  <dl>
-   <dt>Type name:</dt>
-   <dd>text</dd>
-   <dt>Subtype name:</dt>
-   <dd>vtt</dd>
-   <dt>Required parameters:</dt>
-   <dd>No parameters</dd>
-   <dt>Optional parameters:</dt>
-   <dd>No parameters</dd>
-   <dt>Encoding considerations:</dt>
-   <dd>8bit (always UTF-8)</dd>
-<!--ADD-TOPIC:Security-->
-   <dt>Security considerations:</dt>
-   <dd>
-    <p>Text track files themselves pose no immediate risk unless
-    sensitive information is included within the
-    data. Implementations, however, are required to follow specific
-    rules when processing text tracks, to ensure that certain
-    origin-based restrictions are honored. Failure to correctly
-    implement these rules can result in information leakage,
-    cross-site scripting attacks, and the like.</p>
-   </dd>
-<!--REMOVE-TOPIC:Security-->
-   <dt>Interoperability considerations:</dt>
-   <dd>
-    <p>Rules for processing both conforming and non-conforming content
-    are defined in this specification.</p>
-    <p>Some legacy files violate the requirement to use UTF-8.</p>
-   </dd>
-   <dt>Published specification:</dt>
-   <dd>
-    This document is the relevant specification.
-   </dd>
-   <dt>Applications that use this media type:</dt>
-   <dd>
-    Web browsers and other video players.
-   </dd>
-   <dt>Additional information:</dt>
-   <dd>
-    <dl>
-     <dt>Magic number(s):</dt>
-     <dd>
-      <p>WebVTT files all begin with one of the following byte sequences:</p>
-      <ul class="brief">
-       <li> EF BB BF 57 45 42 56 54 54 0A
-       <li> EF BB BF 57 45 42 56 54 54 0D
-       <li> EF BB BF 57 45 42 56 54 54 20
-       <li> EF BB BF 57 45 42 56 54 54 09
-       <li>          57 45 42 56 54 54 0A
-       <li>          57 45 42 56 54 54 0D
-       <li>          57 45 42 56 54 54 20
-       <li>          57 45 42 56 54 54 09
-      </ul>
-      <p class="note">(An optional UTF-8 BOM, the ASCII string "<code title="">WEBVTT</code>", and finally a space, tab, or line break.)
-     </dd>
-     <dt>File extension(s):</dt>
-     <dd>"<code title="">vtt</code>"</dd>
-     <dt>Macintosh file type code(s):</dt>
-     <dd>No specific Macintosh file type codes are recommended for this type.</dd>
-    </dl>
-   </dd>
-   <dt>Person &amp; email address to contact for further information:</dt>
-   <dd>Ian Hickson &lt;ian@hixie.ch></dd>
-   <dt>Intended usage:</dt>
-   <dd>Common</dd>
-   <dt>Restrictions on usage:</dt>
-   <dd>No restrictions apply.</dd>
-   <dt>Author:</dt>
-   <dd>Ian Hickson &lt;ian@hixie.ch></dd>
-   <dt>Change controller:</dt>
-   <dd>W3C</dd>
-  </dl>
-
-  <p>Fragment identifiers have no meaning with
-  <code>text/vtt</code> resources.</p>
-</div>
-<!--START w3c-html--><!--TTVTT--><!--TOPIC:HTML-->
-
-<!--END w3c-html--><!--MD--><!--START microdata-->
-
-<!--END complete--><!--END epub--><!--END html--><!--END dev-html-->
-  <h4><dfn><code>application/microdata+json</code></dfn></h4>
-<!--START complete--><!--START epub--><!--START html--><!--START dev-html--><!--END microdata-->
+<!--END w3c-html--><!--MD-->
+<!--START microdata--><!--TOPIC:Microdata-->
+<!--FIXUP microdata +1-->
   <h3><dfn><code>application/microdata+json</code></dfn></h3>
-<!--START microdata-->
+<!--FIXUP microdata -1-->
 
   <p>This registration is for community review and will be submitted
   to the IESG for review, approval, and registration with IANA.</p>
@@ -112108,56 +109334,50 @@
   semantics as when used with <code>application/json</code> (namely,
   at the time of writing, no semantics at all). <a
   href="#refsJSON">[JSON]</a></p>
+<!--END microdata-->
+<!--START w3c-html--><!--MD-->
 
-<!--END microdata--><!--START w3c-html--><!--MD-->
+<!--END complete--><!--END w3c-html--><!--END dev-html-->
+<!--START webvtt-->
+<!--TOPIC:Video Text Tracks-->
+  <h3><dfn><code>text/vtt</code></dfn></h3>
 
-
-<!--START rtc--><!--END w3c-html--><!--PEERCONNECTION-->
-  <h3><dfn><code>application/html-peer-connection-data</code></dfn></h3>
-
   <p>This registration is for community review and will be submitted
   to the IESG for review, approval, and registration with IANA.</p>
 
   <!--
    To: ietf-types@iana.org
-   Subject: Registration of media type application/html-peer-connection-data
+   Subject: Registration of media type text/cues
   -->
 
   <dl>
    <dt>Type name:</dt>
-   <dd>application</dd>
+   <dd>text</dd>
    <dt>Subtype name:</dt>
-   <dd>html-peer-connection-data</dd>
+   <dd>vtt</dd>
    <dt>Required parameters:</dt>
-   <dd>No required parameters</dd>
+   <dd>No parameters</dd>
    <dt>Optional parameters:</dt>
-   <dd>No optional parameters</dd>
+   <dd>No parameters</dd>
    <dt>Encoding considerations:</dt>
-   <dd>binary (this MIME type defines a binary protocol format which uses UTF-8 for text encoding)</dd>
+   <dd>8bit (always UTF-8)</dd>
+<!--ADD-TOPIC:Security-->
    <dt>Security considerations:</dt>
    <dd>
-
-    <p>This format is used for encoding UDP packets transmitted by
-    potentially hostile Web page content via a trusted user agent to a
-    destination selected by a potentially hostile remote server. To
-    prevent this mechanism from being abused for cross-protocol
-    attacks, all the data in these packets is masked so as to appear
-    to be random noise. The intent of this masking is to reduce the
-    potential attack scenarios to those already possible
-    previously.</p>
-
-    <p>However, this feature still allows random data to be sent to
-    destinations that might not normally have been able to receive
-    them, such as to hosts within the victim's intranet. If a service
-    within such an intranet cannot handle receiving UDP packets
-    containing random noise, it might be vulnerable to attack from
-    this feature.</p>
-
+    <p>Text track files themselves pose no immediate risk unless
+    sensitive information is included within the
+    data. Implementations, however, are required to follow specific
+    rules when processing text tracks, to ensure that certain
+    origin-based restrictions are honored. Failure to correctly
+    implement these rules can result in information leakage,
+    cross-site scripting attacks, and the like.</p>
    </dd>
+<!--REMOVE-TOPIC:Security-->
    <dt>Interoperability considerations:</dt>
    <dd>
-    Rules for processing both conforming and non-conforming content
-    are defined in this specification.
+    <p>Rules for processing both conforming and non-conforming content
+    are defined in this specification.</p>
+    <p>Some legacy files violate the requirement to use UTF-8.</p>
    </dd>
    <dt>Published specification:</dt>
    <dd>
@@ -112165,19 +109385,30 @@
    </dd>
    <dt>Applications that use this media type:</dt>
    <dd>
-    This type is only intended for use with SDP. <a href="#refsSDP">[SDP]</a>
+    Web browsers and other video players.
    </dd>
    <dt>Additional information:</dt>
    <dd>
     <dl>
      <dt>Magic number(s):</dt>
-     <dd>No sequence of bytes can uniquely identify data in this
-     format, as all data in this format is intentionally masked to
-     avoid cross-protocol attacks.</dd>
+     <dd>
+      <p>WebVTT files all begin with one of the following byte sequences:</p>
+      <ul class="brief">
+       <li> EF BB BF 57 45 42 56 54 54 0A
+       <li> EF BB BF 57 45 42 56 54 54 0D
+       <li> EF BB BF 57 45 42 56 54 54 20
+       <li> EF BB BF 57 45 42 56 54 54 09
+       <li>          57 45 42 56 54 54 0A
+       <li>          57 45 42 56 54 54 0D
+       <li>          57 45 42 56 54 54 20
+       <li>          57 45 42 56 54 54 09
+      </ul>
+      <p class="note">(An optional UTF-8 BOM, the ASCII string "<code title="">WEBVTT</code>", and finally a space, tab, or line break.)
+     </dd>
      <dt>File extension(s):</dt>
-     <dd>This format is not for use with files.</dd>
+     <dd>"<code title="">vtt</code>"</dd>
      <dt>Macintosh file type code(s):</dt>
-     <dd>This format is not for use with files.</dd>
+     <dd>No specific Macintosh file type codes are recommended for this type.</dd>
     </dl>
    </dd>
    <dt>Person &amp; email address to contact for further information:</dt>
@@ -112192,13 +109423,13 @@
    <dd>W3C</dd>
   </dl>
 
-  <p>Fragment identifiers cannot be used with
-  <code>application/html-peer-connection-data</code> as URLs cannot be
-  used to identify streams that use this format.</p>
-<!--END rtc--><!--START w3c-html--><!--PEERCONNECTION-->
+  <p>Fragment identifiers have no meaning with
+  <code>text/vtt</code> resources.</p>
+<!--END webvtt-->
+<!--START complete--><!--START w3c-html--><!--START dev-html-->
 
-
 <!--END w3c-html--><!--PING-->
+<!--TOPIC:HTML-->
   <h3><dfn title="http-ping-from"><code>Ping-From</code></dfn></h3>
 
   <p>This section describes a header field for registration in the
@@ -115978,7 +113209,7 @@
 
   </table>
 
-<!--END complete--><!--END epub--><!-- (only has events from HTML5) -->
+<!--END complete--><!-- (only has events from HTML5) -->
 
   <h3 class="no-num">Events</h3>
 
@@ -116131,19 +113362,17 @@
   </table>
 
   <p class="note">See also <a href="#mediaevents">media element
-  events</a>, <a href="#mediasteamevents"><code>MediaStream</code> and
-  <code>PeerConnection</code> events</a>, <a
-  href="#appcacheevents">application cache events</a>, and <a
-  href="#dndevents">drag-and-drop events</a>.</p>
+  events</a>, <a href="#appcacheevents">application cache events</a>,
+  and <a href="#dndevents">drag-and-drop events</a>.</p>
 
-<!--END w3c-html--><!--END html--><!--END dev-html-->
+<!--END w3c-html--><!--END dev-html-->
 
 
-<!--START complete--><!--START epub--><!--START html--><!--START dev-html-->
+<!--START complete--><!--START dev-html-->
 <!--START html-device--><!--START microdata--><!--START 2dcontext--><!--START postmsg--><!--START w3c-html-->
 <!--START websocket-api--><!--START storage--><!--START eventsource--><!--START workers-->
 <!--START whatwg-workers--><!--START vocabs--><!--START vCard--><!--START vEvent--><!--START work-->
-<!--START webvtt--><!--START rtc-->
+<!--START webvtt-->
 
   <h2 class="no-num" id="references">References</h2><!--REFS-->
 
@@ -116429,11 +113658,13 @@
    href="http://www.w3.org/TR/html4/">HTML 4.01
    Specification</a></cite>, D. Raggett, A. Le Hors, I. Jacobs.  W3C.</dd>
 
+<!--END complete-->
    <dt id="refsHTML">[HTML]</dt>
    <dd><cite><a
    href="http://www.whatwg.org/specs/web-apps/current-work/">HTML</a></cite>,
    I. Hickson. WHATWG.</dd>
 
+<!--END dev-html-->
    <dt id="refsHTML5">[HTML5]</dt>
    <dd>
 <!--END vocabs--><!--END vCard--><!--END vEvent--><!--END work--><!--END websocket-api--><!--END storage--><!--END eventsource--><!--END whatwg-workers--><!--END workers--><!--END html-device--><!--END microdata--><!--END 2dcontext--><!--END postmsg--><!--END w3c-html-->
@@ -116441,6 +113672,7 @@
 <!--START html-device--><!--START microdata--><!--START 2dcontext--><!--START postmsg--><!--START w3c-html--><!--START websocket-api--><!--START storage--><!--START eventsource--><!--START whatwg-workers--><!--START workers--><!--START vocabs--><!--START vCard--><!--START vEvent--><!--START work-->
    <cite><a href="http://dev.w3.org/html5/spec/">HTML5</a></cite>,
    I. Hickson. W3C.</dd>
+<!--START complete--><!--START dev-html-->
 
    <dt id="refsHTMLALTTECHS">[HTMLALTTECHS]</dt>
    <dd>(Non-normative) <cite><a href="http://dev.w3.org/html5/alt-techniques/">HTML5: Techniques for providing useful text alternatives</a></cite>, S. Faulkner. W3C.</dd>
@@ -116908,25 +114140,18 @@
    Linking</a></cite>, M. Nottingham. IETF.</dd>
 
    <dt id="refsWEBSOCKET">[WEBSOCKET]</dt>
-   <!--
-   <dd><cite><a href="http://www.w3.org/TR/websockets/">The WebSocket
-   API</a></cite>, I. Hickson. W3C.</dd>
-   -->
-   <dd><cite><a href="http://dev.w3.org/html5/websockets/">The WebSocket
-   API</a></cite>, I. Hickson. W3C.</dd>
+   <dd><cite><a href="http://dev.w3.org/html5/websockets/">The WebSocket API</a></cite>, I. Hickson. W3C.</dd>
 
    <dt id="refsWEBSTORAGE">[WEBSTORAGE]</dt>
-   <dd><cite><a href="http://dev.w3.org/html5/webstorage/">Web
-   Storage</a></cite>, I. Hickson. W3C.</dd>
+   <dd><cite><a href="http://dev.w3.org/html5/webstorage/">Web Storage</a></cite>, I. Hickson. W3C.</dd>
 
+<!--END webvtt-->
+   <dt id="refsWEBVTT">[WEBWORKERS]</dt>
+   <dd><cite><a href="http://dev.w3.org/html5/webvtt/">WebVTT</a></cite>, I. Hickson. W3C.</dd>
+<!--START webvtt-->
+
    <dt id="refsWEBWORKERS">[WEBWORKERS]</dt>
-   <!--
-   <dd><cite><a
-   href="http://www.w3.org/TR/webworkers/">Workers</a></cite>,
-   I. Hickson. W3C.</dd>
-   -->
-   <dd><cite><a href="http://dev.w3.org/html5/workers/">Web
-   Workers</a></cite>, I. Hickson. W3C.</dd>
+   <dd><cite><a href="http://dev.w3.org/html5/workers/">Web Workers</a></cite>, I. Hickson. W3C.</dd>
 
    <dt id="refsWHATWGBLOG">[WHATWGBLOG]</dt>
    <dd><cite><a href="http://blog.whatwg.org/">The WHATWG Blog</a></cite>. WHATWG.</dd>
@@ -117016,7 +114241,7 @@
    <dd>(Non-normative) <cite><a href=""></a></cite>, . .</dd>
 -->
 
-<!--END complete--><!--END epub-->
+<!--END complete-->
 
    <dt id="refsRFC2109">[RFC2109]</dt>
    <dd><cite><a href="http://tools.ietf.org/html/rfc2109">HTTP State
@@ -117038,13 +114263,13 @@
    BNF for Syntax Specifications: ABNF</a></cite>, D. Crocker,
    P. Overell. IETF.</dd>
 
-<!--START complete--><!--START epub-->
+<!--START complete-->
 
 <!--REFERENCES OFF-->
   </dl>
 
 
-<!--END webvtt--><!--END rtc-->
+<!--END webvtt-->
 <!--END whatwg-workers--><!--END vocabs--><!--END vCard--><!--END vEvent--><!--END work-->
 <!--END websocket-api--><!--END storage--><!--END eventsource--><!--END workers-->
 <!--END html-device--><!--END microdata--><!--END 2dcontext--><!--END postmsg--><!--END w3c-html-->
@@ -117659,11 +114884,6 @@
   microdata feature.</p>
 <!--START w3c-html--><!--MD-->
 
-  <p>Thanks to the SubRip community, including in particular Zuggy and
-  ai4spam, for their work on the SubRip software program whose SRT
-  file format was used as the basis for the WebVTT text track file
-  format.</p>
-
   <div class="impl">
 
   <p>Special thanks and $10,000 to David Hyatt who came up with a
@@ -117676,7 +114896,7 @@
   <p>Thanks to the many sources that provided inspiration for the
   examples used in the specification.</p>
 
-  <!--END html--><!--END dev-html--><!--END w3c-html-->
+  <!--END dev-html--><!--END w3c-html-->
 
   <div itemscope itemtype="http://n.whatwg.org/work">
    <p>The image in the introduction is based on <a itemprop="work" href="http://www.flickr.com/photos/wonderlane/2986252088/">a photo</a>
@@ -117684,7 +114904,7 @@
    (<a itemprop="license" href="http://creativecommons.org/licenses/by/2.0/">CC BY 2.0</a>)
   </div>
 
-  <!--START html--><!--START dev-html--><!--START w3c-html-->
+  <!--START dev-html--><!--START w3c-html-->
 
   <p>Thanks also to the Microsoft blogging community for some ideas,
   to the attendees of the W3C Workshop on Web Applications and
@@ -117843,10 +115063,8 @@
           <li><img alt="A calendar grid with a clock in the upper right
           hand corner." src="sample-datetime-ui-3"></li>
 -->
-<!--START webvtt--><!--START rtc-->
  </body>
 </html>
-<!--END webvtt--><!--END rtc-->
-<!--END html--><!--END dev-html--><!--END w3c-html-->
-<!--END complete--><!--END epub-->
+<!--END dev-html--><!--END w3c-html-->
+<!--END complete-->
 <!--END validation-->
\ No newline at end of file

|