html5/html-device Overview.html,1.1,1.2

Update of /sources/public/html5/html-device
In directory hutz:/tmp/cvs-serv5585

Modified Files:
	Overview.html 
Log Message:
More work in progress for video conferencing and other device exposition (whatwg r4443)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/html-device/Overview.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Overview.html	11 Dec 2009 18:09:30 -0000	1.1
+++ Overview.html	15 Dec 2009 22:58:39 -0000	1.2
@@ -260,7 +260,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-11-december-2009">Editor's Draft 11 December 2009</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-15-december-2009">Editor's Draft 15 December 2009</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>
@@ -339,7 +339,7 @@
   specification's progress along the W3C Recommendation
   track.
 
-  This specification is the 11 December 2009 Editor's Draft.
+  This specification is the 15 December 2009 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 -->
@@ -362,7 +362,9 @@
 <!--begin-toc-->
 <ol class="toc">
  <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></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 class="no-num" href="#references">References</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
   requirements, definitions, dependencies, terminology, and
@@ -377,15 +379,76 @@
    <dd>Empty.</dd>
    <dt>Content attributes:</dt>
    <dd><span>Global attributes</span></dd>
-   <dd><code title="attr-device-type">type</code></dd>
+   <dd><code title="attr-device-type"><a href="#attr-device-type">type</a></code></dd>
    <dt>DOM interface:</dt>
    <dd>
 <pre class="idl">interface <dfn id="htmldeviceelement">HTMLDeviceElement</dfn> : <span>HTMLElement</span> {
            attribute DOMString <span title="dom-device-type">type</span>;
+  readonly attribute any <span title="dom-device-data">data</span>;
 };</pre>
   </dl><p>The <code><a href="#devices">device</a></code> element represents a device selector, to
   allow the user to give the page access to a device, for example a
-  video camera.<p class="XXX">device attribute<p class="XXX">processing model</p><!--START vCard--><!--START vEvent--><h2 class="no-num" id="references">References</h2><!--REFS--><!--END vCard--><!--END vEvent--><p>All references are normative unless marked "Non-normative".</p><!--START vCard--><!--START vEvent--><dl><dt id="refsHTML5">[HTML5]</dt>
+  video camera.<p>The <dfn id="attr-device-type" title="attr-device-type"><code>type</code></dfn>
+  attribute allows the author to specify which kind of device the page
+  would like access to. The attribute is an <span>enumerated
+  attribute</span> with the keywords given in the first column of the
+  following table, and their corresponding states given in the cell in
+  second column of the same row.<p class="XXX">RS232 is only included below to give an idea of where
+  we could go with this. <strong>Should we instead just make this only
+  useful for audiovisual streams?</strong> Unless there are compelling
+  reasons, we probably should not be this generic. So far, the reasons
+  aren't that compelling.<table><thead><tr><th>Keyword
+     <th>State
+     <th>Device description
+     <th>Examples
+   <tbody><tr><td><dfn id="attr-device-type-keyword-media" title="attr-device-type-keyword-media"><code>media</code></dfn>
+     <td><span title="attr-device-type-media">Media</span>
+     <td>Stream of audio and/or video data.
+     <td>A webcam.
+    <tr><td><dfn id="attr-device-type-keyword-fs" title="attr-device-type-keyword-fs"><code>fs</code></dfn>
+     <td><span title="attr-device-type-fs">File system</span>
+     <td>File system.
+     <td>A USB-connected media player.
+    <tr><td><dfn id="attr-device-type-keyword-rs232" title="attr-device-type-keyword-rs232"><code>rs232</code></dfn>
+     <td><span title="attr-device-type-rs232">RS232</span>
+     <td>RS232 device.
+     <td>A serial port.
+  </table><p class="XXX">processing model: 'change' event fires once user
+  selects a new device; .data is set to new Stream, LocalFS, or RS232
+  object as appropriate.<div class="example">
+
+   <pre>&lt;p&gt;To start chatting, select a video camera: &lt;device type=media onchange="update(this.data)"&gt;&lt;/p&gt;
+&lt;video&gt;&lt;/video&gt;
+&lt;script&gt;
+ function update(stream) {
+   document.getElementsByTagName('video')[0].src = stream.URL;
+ }
+&lt;/script&gt;</pre>
+
+  </div><h3 id="stream-api"><span class="secno">2.1 </span>Stream API</h3><p>The <code><a href="#stream">Stream</a></code> interface is used to represent
+  streams.<pre class="idl">interface <dfn id="stream">Stream</dfn> {
+  readonly attribute DOMString <a href="#dom-stream-url" title="dom-stream-URL">URL</a>;
+  <a href="#streamrecorder">StreamRecorder</a> <a href="#dom-stream-record" title="dom-stream-record">record</a>();
+};</pre><p>The <dfn id="dom-stream-url" title="dom-stream-URL"><code>URL</code></dfn> attribute
+  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
+  invoked, the user agent must return a <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>();
+};</pre><p>The <dfn id="dom-streamrecorder-stop" title="dom-StreamRecorder-stop"><code>stop()</code></dfn> method
+  must return a <code>File</code> object representing the data 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.</p><!--START vCard--><!--START vEvent--><h2 class="no-num" id="references">References</h2><!--REFS--><!--END vCard--><!--END vEvent--><p>All references are normative unless marked "Non-normative".</p><!--START vCard--><!--START vEvent--><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, August 2009.</dd>
+
+   <dt id="refsHTML5">[HTML5]</dt>
    <!--
    <dd><cite><a href="http://www.w3.org/TR/html5/">HTML5</a></cite>,
    I. Hickson, D. Hyatt. W3C, April 2009.</dd>

Received on Tuesday, 15 December 2009 22:58:42 UTC