[html5] r4829 - [giow] (0) very early draft idea of how to do the API part of peer-to-peer commu [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Mar 5 14:00:53 PST 2010


Author: ianh
Date: 2010-03-05 14:00:51 -0800 (Fri, 05 Mar 2010)
New Revision: 4829

Modified:
   complete.html
   index
   source
Log:
[giow] (0) very early draft idea of how to do the API part of peer-to-peer communication for video conferencing, server-less IMing, etc.

Modified: complete.html
===================================================================
--- complete.html	2010-03-05 01:56:01 UTC (rev 4828)
+++ complete.html	2010-03-05 22:00:51 UTC (rev 4829)
@@ -651,7 +651,8 @@
        <li><a href=#using-the-accesskey-attribute-to-define-a-command-on-other-elements><span class=secno>4.11.5.8 </span>Using the <code title=attr-accesskey>accesskey</code> attribute to define a command on other elements</a></ol></li>
      <li><a href=#devices><span class=secno>4.11.6 </span>The <code>device</code> element</a>
       <ol>
-       <li><a href=#stream-api><span class=secno>4.11.6.1 </span>Stream API</a></ol></ol></li>
+       <li><a href=#stream-api><span class=secno>4.11.6.1 </span>Stream API</a></li>
+       <li><a href=#peer-to-peer-connections><span class=secno>4.11.6.2 </span>Peer-to-peer connections</a></ol></ol></li>
    <li><a href=#links><span class=secno>4.12 </span>Links</a>
     <ol>
      <li><a href=#hyperlink-elements><span class=secno>4.12.1 </span>Hyperlink elements</a></li>
@@ -45273,8 +45274,7 @@
   supported by the user agent for use in <code><a href=#audio>audio</a></code> and
   <code><a href=#video>video</a></code> elements.</p>
 
-  <p class=XXX>This will be pinned down to a specific codec, frame
-  dimension, and bitrate in due course.</p>
+  <p class=XXX>This will be pinned down to a specific codec.</p>
 
   <p>When the <dfn id=dom-stream-record title=dom-stream-record><code>record()</code></dfn> method is
   invoked, the user agent must return a new
@@ -45293,14 +45293,56 @@
   supported by the user agent for use in <code><a href=#audio>audio</a></code> and
   <code><a href=#video>video</a></code> elements.</p>
 
-  <p class=XXX>This again will be pinned down to a specific codec,
-  frame dimension, and bitrate in due course.</p>
+  <p class=XXX>This again will be pinned down to a specific codec.</p>
 
 
+  <h5 id=peer-to-peer-connections><span class=secno>4.11.6.2 </span>Peer-to-peer connections</h5>
 
+  <p class=XXX>This section will be moved to a more appropriate
+  location in due course; it is here currently to keep it near the
+  <code><a href=#devices>device</a></code> element to allow reviewers to look at it.</p>
 
+  <pre class=idl>[NoInterfaceObject]
+interface <dfn id=abstractpeer>AbstractPeer</dfn> {
+  void sendText(in DOMString text);
+  attribute Function ontext; // receiving
 
+  void sendBitmap(in HTMLImageElement image);
+  attribute Function onbitmap; // receiving
 
+  void sendFile(in File file);
+  attribute Function onfile; // receiving
+
+  attribute Stream localStream; // video/audio to send
+  readonly attribute Stream remoteStream; // video/audio from remote peer
+  attribute Function onstreamchange; // when the remote peer changes whether the video is being sent or not
+
+  attribute Function onconnect; // called when the connection is established
+  attribute Function ondisconnect;
+};
+
+[Constructor]
+interface <dfn id=peertopeerserver>PeerToPeerServer</dfn> : <a href=#abstractpeer>AbstractPeer</a> {
+  DOMString <span title=dom-PeerToPeerServer-getAddress>getAddress</span>(); // returns a string that encodes all the various ways to connect to this peer
+
+  attribute Function onincoming; // incoming call detected
+  void accept(); // accepts incoming call
+  void reject(in optional DOMString message); // explicitly rejects incoming call
+
+  void close(); // disconnects and stops listening
+};
+
+[Constructor(in DOMString address)] // pass it the result of getAddress() from the other peer
+interface <dfn id=peertopeerclient>PeerToPeerClient</dfn> : <a href=#abstractpeer>AbstractPeer</a> {
+};</pre>
+
+  <p class=XXX>...</p>
+
+
+
+
+
+
   <h3 id=links><span class=secno>4.12 </span>Links</h3>
 
 

Modified: index
===================================================================
--- index	2010-03-05 01:56:01 UTC (rev 4828)
+++ index	2010-03-05 22:00:51 UTC (rev 4829)
@@ -161,7 +161,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <hgroup><h1>HTML5 (including next generation additions still in development)</h1>
-    <h2 class="no-num no-toc">Draft Standard — 4 March 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 5 March 2010</h2>
    </hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -660,7 +660,8 @@
        <li><a href=#using-the-accesskey-attribute-to-define-a-command-on-other-elements><span class=secno>4.11.5.8 </span>Using the <code title=attr-accesskey>accesskey</code> attribute to define a command on other elements</a></ol></li>
      <li><a href=#devices><span class=secno>4.11.6 </span>The <code>device</code> element</a>
       <ol>
-       <li><a href=#stream-api><span class=secno>4.11.6.1 </span>Stream API</a></ol></ol></li>
+       <li><a href=#stream-api><span class=secno>4.11.6.1 </span>Stream API</a></li>
+       <li><a href=#peer-to-peer-connections><span class=secno>4.11.6.2 </span>Peer-to-peer connections</a></ol></ol></li>
    <li><a href=#links><span class=secno>4.12 </span>Links</a>
     <ol>
      <li><a href=#hyperlink-elements><span class=secno>4.12.1 </span>Hyperlink elements</a></li>
@@ -45175,8 +45176,7 @@
   supported by the user agent for use in <code><a href=#audio>audio</a></code> and
   <code><a href=#video>video</a></code> elements.</p>
 
-  <p class=XXX>This will be pinned down to a specific codec, frame
-  dimension, and bitrate in due course.</p>
+  <p class=XXX>This will be pinned down to a specific codec.</p>
 
   <p>When the <dfn id=dom-stream-record title=dom-stream-record><code>record()</code></dfn> method is
   invoked, the user agent must return a new
@@ -45195,14 +45195,56 @@
   supported by the user agent for use in <code><a href=#audio>audio</a></code> and
   <code><a href=#video>video</a></code> elements.</p>
 
-  <p class=XXX>This again will be pinned down to a specific codec,
-  frame dimension, and bitrate in due course.</p>
+  <p class=XXX>This again will be pinned down to a specific codec.</p>
 
 
+  <h5 id=peer-to-peer-connections><span class=secno>4.11.6.2 </span>Peer-to-peer connections</h5>
 
+  <p class=XXX>This section will be moved to a more appropriate
+  location in due course; it is here currently to keep it near the
+  <code><a href=#devices>device</a></code> element to allow reviewers to look at it.</p>
 
+  <pre class=idl>[NoInterfaceObject]
+interface <dfn id=abstractpeer>AbstractPeer</dfn> {
+  void sendText(in DOMString text);
+  attribute Function ontext; // receiving
 
+  void sendBitmap(in HTMLImageElement image);
+  attribute Function onbitmap; // receiving
 
+  void sendFile(in File file);
+  attribute Function onfile; // receiving
+
+  attribute Stream localStream; // video/audio to send
+  readonly attribute Stream remoteStream; // video/audio from remote peer
+  attribute Function onstreamchange; // when the remote peer changes whether the video is being sent or not
+
+  attribute Function onconnect; // called when the connection is established
+  attribute Function ondisconnect;
+};
+
+[Constructor]
+interface <dfn id=peertopeerserver>PeerToPeerServer</dfn> : <a href=#abstractpeer>AbstractPeer</a> {
+  DOMString <span title=dom-PeerToPeerServer-getAddress>getAddress</span>(); // returns a string that encodes all the various ways to connect to this peer
+
+  attribute Function onincoming; // incoming call detected
+  void accept(); // accepts incoming call
+  void reject(in optional DOMString message); // explicitly rejects incoming call
+
+  void close(); // disconnects and stops listening
+};
+
+[Constructor(in DOMString address)] // pass it the result of getAddress() from the other peer
+interface <dfn id=peertopeerclient>PeerToPeerClient</dfn> : <a href=#abstractpeer>AbstractPeer</a> {
+};</pre>
+
+  <p class=XXX>...</p>
+
+
+
+
+
+
   <h3 id=links><span class=secno>4.12 </span>Links</h3>
 
 

Modified: source
===================================================================
--- source	2010-03-05 01:56:01 UTC (rev 4828)
+++ source	2010-03-05 22:00:51 UTC (rev 4829)
@@ -50355,8 +50355,7 @@
   supported by the user agent for use in <code>audio</code> and
   <code>video</code> elements.</p>
 
-  <p class="XXX">This will be pinned down to a specific codec, frame
-  dimension, and bitrate in due course.</p>
+  <p class="XXX">This will be pinned down to a specific codec.</p>
 
   <p>When the <dfn
   title="dom-stream-record"><code>record()</code></dfn> method is
@@ -50379,9 +50378,51 @@
   supported by the user agent for use in <code>audio</code> and
   <code>video</code> elements.</p>
 
-  <p class="XXX">This again will be pinned down to a specific codec,
-  frame dimension, and bitrate in due course.</p>
+  <p class="XXX">This again will be pinned down to a specific codec.</p>
 
+
+  <h5>Peer-to-peer connections</h5>
+
+  <p class="XXX">This section will be moved to a more appropriate
+  location in due course; it is here currently to keep it near the
+  <code>device</code> element to allow reviewers to look at it.</p>
+
+  <pre class="idl">[NoInterfaceObject]
+interface <dfn>AbstractPeer</dfn> {
+  void sendText(in DOMString text);
+  attribute Function ontext; // receiving
+
+  void sendBitmap(in HTMLImageElement image);
+  attribute Function onbitmap; // receiving
+
+  void sendFile(in File file);
+  attribute Function onfile; // receiving
+
+  attribute Stream localStream; // video/audio to send
+  readonly attribute Stream remoteStream; // video/audio from remote peer
+  attribute Function onstreamchange; // when the remote peer changes whether the video is being sent or not
+
+  attribute Function onconnect; // called when the connection is established
+  attribute Function ondisconnect;
+};
+
+[Constructor]
+interface <dfn>PeerToPeerServer</dfn> : <span>AbstractPeer</span> {
+  DOMString <span title="dom-PeerToPeerServer-getAddress">getAddress</span>(); // returns a string that encodes all the various ways to connect to this peer
+
+  attribute Function onincoming; // incoming call detected
+  void accept(); // accepts incoming call
+  void reject(in optional DOMString message); // explicitly rejects incoming call
+
+  void close(); // disconnects and stops listening
+};
+
+[Constructor(in DOMString address)] // pass it the result of getAddress() from the other peer
+interface <dfn>PeerToPeerClient</dfn> : <span>AbstractPeer</span> {
+};</pre>
+
+  <p class="XXX">...</p>
+
 <!--END html-device--><!--START w3c-html-->
 
 




More information about the Commit-Watchers mailing list