- From: CVS User dburnett <cvsmail@w3.org>
- Date: Sun, 17 Aug 2014 13:18:15 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2011/webrtc/editor In directory roscoe:/tmp/cvs-serv30317 Modified Files: getusermedia.html Log Message: Added 20140817 archived version. --- /sources/public/2011/webrtc/editor/getusermedia.html 2014/07/04 11:48:26 1.35 +++ /sources/public/2011/webrtc/editor/getusermedia.html 2014/08/17 13:18:15 1.36 @@ -1,7 +1,7 @@ <!DOCTYPE html> -<html lang="en-us" typeof="bibo:Document " about="" property="dcterms:language" content="en"> +<html lang="en-us" xmlns:ns="http://www.w3.org/1999/xhtml" typeof="bibo:Document " about="" property="dcterms:language" content="en"> <head> - <style>/* --- EXAMPLES --- */ + <style>/* --- EXAMPLES --- */ div.example-title { min-width: 7.5em; color: #b9ab2d; @@ -338,11 +338,14 @@ } </style><link href="getusermedia.css" rel="stylesheet" type="text/css"> - <title>Media Capture and Streams</title> - <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> - - -<style>/***************************************************************** + <title>Media Capture and Streams</title> + + <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> + + + + + <style>/***************************************************************** * ReSpec 3 CSS * Robin Berjon - http://berjon.com/ *****************************************************************/ @@ -459,7 +462,7 @@ } </style><link href="https://www.w3.org/StyleSheets/TR/W3C-ED" rel="stylesheet"><!--[if lt IE 9]><script src='https://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--></head> -<body id="respecDocument" role="document" class="h-entry"><div id="respecHeader" role="contentinfo" class="head"> + <body id="respecDocument" role="document" class="h-entry"><div id="respecHeader" role="contentinfo" class="head"> <p> <a href="http://www.w3.org/"><img src="https://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"></a> @@ -467,11 +470,11 @@ </p> <h1 class="title p-name" id="title" property="dcterms:title">Media Capture and Streams</h1> - <h2 id="w3c-editor-s-draft-04-july-2014" property="dcterms:issued" datatype="xsd:dateTime" content="2014-07-04T09:59:36.000Z"><acronym title="World Wide Web Consortium">W3C</acronym> Editor's Draft <time class="dt-published" datetime="2014-07-04">04 July 2014</time></h2> + <h2 id="w3c-editor-s-draft-13-august-2014" property="dcterms:issued" datatype="xsd:dateTime" content="2014-08-14T01:33:08.000Z"><acronym title="World Wide Web Consortium">W3C</acronym> Editor's Draft <time class="dt-published" datetime="2014-08-13">13 August 2014</time></h2> <dl> <dt>This version:</dt> - <dd><a class="u-url" href="http://dev.w3.org/2011/webrtc/editor/archives/20140704/getusermedia.html">http://dev.w3.org/2011/webrtc/editor/archives/20140704/getusermedia.html</a></dd> + <dd><a class="u-url" href="http://dev.w3.org/2011/webrtc/editor/archives/20140817/getusermedia.html">http://dev.w3.org/2011/webrtc/editor/archives/20140817/getusermedia.html</a></dd> <dt>Latest published version:</dt> <dd><a href="http://www.w3.org/TR/mediacapture-streams/">http://www.w3.org/TR/mediacapture-streams/</a></dd> @@ -485,7 +488,7 @@ <dt>Previous editor's draft:</dt> - <dd><a href="http://dev.w3.org/2011/webrtc/editor/archives/20140619/getusermedia.html">http://dev.w3.org/2011/webrtc/editor/archives/20140619/getusermedia.html</a></dd> + <dd><a href="http://dev.w3.org/2011/webrtc/editor/archives/20140704/getusermedia.html">http://dev.w3.org/2011/webrtc/editor/archives/20140704/getusermedia.html</a></dd> @@ -513,10 +516,10 @@ <hr> </div> - <section rel="bibo:Chapter" resource="#abstract" typeof="bibo:Chapter" datatype="" property="dcterms:abstract" class="introductory" id="abstract"><h2 id="h2_abstract" role="heading" aria-level="1">Abstract</h2> - <p>This document defines a set of JavaScript APIs that allow local media, - including audio and video, to be requested from a platform.</p> - </section><section rel="bibo:Chapter" resource="#sotd" typeof="bibo:Chapter" id="sotd" class="introductory"><h2 id="h2_sotd" role="heading" aria-level="1">Status of This Document</h2> + <section rel="bibo:Chapter" resource="#abstract" typeof="bibo:Chapter" datatype="" property="dcterms:abstract" class="introductory" id="abstract"><h2 id="h2_abstract" role="heading" aria-level="1">Abstract</h2> + <p>This document defines a set of JavaScript APIs that allow local + media, including audio and video, to be requested from a platform.</p> + </section><section rel="bibo:Chapter" resource="#sotd" typeof="bibo:Chapter" id="sotd" class="introductory"><h2 id="h2_sotd" role="heading" aria-level="1">Status of This Document</h2> @@ -527,11 +530,11 @@ http://www.w3.org/TR/.</em> </p> - <p>This document is not complete. It is subject to major changes and, while - early experimentations are encouraged, it is therefore not intended for - implementation. The API is based on preliminary work done in the - WHATWG.</p> - + <p>This document is not complete. It is subject to major changes and, + while early experimentations are encouraged, it is therefore not + intended for implementation. The API is based on preliminary work done + in the WHATWG.</p> + <p> This document was published by the <a href="http://www.w3.org/2011/04/webrtc/">Web Real-Time Communication Working Group</a> and <a href="http://www.w3.org/2009/dap">Device APIs Working Group</a> as an Editor's Draft. @@ -580,34 +583,35 @@ </p> + <p>This document is governed by the <a id="w3c_process_revision" href="http://www.w3.org/2014/Process-20140801/">1 August 2014 <acronym title="World Wide Web Consortium">W3C</acronym> Process Document</a>. + </p> + + -</section><section id="toc"><h2 id="h2_toc" role="heading" aria-level="1" class="introductory">Table of Contents</h2><ul id="respecContents" role="directory" class="toc"><li class="tocline"><a class="tocxref" href="#intro"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a class="tocxref" href="#conformance"><span class="secno">2. </span>Conformance</a></li><li class="tocline"><a class="tocxref" href="#terminology"><span class="secno">3. </span>Terminology</a></li><li class="tocline"><a class="tocxref" href="#stream-api"><span class="secno">4. </span>MediaStream API</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#introduction"><span class="secno">4.1 </span>Introduction</a></li><li class="tocline"><a class="tocxref" href="#mediastream"><span class="secno">4.2 </span>MediaStream</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#constructors"><span class="secno">4.2.1 </span>Constructors</a></li><li class="tocline"><a class="tocxref" href="#attributes"><pan class="secno">4.2.2 </span>Attributes</a></li><li class="tocline"><a class="tocxref" href="#methods"><span class="secno">4.2.3 </span>Methods</a></li></ul></li><li class="tocline"><a class="tocxref" href="#mediastreamtrack"><span class="secno">4.3 </span>MediaStreamTrack</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#life-cycle-and-media-flow"><span class="secno">4.3.1 </span>Life-cycle and Media Flow</a></li><li class="tocline"><a class="tocxref" href="#tracks-and-constraints"><span class="secno">4.3.2 </span>Tracks and Constraints</a></li><li class="tocline"><a class="tocxref" href="#media-stream-track-interface-definition"><span class="secno">4.3.3 </span>Interface Definition</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes-1"><span class="secno">4.3.3.1 </span>Attributes</a></li><li class="tocline"><a class="tocxref" href="#methods-1"><span class="secno">4.3.3.2 </span>Methods</a></li></ul></li><li class="tocline"><a class="tocxref" href="#track-source-tyes"><span class="secno">4.3.4 </span>Track Source Types</a></li><li class="tocline"><a class="tocxref" href="#media-track-constraints"><span class="secno">4.3.5 </span>MediaTrackConstraints</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#dictionary-mediatrackconstraints-members"><span class="secno">4.3.5.1 </span>Dictionary <span class="formerLink"><code>MediaTrackConstraints</code></span> Members</a></li><li class="tocline"><a class="tocxref" href="#dictionary-mediatrackconstraintset-members"><span class="secno">4.3.5.2 </span>Dictionary <span class="formerLink"><code>MediaTrackConstraintSet</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a class="tocxref" href="#mediastreamtrackevent"><span class="secno">4.4 </span>MediaStreamTrackEvent</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#constructors-1"><span class="secno">4.4.1 </span>Constructors</a></li><li class="tocline"><a class="tocxref" href="#attributes-2"><span class="secno">4.4.2 </span>Attriutes</a></li><li class="tocline"><a class="tocxref" href="#dictionary-mediastreamtrackeventinit-members"><span class="secno">4.4.3 </span>Dictionary <span class="formerLink"><code>MediaStreamTrackEventInit</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a class="tocxref" href="#the-model-sources-sinks-constraints-and-settings"><span class="secno">5. </span>The model: sources, sinks, constraints, and settings</a></li><li class="tocline"><a class="tocxref" href="#mediastreams-as-media-elements"><span class="secno">6. </span>MediaStreams as Media Elements</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#direct-assignment-to-media-elements"><span class="secno">6.1 </span>Direct Assignment to Media Elements</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes-3"><span class="secno">6.1.1 </span>Attributes</a></li></ul></li><li class="tocline"><a class="tocxref" href="#loading-and-playing-a-mediastream-in-a-media-element"><span class="secno">6.2 </spanLoading and Playing a MediaStream in a Media Element</a></li><li class="tocline"><a class="tocxref" href="#media-element-attributes-when-playing-a-mediastream"><span class="secno">6.3 </span>Media Element Attributes when Playing a MediaStream</a></li></ul></li><li class="tocline"><a class="tocxref" href="#error-handling"><span class="secno">7. </span>Error Handling</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes-4"><span class="secno">7.1 </span>Attributes</a></li><li class="tocline"><a class="tocxref" href="#constructors-2"><span class="secno">7.2 </span>Constructors</a></li><li class="tocline"><a class="tocxref" href="#attributes-5"><span class="secno">7.3 </span>Attributes</a></li><li class="tocline"><a class="tocxref" href="#dictionary-mediastreamerroreventinit-members"><span class="secno">7.4 </span>Dictionary <span class="formerLink"><code>MediaStreamErrorEventInit</code></span> Members</a></li></ul></li><li class="tocline"><a class="tocxref" href="#event-summary"><span clas="secno">8. </span>Event summary</a></li><li class="tocline"><a class="tocxref" href="#enumerating-devices"><span class="secno">9. </span>Enumerating Local Media Devices</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#navigatorusermedia"><span class="secno">9.1 </span>NavigatorUserMedia</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes-6"><span class="secno">9.1.1 </span>Attributes</a></li></ul></li><li class="tocline"><a class="tocxref" href="#mediadevices"><span class="secno">9.2 </span>MediaDevices</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes-7"><span class="secno">9.2.1 </span>Attributes</a></li><li class="tocline"><a class="tocxref" href="#methods-2"><span class="secno">9.2.2 </span>Methods</a></li></ul></li><li class="tocline"><a class="tocxref" href="#device-info"><span class="secno">9.3 </span>Device Info</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#callback-mediadeviceinfocallback-parameters"><span class=secno">9.3.1 </span>Callback <span class="formerLink"><code>MediaDeviceInfoCallback</code></span> Parameters</a></li><li class="tocline"><a class="tocxref" href="#dictionary-mediadeviceinfo-members"><span class="secno">9.3.2 </span>Dictionary <span class="formerLink"><code>MediaDeviceInfo</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a class="tocxref" href="#local-content"><span class="secno">10. </span>Obtaining local multimedia content</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#navigatorusermedia-interface-extensions"><span class="secno">10.1 </span>NavigatorUserMedia Interface Extensions</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#methods-3"><span class="secno">10.1.1 </span>Methods</a></li></ul></li><li class="tocline"><a class="tocxref" href="#mediadevices-interface-extensions"><span class="secno">10.2 </span>MediaDevices Interface Extensions</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#methods-4"><span class="secno>10.2.1 </span>Methods</a></li></ul></li><li class="tocline"><a class="tocxref" href="#mediastreamconstraints"><span class="secno">10.3 </span>MediaStreamConstraints</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#dictionary-mediastreamconstraints-members"><span class="secno">10.3.1 </span>Dictionary <span class="formerLink"><code>MediaStreamConstraints</code></span> Members</a></li></ul></li><li class="tocline"><a class="tocxref" href="#navigatorusermediasuccesscallback"><span class="secno">10.4 </span>NavigatorUserMediaSuccessCallback</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#callback-navigatorusermediasuccesscallback-parameters"><span class="secno">10.4.1 </span>Callback <span class="formerLink"><code>NavigatorUserMediaSuccessCallback</code></span> Parameters</a></li></ul></li><li class="tocline"><a class="tocxref" href="#navigatorusermediaerrorcallback"><span class="secno">10.5 </span>NavigatorUserMediaErrorCallback</a><ul class="toc"><li class="tocline"><a class=tocxref" href="#callback-navigatorusermediaerrorcallback-parameters"><span class="secno">10.5.1 </span>Callback <span class="formerLink"><code>NavigatorUserMediaErrorCallback</code></span> Parameters</a></li></ul></li><li class="tocline"><a class="tocxref" href="#implementation-suggestions"><span class="secno">10.6 </span>Implementation Suggestions</a></li></ul></li><li class="tocline"><a class="tocxref" href="#constrainable-interface"><span class="secno">11. </span>Constrainable Pattern</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#interface-definition"><span class="secno">11.1 </span>Interface Definition</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes-8"><span class="secno">11.1.1 </span>Attributes</a></li><li class="tocline"><a class="tocxref" href="#methods-5"><span class="secno">11.1.2 </span>Methods</a></li><li class="tocline"><a class="tocxref" href="#applyconstraints-failure-callback"><span class="secno">11.1.3 </span>applyConstraints Failure Callback</><ul class="toc"></ul></li></ul></li><li class="tocline"><a class="tocxref" href="#registry"><span class="secno">11.2 </span>The Property Registry</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#dictionary-constraindoublerange-members"><span class="secno">11.2.1 </span>Dictionary <span class="formerLink"><code>ConstrainDoubleRange</code></span> Members</a></li><li class="tocline"><a class="tocxref" href="#dictionary-constrainlongrange-members"><span class="secno">11.2.2 </span>Dictionary <span class="formerLink"><code>ConstrainLongRange</code></span> Members</a></li><li class="tocline"><a class="tocxref" href="#dictionary-constraindomstringparameters-members"><span class="secno">11.2.3 </span>Dictionary <span class="formerLink"><code>ConstrainDOMStringParameters</code></span> Members</a></li><li class="tocline"><a class="tocxref" href="#dictionary-constrainvideofacingmodeparameters-members"><span class="secno">11.2.4 </span>Dictionary <span class="formerLink"><code>ConstrainVideoFacingModePrameters</code></span> Members</a></li></ul></li><li class="tocline"><a class="tocxref" href="#capabilities"><span class="secno">11.3 </span>Capabilities</a></li><li class="tocline"><a class="tocxref" href="#settings"><span class="secno">11.4 </span><span>Settings</span> - </a></li><li class="tocline"><a class="tocxref" href="#constraints"><span class="secno">11.5 </span><span>Constraints and ConstraintSet</span> - </a><ul class="toc"><li class="tocline"><a class="tocxref" href="#dictionary-constraints-members"><span class="secno">11.5.1 </span>Dictionary <span class="formerLink"><code>Constraints</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a class="tocxref" href="#examples"><span class="secno">12. </span>Examples</a></li><li class="tocline"><a class="tocxref" href="#error-names"><span class="secno">13. </span>Error Names</a></li><li class="tocline"><a class="tocxref" href="#privacy-and-security-considerations"><span class="secno">14. </span>Privacy and Security Considerations</a></li><li class="tocline"><a class="tocxref" href="#iana-registrations"><span class="secno">15. </span>IANA Registrations</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#track-property-registrations"><span class="secno">15.1 </span>Track Property Registrations</a></li></ul></li><li class="tocline"><a class="tocxref" href="#change-log"><span class="secno">16. </span>Change Log</a></li><li class"tocline"><a class="tocxref" href="#acknowledgements"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a class="tocxref" href="#references"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#normative-references"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a class="tocxref" href="#informative-references"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></section> - - - - - - <section rel="bibo:Chapter" resource="#intro" typeof="bibo:Chapter" class="informative" id="intro"> - <!--OddPage--><h2 id="h2_intro" role="heading" aria-level="1"><span class="secno">1. </span>Introduction</h2><p><em>This section is non-normative.</em></p> - - - <p>Access to multimedia streams (video, audio, or both) from local devices - (video cameras, microphones, Web cams) can have a number of uses, such as - real-time communication, recording, and surveillance.</p> +</section><section id="toc"><h2 id="h2_toc" role="heading" aria-level="1" class="introductory">Table of Contents</h2><ul id="respecContents" role="directory" class="toc"><li class="tocline"><a class="tocxref" href="#intro"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a class="tocxref" href="#conformance"><span class="secno">2. </span>Conformance</a></li><li class="tocline"><a class="tocxref" href="#terminology"><span class="secno">3. </span>Terminology</a></li><li class="tocline"><a class="tocxref" href="#stream-api"><span class="secno">4. </span>MediaStream API</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#introduction"><span class="secno">4.1 </span>Introduction</a></li><li class="tocline"><a class="tocxref" href="#mediastream"><span class="secno">4.2 </span>MediaStream</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#constructors"><span class="secno">4.2.1 </span>Constructors</a></li><li class="tocline"><a class="tocxref" href="#attributes"><pan class="secno">4.2.2 </span>Attributes</a></li><li class="tocline"><a class="tocxref" href="#methods"><span class="secno">4.2.3 </span>Methods</a></li></ul></li><li class="tocline"><a class="tocxref" href="#mediastreamtrack"><span class="secno">4.3 </span>MediaStreamTrack</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#life-cycle-and-media-flow"><span class="secno">4.3.1 </span>Life-cycle and Media Flow</a></li><li class="tocline"><a class="tocxref" href="#tracks-and-constraints"><span class="secno">4.3.2 </span>Tracks and Constraints</a></li><li class="tocline"><a class="tocxref" href="#media-stream-track-interface-definition"><span class="secno">4.3.3 </span>Interface Definition</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes-1"><span class="secno">4.3.3.1 </span>Attributes</a></li><li class="tocline"><a class="tocxref" href="#methods-1"><span class="secno">4.3.3.2 </span>Methods</a></li></ul></li><li class="tocline"><a class="tocxref" href="#track-source-tyes"><span class="secno">4.3.4 </span>Track Source Types</a></li><li class="tocline"><a class="tocxref" href="#media-track-constraints"><span class="secno">4.3.5 </span>MediaTrackConstraints</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#dictionary-mediatrackconstraints-members"><span class="secno">4.3.5.1 </span>Dictionary <span class="formerLink"><code>MediaTrackConstraints</code></span> Members</a></li><li class="tocline"><a class="tocxref" href="#dictionary-mediatrackconstraintset-members"><span class="secno">4.3.5.2 </span>Dictionary <span class="formerLink"><code>MediaTrackConstraintSet</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a class="tocxref" href="#mediastreamtrackevent"><span class="secno">4.4 </span>MediaStreamTrackEvent</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#constructors-1"><span class="secno">4.4.1 </span>Constructors</a></li><li class="tocline"><a class="tocxref" href="#attributes-2"><span class="secno">4.4.2 </span>Attriutes</a></li><li class="tocline"><a class="tocxref" href="#dictionary-mediastreamtrackeventinit-members"><span class="secno">4.4.3 </span>Dictionary <span class="formerLink"><code>MediaStreamTrackEventInit</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a class="tocxref" href="#the-model-sources-sinks-constraints-and-settings"><span class="secno">5. </span>The model: sources, sinks, constraints, and settings</a></li><li class="tocline"><a class="tocxref" href="#mediastreams-as-media-elements"><span class="secno">6. </span>MediaStreams as Media Elements</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#direct-assignment-to-media-elements"><span class="secno">6.1 </span>Direct Assignment to Media Elements</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes-3"><span class="secno">6.1.1 </span>Attributes</a></li></ul></li><li class="tocline"><a class="tocxref" href="#loading-and-playing-a-mediastream-in-a-media-element"><span class="secno">6.2 </spanLoading and Playing a MediaStream in a Media Element</a></li><li class="tocline"><a class="tocxref" href="#media-element-attributes-when-playing-a-mediastream"><span class="secno">6.3 </span>Media Element Attributes when Playing a MediaStream</a></li></ul></li><li class="tocline"><a class="tocxref" href="#error-handling"><span class="secno">7. </span>Error Handling</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes-4"><span class="secno">7.1 </span>Attributes</a></li><li class="tocline"><a class="tocxref" href="#constructors-2"><span class="secno">7.2 </span>Constructors</a></li><li class="tocline"><a class="tocxref" href="#attributes-5"><span class="secno">7.3 </span>Attributes</a></li><li class="tocline"><a class="tocxref" href="#dictionary-mediastreamerroreventinit-members"><span class="secno">7.4 </span>Dictionary <span class="formerLink"><code>MediaStreamErrorEventInit</code></span> Members</a></li></ul></li><li class="tocline"><a class="tocxref" href="#event-summary"><span clas="secno">8. </span>Event summary</a></li><li class="tocline"><a class="tocxref" href="#enumerating-devices"><span class="secno">9. </span>Enumerating Local Media Devices</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#navigatorusermedia"><span class="secno">9.1 </span>NavigatorUserMedia</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes-6"><span class="secno">9.1.1 </span>Attributes</a></li></ul></li><li class="tocline"><a class="tocxref" href="#mediadevices"><span class="secno">9.2 </span>MediaDevices</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes-7"><span class="secno">9.2.1 </span>Attributes</a></li><li class="tocline"><a class="tocxref" href="#methods-2"><span class="secno">9.2.2 </span>Methods</a></li></ul></li><li class="tocline"><a class="tocxref" href="#device-info"><span class="secno">9.3 </span>Device Info</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#callback-mediadeviceinfocallback-parameters"><span class=secno">9.3.1 </span>Callback <span class="formerLink"><code>MediaDeviceInfoCallback</code></span> Parameters</a></li><li class="tocline"><a class="tocxref" href="#dictionary-mediadeviceinfo-members"><span class="secno">9.3.2 </span>Dictionary <span class="formerLink"><code>MediaDeviceInfo</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a class="tocxref" href="#local-content"><span class="secno">10. </span>Obtaining local multimedia content</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#navigatorusermedia-interface-extensions"><span class="secno">10.1 </span>NavigatorUserMedia Interface Extensions</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#methods-3"><span class="secno">10.1.1 </span>Methods</a></li></ul></li><li class="tocline"><a class="tocxref" href="#mediadevices-interface-extensions"><span class="secno">10.2 </span>MediaDevices Interface Extensions</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#methods-4"><span class="secno>10.2.1 </span>Methods</a></li></ul></li><li class="tocline"><a class="tocxref" href="#mediastreamconstraints"><span class="secno">10.3 </span>MediaStreamConstraints</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#dictionary-mediastreamconstraints-members"><span class="secno">10.3.1 </span>Dictionary <span class="formerLink"><code>MediaStreamConstraints</code></span> Members</a></li></ul></li><li class="tocline"><a class="tocxref" href="#navigatorusermediasuccesscallback"><span class="secno">10.4 </span>NavigatorUserMediaSuccessCallback</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#callback-navigatorusermediasuccesscallback-parameters"><span class="secno">10.4.1 </span>Callback <span class="formerLink"><code>NavigatorUserMediaSuccessCallback</code></span> Parameters</a></li></ul></li><li class="tocline"><a class="tocxref" href="#navigatorusermediaerrorcallback"><span class="secno">10.5 </span>NavigatorUserMediaErrorCallback</a><ul class="toc"><li class="tocline"><a class=tocxref" href="#callback-navigatorusermediaerrorcallback-parameters"><span class="secno">10.5.1 </span>Callback <span class="formerLink"><code>NavigatorUserMediaErrorCallback</code></span> Parameters</a></li></ul></li><li class="tocline"><a class="tocxref" href="#implementation-suggestions"><span class="secno">10.6 </span>Implementation Suggestions</a></li></ul></li><li class="tocline"><a class="tocxref" href="#constrainable-interface"><span class="secno">11. </span>Constrainable Pattern</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#interface-definition"><span class="secno">11.1 </span>Interface Definition</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes-8"><span class="secno">11.1.1 </span>Attributes</a></li><li class="tocline"><a class="tocxref" href="#methods-5"><span class="secno">11.1.2 </span>Methods</a></li><li class="tocline"><a class="tocxref" href="#applyconstraints-failure-callback"><span class="secno">11.1.3 </span>applyConstraints Failure Callback</><ul class="toc"></ul></li></ul></li><li class="tocline"><a class="tocxref" href="#registry"><span class="secno">11.2 </span>The Property Registry</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#dictionary-constraindoublerange-members"><span class="secno">11.2.1 </span>Dictionary <span class="formerLink"><code>ConstrainDoubleRange</code></span> Members</a></li><li class="tocline"><a class="tocxref" href="#dictionary-constrainlongrange-members"><span class="secno">11.2.2 </span>Dictionary <span class="formerLink"><code>ConstrainLongRange</code></span> Members</a></li><li class="tocline"><a class="tocxref" href="#dictionary-constraindomstringparameters-members"><span class="secno">11.2.3 </span>Dictionary <span class="formerLink"><code>ConstrainDOMStringParameters</code></span> Members</a></li><li class="tocline"><a class="tocxref" href="#dictionary-constrainvideofacingmodeparameters-members"><span class="secno">11.2.4 </span>Dictionary <span class="formerLink"><code>ConstrainVideoFacingModePrameters</code></span> Members</a></li></ul></li><li class="tocline"><a class="tocxref" href="#capabilities"><span class="secno">11.3 </span>Capabilities</a></li><li class="tocline"><a class="tocxref" href="#settings"><span class="secno">11.4 </span> + <span>Settings</span> + </a></li><li class="tocline"><a class="tocxref" href="#constraints"><span class="secno">11.5 </span> + <span>Constraints and ConstraintSet</span> + </a></li></ul></li><li class="tocline"><a class="tocxref" href="#examples"><span class="secno">12. </span>Examples</a></li><li class="tocline"><a class="tocxref" href="#error-names"><span class="secno">13. </span>Error Names</a></li><li class="tocline"><a class="tocxref" href="#privacy-and-security-considerations"><span class="secno">14. </span>Privacy and Security Considerations</a></li><li class="tocline"><a class="tocxref" href="#iana-registrations"><span class="secno">15. </span>IANA Registrations</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#track-property-registrations"><span class="secno">15.1 </span>Track Property Registrations</a></li></ul></li><li class="tocline"><a class="tocxref" href="#change-log"><span class="secno">16. </span>Change Log</a></li><li class="tocline"><a class="tocxref" href="#acknowledgements"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a class="tocxref" href="#references"><span class="secno">B. </span>References</a><ulclass="toc"><li class="tocline"><a class="tocxref" href="#normative-references"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a class="tocxref" href="#informative-references"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></section> + - <p>This document defines the APIs used to get access to local devices that - can generate multimedia stream data. This document also defines the - MediaStream API by which JavaScript is able to manipulate the stream data - or otherwise process it.</p> - </section> + <section rel="bibo:Chapter" resource="#intro" typeof="bibo:Chapter" class="informative" id="intro"> + <!--OddPage--><h2 id="h2_intro" role="heading" aria-level="1"><span class="secno">1. </span>Introduction</h2><p><em>This section is non-normative.</em></p> + <p>Access to multimedia streams (video, audio, or both) from local + devices (video cameras, microphones, Web cams) can have a number of + uses, such as real-time communication, recording, and surveillance.</p> + + <p>This document defines the APIs used to get access to local devices + that can generate multimedia stream data. This document also defines the + MediaStream API by which JavaScript is able to manipulate the stream + data or otherwise process it.</p> + </section> - <section rel="bibo:Chapter" resource="#conformance" typeof="bibo:Chapter" id="conformance"><!--OddPage--><h2 id="h2_conformance" role="heading" aria-level="1"><span class="secno">2. </span>Conformance</h2> + <section rel="bibo:Chapter" resource="#conformance" typeof="bibo:Chapter" id="conformance"><!--OddPage--><h2 id="h2_conformance" role="heading" aria-level="1"><span class="secno">2. </span>Conformance</h2> <p> As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is @@ -618,4428 +622,4463 @@ and <em title="OPTIONAL" class="rfc2119">OPTIONAL</em> in this specification are to be interpreted as described in [<cite><a href="#bib-RFC2119" class="bibref">RFC2119</a></cite>]. </p> - <p>This specification defines conformance criteria that apply to a single - product: the <dfn id="dfn-user-agent">user agent</dfn> that implements the interfaces that it - contains.</p> - - - <p>Conformance requirements phrased as algorithms or specific steps may be - implemented in any manner, so long as the end result is equivalent. (In - particular, the algorithms defined in this specification are intended to be - easy to follow, and not intended to be performant.)</p> - + <p>This specification defines conformance criteria that apply to a + single product: the <dfn id="dfn-user-agent">user agent</dfn> that implements the interfaces + that it contains.</p> + + <p>Conformance requirements phrased as algorithms or specific steps may + be implemented in any manner, so long as the end result is equivalent. + (In particular, the algorithms defined in this specification are + intended to be easy to follow, and not intended to be performant.)</p> + + <p>Implementations that use ECMAScript to implement the APIs defined in + this specification must implement them in a manner consistent with the + ECMAScript Bindings defined in the Web IDL specification [<cite><a href="#bib-WEBIDL" class="bibref">WEBIDL</a></cite>], as + this specification uses that specification and terminology.</p> + </section> - <p>Implementations that use ECMAScript to implement the APIs defined in - this specification must implement them in a manner consistent with the - ECMAScript Bindings defined in the Web IDL specification [<cite><a href="#bib-WEBIDL" class="bibref">WEBIDL</a></cite>], as - this specification uses that specification and terminology.</p> - </section> + <section id="terminology"> + <!--OddPage--><h2 id="h2_terminology" role="heading" aria-level="1"><span class="secno">3. </span>Terminology</h2> + <dl> + <dt> + <i>HTML Terms:</i> + </dt> + + <dd> + <p>The <code> + <a href="http://dev.w3.org/html5/spec/webappapis.html#eventhandler">EventHandler</a> + </code> interface represents a callback used for event handlers as + defined in [<cite><a href="#bib-HTML5" class="bibref">HTML5</a></cite>].</p> + + <p>The concepts <dfn id="dfn-queue-a-task"> + <a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue + a task</a> + </dfn> and <dfn id="dfn-fires-a-simple-event"> + <a href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fires + a simple event</a> + </dfn> are defined in [<cite><a href="#bib-HTML5" class="bibref">HTML5</a></cite>].</p> + + <p>The terms <dfn id="dfn-event-handlers"> + <a href="http://dev.w3.org/html5/spec/webappapis.html#event-handlers">event + handlers</a> + </dfn> and <dfn id="dfn-event-handler-event-types"> + <a href="http://dev.w3.org/html5/spec/webappapis.html#event-handler-event-type"> + event handler event types</a> + </dfn> are defined in [<cite><a href="#bib-HTML5" class="bibref">HTML5</a></cite>].</p> + </dd> + + <dt> + <dfn id="dfn-source">source</dfn> + </dt> + + <dd> + <p>A source is the "thing" providing the source of a media stream + track. The source is the broadcaster of the media itself. A source + can be a physical webcam, microphone, local video or audio file from + the user's hard drive, network resource, or static image.</p> + + <p>Some sources have an identifier which <em class="rfc2119" title="must">must</em> be unique to the application (un-guessable by + another application) and persistent between application sessions + (e.g., the identifier for a given source device/application must + stay the same, but not be guessable by another application). Sources + that must have an identifier are camera and microphone sources; + local file sources are not required to have an identifier. Source + identifiers let the application save, identify the availability of, + and directly request specific sources.</p> + + <p>Other than the identifier, other bits of source identity are + <strong>never</strong> directly available to the application until + the user agent connects a source to a track. Once a source has been + "released" to the application (either via a permissions UI, + pre-configured allow-list, or some other release mechanism) the + application will be able discover additional source-specific + capabilities.</p> + + <p>Sources <strong>do not</strong> have constraints -- tracks have + constraints. When a source is connected to a track, it must, + possibly in combination with UA processing (e.g., downsampling), + conform to the constraints present on that track (or set of + tracks).</p> + + <p>Sources will be released (un-attached) from a track when the + track is ended for any reason.</p> + + <p>On the <code> + <a class="idlType" href="#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a> + </code> object, sources are represented by a <code> + <a class="internalDFN" href="#dfn-sourcetype">sourceType</a> + </code> attribute. The behavior of APIs associated with the + source's capabilities and settings change depending on the source + type.</p> + + <p>Sources have <code> + <a class="internalDFN" href="#dfn-capabilities">capabilities</a> + </code> and <code> + <a class="internalDFN" href="#dfn-settings">settings</a> + </code>. The capabilities and settings are "owned" by the source + and are common to any (multiple) tracks that happen to be using the + same source (e.g., if two different track objects bound to the same + source ask for the same capability or setting information, they will + get back the same answer).</p> + </dd> + + <dt> <a class="internalDFN" href="#dfn-setting">Setting</a> (Source Setting) </dt> + + <dd> + <p>A setting refers to the immediate, current value of the source's + (optionally constrained) capabilities. Settings are always + read-only.</p> + + <p>A source's settings can change dynamically over time due to + environmental conditions, sink configurations, or constraint + changes. A source's settings must always conform to the current set + of mandatory constraints that all of the tracks it is bound to have + defined, and should do its best to conform to the set of optional + constraints specified.</p> + + <p>Although settings are a property of the source, they are only + exposed to the application through the tracks attached to the + source. The <a class="idlType" href="#idl-def-ConstrainablePattern"><code>ConstrainablePattern</code></a> interface provides this + exposure.</p> + + <p>A conforming user-agent <em class="rfc2119" title="must">must</em> support all the setting names defined in this + spec.</p> + </dd> + + <dt> + <a class="internalDFN" href="#dfn-capabilities">Capabilities</a> + </dt> + + <dd> + <p>Source capabilities are the intrinsic "features" of a source + object. For each source setting, there is a corresponding capability + that describes whether it is supported by the source and if so, what + the range of supported values are. As with settings, capabilities + are exposed to the application via the <a class="idlType" href="#idl-def-ConstrainablePattern"><code>ConstrainablePattern</code></a> + interface.</p> + + <p>The values of the supported capabilities must be normalized to + the ranges and enumerated types defined in this specification.</p> + + <p>A <a class="internalDFN" href="#dfn-getcapabilities">getCapabilities()</a> call on a track returns the same + underlying per-source capabilities for all tracks connected to the + source.</p> + + <p>Source capabilities are effectively constant. Applications should + be able to depend on a specific source having the same capabilities + for any session.</p> + </dd> + + <dt> + <a class="idlType" href="#idl-def-Constraints"><code>Constraints</code></a> + </dt> + + <dd> + <p>Constraints are an optional track feature for restricting the + range of allowed variability on a source. Without provided track + constraints, implementations are free to select a source's settings + from the full ranges of its supported capabilities, and to adjust + those settings at any time for any reason.</p> + + <p>Constraints are exposed on tracks via the + <a class="idlType" href="#idl-def-ConstrainablePattern"><code>ConstrainablePattern</code></a> interface, which includes an API for + dynamically changing constraints. Note that <a class="internalDFN" href="#dom-mediadevices-getusermedia">getUserMedia()</a> + also permits an initial set of constraints to be applied when the + track is first obtained.</p> + + <p>It is possible for two tracks that share a unique source to apply + contradictory constraints. The <a class="idlType" href="#idl-def-ConstrainablePattern"><code>ConstrainablePattern</code></a> interface + supports the calling of an error handler when the conflicting + constraint is requested. After successful application of constraints + on a track (and its associated source), if at any later time the + track becomes <a class="internalDFN" href="#event-mediastreamtrack-overconstrained">overconstrained</a>, the user agent <em title="MUST" class="rfc2119">MUST</em> change the + track to the <a class="internalDFN" href="#track-muted">muted</a> state.</p> + + <p>A correspondingly-named constraint exists for each corresponding + source setting name and capability name. In general, user agents + will have more flexibility to optimize the media streaming + experience the fewer constraints are applied, so application authors + are strongly encouraged to use mandatory constraints sparingly.</p> + </dd> + + <dt> + <code>RTCPeerConnection</code> + </dt> + + <dd><dfn id="dfn-rtcpeerconnection"> + <code>RTCPeerConnection</code> + </dfn> is defined in [<cite><a href="#bib-WEBRTC10" class="bibref">WEBRTC10</a></cite>].</dd> + </dl> + </section> - <section id="terminology"> - <!--OddPage--><h2 id="h2_terminology" role="heading" aria-level="1"><span class="secno">3. </span>Terminology</h2> + <section rel="bibo:Chapter" resource="#stream-api" typeof="bibo:Chapter" id="stream-api"> + <!--OddPage--><h2 id="h2_stream-api" role="heading" aria-level="1"><span class="secno">4. </span>MediaStream API</h2> + <section id="introduction"> + <h3 id="h3_introduction" role="heading" aria-level="2"><span class="secno">4.1 </span>Introduction</h3> - <dl> - <dt><i>HTML Terms:</i> - </dt> + <p>The two main components in the MediaStream API are the <code> + <a class="idlType" href="#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a> + </code> and the <code> + <a class="idlType" href="#idl-def-MediaStream"><code>MediaStream</code></a> + </code> interfaces. The <code> + <a class="idlType" href="#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a> + </code> object represents media originating from a single media + source in the user agent, e.g. video from a web camera. A <code> + <a class="idlType" href="#idl-def-MediaStream"><code>MediaStream</code></a> + </code> is used group several <code> + <a class="idlType" href="#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a> + </code> objects into one unit that can be rendered in a media + element or recorded.</p> + + <p>Each <code> + <a class="idlType" href="#idl-def-MediaStream"><code>MediaStream</code></a> + </code> can contain zero or more <code> + <a class="idlType" href="#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a> + </code> objects. All tracks in a <code> + <a class="idlType" href="#idl-def-MediaStream"><code>MediaStream</code></a> + </code> are intended to be synchronized when rendered. Different + <code> + <a class="idlType" href="#idl-def-MediaStream"><code>MediaStream</code></a> + </code> objects do not need to be synchronized.</p> + + <div class="note"><div id="h_note_1" role="heading" aria-level="3" class="note-title"><span>Note</span></div><p class="">While the intent is to synchronize tracks, it could be + better in some circumstances to permit tracks to lose [8126 lines skipped]
Received on Sunday, 17 August 2014 13:18:18 UTC