[html5] r6373 - [e] (0) An initial intro. Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13238

whatwg at whatwg.org whatwg at whatwg.org
Thu Aug 4 16:36:40 PDT 2011


Author: ianh
Date: 2011-08-04 16:36:38 -0700 (Thu, 04 Aug 2011)
New Revision: 6373

Modified:
   complete.html
   index
   source
Log:
[e] (0) An initial intro.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13238

Modified: complete.html
===================================================================
--- complete.html	2011-08-04 22:02:44 UTC (rev 6372)
+++ complete.html	2011-08-04 23:36:38 UTC (rev 6373)
@@ -1009,7 +1009,10 @@
     <ol>
      <li><a href=#introduction-11><span class=secno>9.3.1 </span>Introduction</a></li>
      <li><a href=#interface-definitions><span class=secno>9.3.2 </span>Interface definitions</a></ol></li>
-   <li><a href=#peer-to-peer-connections><span class=secno>9.4 </span>Peer-to-peer connections</a></li>
+   <li><a href=#peer-to-peer-connections><span class=secno>9.4 </span>Peer-to-peer connections</a>
+    <ol>
+     <li><a href=#introduction-12><span class=secno>9.4.1 </span>Introduction</a></li>
+     <li><a href=#interface-definitions-0><span class=secno>9.4.2 </span>Interface definitions</a></ol></li>
    <li><a href=#the-data-stream><span class=secno>9.5 </span>The data stream</a>
     <ol>
      <li><a href=#security-considerations><span class=secno>9.5.1 </span>Security considerations</a></ol></li>
@@ -1018,7 +1021,7 @@
    <li><a href=#event-summary><span class=secno>9.8 </span>Event Summary</a></ol></li>
  <li><a href=#workers><span class=secno>10 </span>Web workers</a>
   <ol>
-   <li><a href=#introduction-12><span class=secno>10.1 </span>Introduction</a>
+   <li><a href=#introduction-13><span class=secno>10.1 </span>Introduction</a>
     <ol>
      <li><a href=#scope-0><span class=secno>10.1.1 </span>Scope</a></li>
      <li><a href=#tutorial><span class=secno>10.1.2 </span>Tutorial</a>
@@ -1079,7 +1082,7 @@
        <li><a href=#garbage-collection-2><span class=secno>11.3.3.2 </span>Garbage collection</a></ol></ol></li>
    <li><a href=#web-messaging><span class=secno>11.4 </span>Cross-document messaging</a>
     <ol>
-     <li><a href=#introduction-13><span class=secno>11.4.1 </span>Introduction</a></li>
+     <li><a href=#introduction-14><span class=secno>11.4.1 </span>Introduction</a></li>
      <li><a href=#security-postmsg><span class=secno>11.4.2 </span>Security</a>
       <ol>
        <li><a href=#authors><span class=secno>11.4.2.1 </span>Authors</a></li>
@@ -1087,14 +1090,14 @@
      <li><a href=#posting-messages><span class=secno>11.4.3 </span>Posting messages</a></ol></li>
    <li><a href=#channel-messaging><span class=secno>11.5 </span>Channel messaging</a>
     <ol>
-     <li><a href=#introduction-14><span class=secno>11.5.1 </span>Introduction</a></li>
+     <li><a href=#introduction-15><span class=secno>11.5.1 </span>Introduction</a></li>
      <li><a href=#message-channels><span class=secno>11.5.2 </span>Message channels</a></li>
      <li><a href=#message-ports><span class=secno>11.5.3 </span>Message ports</a>
       <ol>
        <li><a href=#ports-and-garbage-collection><span class=secno>11.5.3.1 </span>Ports and garbage collection</a></ol></ol></ol></li>
  <li><a href=#webstorage><span class=secno>12 </span>Web storage</a>
   <ol>
-   <li><a href=#introduction-15><span class=secno>12.1 </span>Introduction</a></li>
+   <li><a href=#introduction-16><span class=secno>12.1 </span>Introduction</a></li>
    <li><a href=#storage><span class=secno>12.2 </span>The API</a>
     <ol>
      <li><a href=#the-storage-interface><span class=secno>12.2.1 </span>The <code>Storage</code> interface</a></li>
@@ -1273,7 +1276,7 @@
    <li><a href=#parsing-xhtml-fragments><span class=secno>14.4 </span>Parsing XHTML fragments</a></ol></li>
  <li><a href=#rendering><span class=secno>15 </span>Rendering</a>
   <ol>
-   <li><a href=#introduction-16><span class=secno>15.1 </span>Introduction</a></li>
+   <li><a href=#introduction-17><span class=secno>15.1 </span>Introduction</a></li>
    <li><a href=#the-css-user-agent-style-sheet-and-presentational-hints><span class=secno>15.2 </span>The CSS user agent style sheet and presentational hints</a></li>
    <li><a href=#non-replaced-elements><span class=secno>15.3 </span>Non-replaced elements</a>
     <ol>
@@ -1305,7 +1308,7 @@
      <li><a href=#toolbars-0><span class=secno>15.4.6 </span>Toolbars</a></ol></li>
    <li><a href=#bindings><span class=secno>15.5 </span>Bindings</a>
     <ol>
-     <li><a href=#introduction-17><span class=secno>15.5.1 </span>Introduction</a></li>
+     <li><a href=#introduction-18><span class=secno>15.5.1 </span>Introduction</a></li>
      <li><a href=#the-button-element-0><span class=secno>15.5.2 </span>The <code>button</code> element</a></li>
      <li><a href=#the-details-element-0><span class=secno>15.5.3 </span>The <code>details</code> element</a></li>
      <li><a href=#the-input-element-as-a-text-entry-widget><span class=secno>15.5.4 </span>The <code>input</code> element as a text entry widget</a></li>
@@ -13251,9 +13254,7 @@
 
 
 
-<!--PEERCONNECTION-->
   <h2 id=semantics><span class=secno>4 </span>The elements of HTML</h2>
-<!--PEERCONNECTION-->
 
   <h3 id=the-root-element><span class=secno>4.1 </span>The root element</h3>
 
@@ -22070,9 +22071,7 @@
 
 
 
-<!--PEERCONNECTION-->
   <h3 id=embedded-content-1><span class=secno>4.8 </span>Embedded content</h3>
-<!--PEERCONNECTION-->
 
 
   <h4 id=the-img-element><span class=secno>4.8.1 </span>The <dfn><code>img</code></dfn> element</h4>
@@ -26437,9 +26436,7 @@
   </div>
 
 
-<!--PEERCONNECTION-->
   <h4 id=media-elements><span class=secno>4.8.10 </span>Media elements</h4>
-<!--PEERCONNECTION-->
 
   <p><dfn id=media-element title="media element">Media elements</dfn>
   (<code><a href=#the-audio-element>audio</a></code> and <code><a href=#the-video-element>video</a></code>, in this specification)
@@ -26553,11 +26550,11 @@
   referred to as <dfn id=media-data>media data</dfn> in this section, since this
   section applies equally to <a href=#media-element title="media element">media
   elements</a> for audio or for video.
-<!--PEERCONNECTION-->
+
   The term <dfn id=media-resource>media resource</dfn> is used to refer to the complete
   set of media data, e.g. the complete video file, or complete audio
   file.
-<!--PEERCONNECTION-->
+
   </p>
 
   <p>A <a href=#media-resource>media resource</a> can have multiple audio and video
@@ -76131,6 +76128,77 @@
 
   <h3 id=peer-to-peer-connections><span class=secno>9.4 </span>Peer-to-peer connections</h3>
 
+  <h4 id=introduction-12><span class=secno>9.4.1 </span>Introduction</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>To send audio, video, or data to another peer, the
+  <code><a href=#peerconnection>PeerConnection</a></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><a href=#websocket>WebSocket</a></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><a href=#peerconnection>PeerConnection</a></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 object, the script
+  can use the <code title=dom-PeerConnection-addStream><a href=#dom-peerconnection-addstream>addStream()</a></code> method to
+  add any audio or video streams to be sent.</p>
+
+  <p>Once the script that created the <code><a href=#peerconnection>PeerConnection</a></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><a href=#peerconnection>PeerConnection</a></code> object
+  with a configuration string and signaling callback, and then calls
+  the <code title=dom-PeerConnection-processSignalingMessage><a href=#dom-peerconnection-processsignalingmessage>processSignalingMessage()</a></code>
+  method with, as its argument, the initial offer received from the
+  initiating peer. It can also use the <code title=dom-PeerConnection-addStream><a href=#dom-peerconnection-addstream>addStream()</a></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><a href=#peerconnection>PeerConnection</a></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><a href=#dom-peerconnection-close>close()</a></code> method is invoked on
+  the <code><a href=#peerconnection>PeerConnection</a></code> objects.</p>
+
+
+  <h4 id=interface-definitions-0><span class=secno>9.4.2 </span>Interface definitions</h4>
+
   <pre class=idl>[<a href=#dom-peerconnection title=dom-PeerConnection>Constructor</a>(in DOMString configuration, in <a href=#signalingcallback>SignalingCallback</a> signalingCallback)]
 interface <dfn id=peerconnection>PeerConnection</dfn> {
   void <a href=#dom-peerconnection-processsignalingmessage title=dom-PeerConnection-processSignalingMessage>processSignalingMessage</a>(in DOMString message);
@@ -77247,7 +77315,7 @@
 
 
 
-  <h3 id=introduction-12><span class=secno>10.1 </span>Introduction</h3>
+  <h3 id=introduction-13><span class=secno>10.1 </span>Introduction</h3>
 
   <h4 id=scope-0><span class=secno>10.1.1 </span>Scope</h4>
 
@@ -81023,7 +81091,7 @@
   </div>
 
 
-  <h4 id=introduction-13><span class=secno>11.4.1 </span>Introduction</h4>
+  <h4 id=introduction-14><span class=secno>11.4.1 </span>Introduction</h4>
 
   <p><i>This section is non-normative.</i></p>
 
@@ -81279,7 +81347,7 @@
 
   <h3 id=channel-messaging><span class=secno>11.5 </span><dfn>Channel messaging</dfn></h3>
 
-  <h4 id=introduction-14><span class=secno>11.5.1 </span>Introduction</h4>
+  <h4 id=introduction-15><span class=secno>11.5.1 </span>Introduction</h4>
 
   <p><i>This section is non-normative.</i></p>
 
@@ -81781,7 +81849,7 @@
 
 
 
-  <h3 id=introduction-15><span class=secno>12.1 </span>Introduction</h3>
+  <h3 id=introduction-16><span class=secno>12.1 </span>Introduction</h3>
 
   <p><i>This section is non-normative.</i></p>
 
@@ -91923,7 +91991,7 @@
   "must".</i></p>
 
 
-  <h3 id=introduction-16><span class=secno>15.1 </span>Introduction</h3>
+  <h3 id=introduction-17><span class=secno>15.1 </span>Introduction</h3>
 
   <p>In general, user agents are expected to support CSS, and many of
   the suggestions in this section are expressed in CSS terms. User
@@ -94139,7 +94207,7 @@
 
   <h3 id=bindings><span class=secno>15.5 </span>Bindings</h3>
 
-  <h4 id=introduction-17><span class=secno>15.5.1 </span>Introduction</h4>
+  <h4 id=introduction-18><span class=secno>15.5.1 </span>Introduction</h4>
 
   <p>A number of elements have their rendering defined in terms of the
   'binding' property. <a href=#refsBECSS>[BECSS]</a></p>

Modified: index
===================================================================
--- index	2011-08-04 22:02:44 UTC (rev 6372)
+++ index	2011-08-04 23:36:38 UTC (rev 6373)
@@ -1009,7 +1009,10 @@
     <ol>
      <li><a href=#introduction-11><span class=secno>9.3.1 </span>Introduction</a></li>
      <li><a href=#interface-definitions><span class=secno>9.3.2 </span>Interface definitions</a></ol></li>
-   <li><a href=#peer-to-peer-connections><span class=secno>9.4 </span>Peer-to-peer connections</a></li>
+   <li><a href=#peer-to-peer-connections><span class=secno>9.4 </span>Peer-to-peer connections</a>
+    <ol>
+     <li><a href=#introduction-12><span class=secno>9.4.1 </span>Introduction</a></li>
+     <li><a href=#interface-definitions-0><span class=secno>9.4.2 </span>Interface definitions</a></ol></li>
    <li><a href=#the-data-stream><span class=secno>9.5 </span>The data stream</a>
     <ol>
      <li><a href=#security-considerations><span class=secno>9.5.1 </span>Security considerations</a></ol></li>
@@ -1021,7 +1024,7 @@
    <li><a href=#event-definitions-1><span class=secno>10.1 </span>Event definitions</a></li>
    <li><a href=#web-messaging><span class=secno>10.2 </span>Cross-document messaging</a>
     <ol>
-     <li><a href=#introduction-12><span class=secno>10.2.1 </span>Introduction</a></li>
+     <li><a href=#introduction-13><span class=secno>10.2.1 </span>Introduction</a></li>
      <li><a href=#security-postmsg><span class=secno>10.2.2 </span>Security</a>
       <ol>
        <li><a href=#authors><span class=secno>10.2.2.1 </span>Authors</a></li>
@@ -1029,7 +1032,7 @@
      <li><a href=#posting-messages><span class=secno>10.2.3 </span>Posting messages</a></ol></li>
    <li><a href=#channel-messaging><span class=secno>10.3 </span>Channel messaging</a>
     <ol>
-     <li><a href=#introduction-13><span class=secno>10.3.1 </span>Introduction</a></li>
+     <li><a href=#introduction-14><span class=secno>10.3.1 </span>Introduction</a></li>
      <li><a href=#message-channels><span class=secno>10.3.2 </span>Message channels</a></li>
      <li><a href=#message-ports><span class=secno>10.3.3 </span>Message ports</a>
       <ol>
@@ -1191,7 +1194,7 @@
    <li><a href=#parsing-xhtml-fragments><span class=secno>12.4 </span>Parsing XHTML fragments</a></ol></li>
  <li><a href=#rendering><span class=secno>13 </span>Rendering</a>
   <ol>
-   <li><a href=#introduction-14><span class=secno>13.1 </span>Introduction</a></li>
+   <li><a href=#introduction-15><span class=secno>13.1 </span>Introduction</a></li>
    <li><a href=#the-css-user-agent-style-sheet-and-presentational-hints><span class=secno>13.2 </span>The CSS user agent style sheet and presentational hints</a></li>
    <li><a href=#non-replaced-elements><span class=secno>13.3 </span>Non-replaced elements</a>
     <ol>
@@ -1223,7 +1226,7 @@
      <li><a href=#toolbars-0><span class=secno>13.4.6 </span>Toolbars</a></ol></li>
    <li><a href=#bindings><span class=secno>13.5 </span>Bindings</a>
     <ol>
-     <li><a href=#introduction-15><span class=secno>13.5.1 </span>Introduction</a></li>
+     <li><a href=#introduction-16><span class=secno>13.5.1 </span>Introduction</a></li>
      <li><a href=#the-button-element-0><span class=secno>13.5.2 </span>The <code>button</code> element</a></li>
      <li><a href=#the-details-element-0><span class=secno>13.5.3 </span>The <code>details</code> element</a></li>
      <li><a href=#the-input-element-as-a-text-entry-widget><span class=secno>13.5.4 </span>The <code>input</code> element as a text entry widget</a></li>
@@ -13120,9 +13123,7 @@
 
 
 
-<!--PEERCONNECTION-->
   <h2 id=semantics><span class=secno>4 </span>The elements of HTML</h2>
-<!--PEERCONNECTION-->
 
   <h3 id=the-root-element><span class=secno>4.1 </span>The root element</h3>
 
@@ -21939,9 +21940,7 @@
 
 
 
-<!--PEERCONNECTION-->
   <h3 id=embedded-content-1><span class=secno>4.8 </span>Embedded content</h3>
-<!--PEERCONNECTION-->
 
 
   <h4 id=the-img-element><span class=secno>4.8.1 </span>The <dfn><code>img</code></dfn> element</h4>
@@ -26309,9 +26308,7 @@
   </div>
 
 
-<!--PEERCONNECTION-->
   <h4 id=media-elements><span class=secno>4.8.10 </span>Media elements</h4>
-<!--PEERCONNECTION-->
 
   <p><dfn id=media-element title="media element">Media elements</dfn>
   (<code><a href=#the-audio-element>audio</a></code> and <code><a href=#the-video-element>video</a></code>, in this specification)
@@ -26425,11 +26422,11 @@
   referred to as <dfn id=media-data>media data</dfn> in this section, since this
   section applies equally to <a href=#media-element title="media element">media
   elements</a> for audio or for video.
-<!--PEERCONNECTION-->
+
   The term <dfn id=media-resource>media resource</dfn> is used to refer to the complete
   set of media data, e.g. the complete video file, or complete audio
   file.
-<!--PEERCONNECTION-->
+
   </p>
 
   <p>A <a href=#media-resource>media resource</a> can have multiple audio and video
@@ -76029,6 +76026,77 @@
 
   <h3 id=peer-to-peer-connections><span class=secno>9.4 </span>Peer-to-peer connections</h3>
 
+  <h4 id=introduction-12><span class=secno>9.4.1 </span>Introduction</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>To send audio, video, or data to another peer, the
+  <code><a href=#peerconnection>PeerConnection</a></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><a href=#peerconnection>PeerConnection</a></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 object, the script
+  can use the <code title=dom-PeerConnection-addStream><a href=#dom-peerconnection-addstream>addStream()</a></code> method to
+  add any audio or video streams to be sent.</p>
+
+  <p>Once the script that created the <code><a href=#peerconnection>PeerConnection</a></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><a href=#peerconnection>PeerConnection</a></code> object
+  with a configuration string and signaling callback, and then calls
+  the <code title=dom-PeerConnection-processSignalingMessage><a href=#dom-peerconnection-processsignalingmessage>processSignalingMessage()</a></code>
+  method with, as its argument, the initial offer received from the
+  initiating peer. It can also use the <code title=dom-PeerConnection-addStream><a href=#dom-peerconnection-addstream>addStream()</a></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><a href=#peerconnection>PeerConnection</a></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><a href=#dom-peerconnection-close>close()</a></code> method is invoked on
+  the <code><a href=#peerconnection>PeerConnection</a></code> objects.</p>
+
+
+  <h4 id=interface-definitions-0><span class=secno>9.4.2 </span>Interface definitions</h4>
+
   <pre class=idl>[<a href=#dom-peerconnection title=dom-PeerConnection>Constructor</a>(in DOMString configuration, in <a href=#signalingcallback>SignalingCallback</a> signalingCallback)]
 interface <dfn id=peerconnection>PeerConnection</dfn> {
   void <a href=#dom-peerconnection-processsignalingmessage title=dom-PeerConnection-processSignalingMessage>processSignalingMessage</a>(in DOMString message);
@@ -77280,7 +77348,7 @@
   </div>
 
 
-  <h4 id=introduction-12><span class=secno>10.2.1 </span>Introduction</h4>
+  <h4 id=introduction-13><span class=secno>10.2.1 </span>Introduction</h4>
 
   <p><i>This section is non-normative.</i></p>
 
@@ -77536,7 +77604,7 @@
 
   <h3 id=channel-messaging><span class=secno>10.3 </span><dfn>Channel messaging</dfn></h3>
 
-  <h4 id=introduction-13><span class=secno>10.3.1 </span>Introduction</h4>
+  <h4 id=introduction-14><span class=secno>10.3.1 </span>Introduction</h4>
 
   <p><i>This section is non-normative.</i></p>
 
@@ -87497,7 +87565,7 @@
   "must".</i></p>
 
 
-  <h3 id=introduction-14><span class=secno>13.1 </span>Introduction</h3>
+  <h3 id=introduction-15><span class=secno>13.1 </span>Introduction</h3>
 
   <p>In general, user agents are expected to support CSS, and many of
   the suggestions in this section are expressed in CSS terms. User
@@ -89713,7 +89781,7 @@
 
   <h3 id=bindings><span class=secno>13.5 </span>Bindings</h3>
 
-  <h4 id=introduction-15><span class=secno>13.5.1 </span>Introduction</h4>
+  <h4 id=introduction-16><span class=secno>13.5.1 </span>Introduction</h4>
 
   <p>A number of elements have their rendering defined in terms of the
   'binding' property. <a href=#refsBECSS>[BECSS]</a></p>

Modified: source
===================================================================
--- source	2011-08-04 22:02:44 UTC (rev 6372)
+++ source	2011-08-04 23:36:38 UTC (rev 6373)
@@ -13871,9 +13871,7 @@
 
 
 
-<!--START rtc--><!--PEERCONNECTION-->
   <h2 id="semantics">The elements of HTML</h2>
-<!--END rtc--><!--PEERCONNECTION-->
 
   <h3>The root element</h3>
 
@@ -23596,9 +23594,7 @@
 
 
 
-<!--START rtc--><!--PEERCONNECTION-->
   <h3>Embedded content</h3>
-<!--END rtc--><!--PEERCONNECTION-->
 
 
   <h4>The <dfn><code>img</code></dfn> element</h4>
@@ -28464,9 +28460,7 @@
   </div>
 
 
-<!--START rtc--><!--PEERCONNECTION-->
   <h4>Media elements</h4>
-<!--END rtc--><!--PEERCONNECTION-->
 
   <p><dfn title="media element">Media elements</dfn>
   (<code>audio</code> and <code>video</code>, in this specification)
@@ -28586,11 +28580,11 @@
   referred to as <dfn>media data</dfn> in this section, since this
   section applies equally to <span title="media element">media
   elements</span> for audio or for video.
-<!--START rtc--><!--PEERCONNECTION-->
+
   The term <dfn>media resource</dfn> is used to refer to the complete
   set of media data, e.g. the complete video file, or complete audio
   file.
-<!--END rtc--><!--PEERCONNECTION-->
+
   </p>
 
   <p>A <span>media resource</span> can have multiple audio and video
@@ -86775,6 +86769,81 @@
 
   <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>(in DOMString configuration, in <span>SignalingCallback</span> signalingCallback)]
 interface <dfn>PeerConnection</dfn> {
   void <span title="dom-PeerConnection-processSignalingMessage">processSignalingMessage</span>(in DOMString message);




More information about the Commit-Watchers mailing list