- From: poot <cvsmail@w3.org>
- Date: Sat, 6 Mar 2010 07:01:21 +0900 (JST)
- To: public-html-diffs@w3.org
device; hixie: very early draft idea of how to do the API part of peer- to-peer communication for video conferencing, server-less IMing, etc. (whatwg r4829) http://dev.w3.org/cvsweb/html5/html-device/Overview.html?r1=1.25&r2=1.26&f=h http://html5.org/tools/web-apps-tracker?from=4828&to=4829 =================================================================== RCS file: /sources/public/html5/html-device/Overview.html,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- Overview.html 4 Mar 2010 07:07:26 -0000 1.25 +++ Overview.html 5 Mar 2010 22:00:55 -0000 1.26 @@ -283,7 +283,7 @@ <h1>HTML Device</h1> <h2 class="no-num no-toc" id="an-addition-to-html">An addition to HTML</h2> - <h2 class="no-num no-toc" id="editor-s-draft-4-march-2010">Editor's Draft 4 March 2010</h2> + <h2 class="no-num no-toc" id="editor-s-draft-5-march-2010">Editor's Draft 5 March 2010</h2> <dl><dt>Latest Published Version:</dt> <dd><a href="http://www.w3.org/TR/html-device/">http://www.w3.org/TR/html-device/</a></dd> <dt>Latest Editor's Draft:</dt> @@ -362,7 +362,7 @@ specification's progress along the W3C Recommendation track. - This specification is the 4 March 2010 Editor's Draft. + This specification is the 5 March 2010 Editor's Draft. </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is part of <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">a larger specification</a> being produced by the <a href="http://www.whatwg.org/">WHATWG</a>. <!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --> @@ -387,7 +387,8 @@ <li><a href="#conformance-requirements"><span class="secno">1 </span>Conformance requirements</a></li> <li><a href="#devices"><span class="secno">2 </span>The <code>device</code> element</a> <ol> - <li><a href="#stream-api"><span class="secno">2.1 </span>Stream API</a></ol></li> + <li><a href="#stream-api"><span class="secno">2.1 </span>Stream API</a></li> + <li><a href="#peer-to-peer-connections"><span class="secno">2.2 </span>Peer-to-peer connections</a></ol></li> <li><a class="no-num" href="#references">References</a></li> <li><a class="no-num" href="#acknowledgements">Acknowledgements</a></ol> <!--end-toc--><hr><h2 id="conformance-requirements"><span class="secno">1 </span>Conformance requirements</h2><p>This specification is an HTML specification. All the conformance @@ -457,8 +458,7 @@ must return a <span title="fileURN">File URN</span> representing the stream. <a href="#refsFILEAPI">[FILEAPI]</a><p>For audio and video streams, the stream must be in a format supported by the user agent for use in <code>audio</code> and - <code>video</code> elements.<p class="XXX">This will be pinned down to a specific codec, frame - dimension, and bitrate in due course.<p>When the <dfn id="dom-stream-record" title="dom-stream-record"><code>record()</code></dfn> method is + <code>video</code> elements.<p class="XXX">This will be pinned down to a specific codec.<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 <code><a href="#streamrecorder">StreamRecorder</a></code> object associated with the stream.<pre class="idl">interface <dfn id="streamrecorder">StreamRecorder</dfn> { <span>File</span> <a href="#dom-streamrecorder-stop" title="dom-StreamRecorder-stop">stop</a>(); @@ -467,8 +467,41 @@ that was streamed between the creation of the <code><a href="#streamrecorder">StreamRecorder</a></code> object and the invocation of the <code title="dom-StreamRecorder-stop"><a href="#dom-streamrecorder-stop">stop()</a></code> method. <a href="#refsFILEAPI">[FILEAPI]</a><p>For audio and video streams, the file must be in a format supported by the user agent for use in <code>audio</code> and - <code>video</code> elements.<p class="XXX">This again will be pinned down to a specific codec, - frame dimension, and bitrate in due course.<h2 class="no-num" id="references">References</h2><!--REFS--><p>All references are normative unless marked "Non-normative".</p><!-- Dates are only included for standards older than the Web, + <code>video</code> elements.<p class="XXX">This again will be pinned down to a specific codec.<h3 id="peer-to-peer-connections"><span class="secno">2.2 </span>Peer-to-peer connections</h3><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.<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">...<h2 class="no-num" id="references">References</h2><!--REFS--><p>All references are normative unless marked "Non-normative".</p><!-- Dates are only included for standards older than the Web, because the newer ones keep changing. --><dl><dt id="refsFILEAPI">[FILEAPI]</dt> <dd><cite><a href="http://dev.w3.org/2006/webapi/FileUpload/publish/FileAPI.html">File API</a></cite>, A. Ranganathan. W3C.</dd>
Received on Friday, 5 March 2010 22:01:51 UTC