[html5] r4443 - [agiow] (0) More work in progress for video conferencing and other device exposition

whatwg at whatwg.org whatwg at whatwg.org
Tue Dec 15 14:58:35 PST 2009


Author: ianh
Date: 2009-12-15 14:58:31 -0800 (Tue, 15 Dec 2009)
New Revision: 4443

Modified:
   complete.html
   index
   source
Log:
[agiow] (0) More work in progress for video conferencing and other device exposition

Modified: complete.html
===================================================================
--- complete.html	2009-12-14 17:47:58 UTC (rev 4442)
+++ complete.html	2009-12-15 22:58:31 UTC (rev 4443)
@@ -108,7 +108,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>Web Applications 1.0</h1>
-    <h2 class="no-num no-toc">Draft Standard — 14 December 2009</h2>
+    <h2 class="no-num no-toc">Draft Standard — 15 December 2009</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>-->
@@ -598,7 +598,9 @@
        <li><a href=#using-the-accesskey-attribute-on-a-label-element-to-define-a-command><span class=secno>4.11.4.6 </span>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>label</code> element to define a command</a></li>
        <li><a href=#using-the-accesskey-attribute-on-a-legend-element-to-define-a-command><span class=secno>4.11.4.7 </span>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>legend</code> element to define a command</a></li>
        <li><a href=#using-the-accesskey-attribute-to-define-a-command-on-other-elements><span class=secno>4.11.4.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.5 </span>The <code>device</code> element</a></ol></li>
+     <li><a href=#devices><span class=secno>4.11.5 </span>The <code>device</code> element</a>
+      <ol>
+       <li><a href=#stream-api><span class=secno>4.11.5.1 </span>Stream API</a></ol></ol></li>
    <li><a href=#common-idioms-without-dedicated-elements><span class=secno>4.12 </span>Common idioms without dedicated elements</a>
     <ol>
      <li><a href=#tag-clouds><span class=secno>4.12.1 </span>Tag clouds</a></li>
@@ -43874,24 +43876,110 @@
    <dd>Empty.</dd>
    <dt>Content attributes:</dt>
    <dd><a href=#global-attributes>Global attributes</a></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> : <a href=#htmlelement>HTMLElement</a> {
            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>
 
-  <p class=XXX>device attribute</p>
-  <p class=XXX>processing model</p>
+  <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 <a href=#enumerated-attribute>enumerated
+  attribute</a> 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>
 
+  <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.</p>
 
+  <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.</p>
 
+  <div class=example>
 
+   <pre><p>To start chatting, select a video camera: <device type=media onchange="update(this.data)"></p>
+<video></video>
+<script>
+ function update(stream) {
+   document.getElementsByTagName('video')[0].src = stream.URL;
+ }
+</script></pre>
 
+  </div>
 
+
+  <h5 id=stream-api><span class=secno>4.11.5.1 </span>Stream API</h5>
+
+  <p>The <code><a href=#stream>Stream</a></code> interface is used to represent
+  streams.</p>
+
+  <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>
+
+  <p>For audio and video streams, the stream must be in a format
+  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>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.</p>
+
+  <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>
+
+  <p>For audio and video streams, the file must be in a format
+  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>
+
+
+
+
+
+
+
   <h3 id=common-idioms-without-dedicated-elements><span class=secno>4.12 </span>Common idioms without dedicated elements</h3>
 
   <h4 id=tag-clouds><span class=secno>4.12.1 </span>Tag clouds</h4>

Modified: index
===================================================================
--- index	2009-12-14 17:47:58 UTC (rev 4442)
+++ index	2009-12-15 22:58:31 UTC (rev 4443)
@@ -63,7 +63,7 @@
    .apple-table-examples.e2 th[scope=row] { padding-left: 1em; }
    .apple-table-examples sup { line-height: 0; }
 
-  </style><link href=data:text/css, id=complete rel=stylesheet title="Complete specification"><link href=data:text/css,.impl%20{%20display:%20none;%20} id=author rel="alternate stylesheet" title="Author documentation only"><link href=data:text/css,.impl%20{%20background:%20%23FFEEEE;%20} id=highlight rel="alternate stylesheet" title="Highlight implementation requirements"><link href=status.css rel=stylesheet><script>
+  </style><link href=data:text/css, id=complete rel=stylesheet title="Complete specification"><link href=data:text/css,.impl%20{%20display:%20none;%20}%0Ahtml%20{%20border:%20solid%20yellow;%20} id=author rel="alternate stylesheet" title="Author documentation only"><link href=data:text/css,.impl%20{%20background:%20%23FFEEEE;%20} id=highlight rel="alternate stylesheet" title="Highlight implementation requirements"><link href=status.css rel=stylesheet><script>
    var loadTimer = new Date();
    var current_revision = "r" + "$Revision$".substr(11);
    current_revision = current_revision.substr(0, current_revision.length - 2);
@@ -110,7 +110,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>WHATWG HTML (Including HTML5)</h1>
-    <h2 class="no-num no-toc">Draft Standard — 14 December 2009</h2>
+    <h2 class="no-num no-toc">Draft Standard — 15 December 2009</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>-->
@@ -595,7 +595,9 @@
        <li><a href=#using-the-accesskey-attribute-on-a-label-element-to-define-a-command><span class=secno>4.11.4.6 </span>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>label</code> element to define a command</a></li>
        <li><a href=#using-the-accesskey-attribute-on-a-legend-element-to-define-a-command><span class=secno>4.11.4.7 </span>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>legend</code> element to define a command</a></li>
        <li><a href=#using-the-accesskey-attribute-to-define-a-command-on-other-elements><span class=secno>4.11.4.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.5 </span>The <code>device</code> element</a></ol></li>
+     <li><a href=#devices><span class=secno>4.11.5 </span>The <code>device</code> element</a>
+      <ol>
+       <li><a href=#stream-api><span class=secno>4.11.5.1 </span>Stream API</a></ol></ol></li>
    <li><a href=#common-idioms-without-dedicated-elements><span class=secno>4.12 </span>Common idioms without dedicated elements</a>
     <ol>
      <li><a href=#tag-clouds><span class=secno>4.12.1 </span>Tag clouds</a></li>
@@ -43709,24 +43711,110 @@
    <dd>Empty.</dd>
    <dt>Content attributes:</dt>
    <dd><a href=#global-attributes>Global attributes</a></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> : <a href=#htmlelement>HTMLElement</a> {
            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>
 
-  <p class=XXX>device attribute</p>
-  <p class=XXX>processing model</p>
+  <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 <a href=#enumerated-attribute>enumerated
+  attribute</a> 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>
 
+  <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.</p>
 
+  <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.</p>
 
+  <div class=example>
 
+   <pre><p>To start chatting, select a video camera: <device type=media onchange="update(this.data)"></p>
+<video></video>
+<script>
+ function update(stream) {
+   document.getElementsByTagName('video')[0].src = stream.URL;
+ }
+</script></pre>
 
+  </div>
 
+
+  <h5 id=stream-api><span class=secno>4.11.5.1 </span>Stream API</h5>
+
+  <p>The <code><a href=#stream>Stream</a></code> interface is used to represent
+  streams.</p>
+
+  <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>
+
+  <p>For audio and video streams, the stream must be in a format
+  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>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.</p>
+
+  <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>
+
+  <p>For audio and video streams, the file must be in a format
+  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>
+
+
+
+
+
+
+
   <h3 id=common-idioms-without-dedicated-elements><span class=secno>4.12 </span>Common idioms without dedicated elements</h3>
 
   <h4 id=tag-clouds><span class=secno>4.12.1 </span>Tag clouds</h4>

Modified: source
===================================================================
--- source	2009-12-14 17:47:58 UTC (rev 4442)
+++ source	2009-12-15 22:58:31 UTC (rev 4443)
@@ -48777,6 +48777,7 @@
    <dd>
 <pre class="idl">interface <dfn>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>
 
@@ -48784,9 +48785,107 @@
   allow the user to give the page access to a device, for example a
   video camera.</p>
 
-  <p class="XXX">device attribute</p>
-  <p class="XXX">processing model</p>
+  <p>The <dfn 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>
 
+  <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.</p>
+
+  <table>
+   <thead>
+    <tr>
+     <th>Keyword
+     <th>State
+     <th>Device description
+     <th>Examples
+   <tbody>
+    <tr>
+     <td><dfn 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 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 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.</p>
+
+  <div class="example">
+
+   <pre><p>To start chatting, select a video camera: <device type=media onchange="update(this.data)"></p>
+<video></video>
+<script>
+ function update(stream) {
+   document.getElementsByTagName('video')[0].src = stream.URL;
+ }
+</script></pre>
+
+  </div>
+
+
+  <h5>Stream API</h5>
+
+  <p>The <code>Stream</code> interface is used to represent
+  streams.</p>
+
+  <pre class="idl">interface <dfn>Stream</dfn> {
+  readonly attribute DOMString <span title="dom-stream-URL">URL</span>;
+  <span>StreamRecorder</span> <span title="dom-stream-record">record</span>();
+};</pre>
+
+  <p>The <dfn 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>
+
+  <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>
+
+  <p class="XXX">This will be pinned down to a specific codec, frame
+  dimension, and bitrate in due course.</p>
+
+  <p>When the <dfn
+  title="dom-stream-record"><code>record()</code></dfn> method is
+  invoked, the user agent must return a <code>StreamRecorder</code>
+  object associated with the stream.</p>
+
+  <pre class="idl">interface <dfn>StreamRecorder</dfn> {
+  <span>File</span> <span title="dom-StreamRecorder-stop">stop</span>();
+};</pre>
+
+  <p>The <dfn
+  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>StreamRecorder</code>
+  object and the invocation of the <code
+  title="dom-StreamRecorder-stop">stop()</code> method. <a
+  href="#refsFILEAPI">[FILEAPI]</a></p>
+
+  <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>
+
+  <p class="XXX">This again will be pinned down to a specific codec,
+  frame dimension, and bitrate in due course.</p>
+
+
 <!--END html-device-->
 <!--START html5-->
 




More information about the Commit-Watchers mailing list