- From: Ilkka Oksanen via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 24 Mar 2010 16:28:06 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/camera In directory hutz:/tmp/cvs-serv15467 Modified Files: Overview.html Log Message: -Added getViewFinder() function -Moved ViewFinder interface to API description section -Minor correction to ViewFinder example -Stated that if attribute is not applicaple it has value 0 Index: Overview.html =================================================================== RCS file: /sources/public/2009/dap/camera/Overview.html,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- Overview.html 24 Mar 2010 15:42:07 -0000 1.56 +++ Overview.html 24 Mar 2010 16:28:04 -0000 1.57 @@ -305,7 +305,38 @@ <dt>optional CaptureAudioOptions options </dt> <dd>Audio capture options. This parameter is OPTIONAL.</dd> </dl> - </dd></dl> + </dd> + + + <dt>PendingOperation getViewFinder () </dt> + <dd><p>...</p> + + <p>This method takes one or two arguments. When called, it + immediately returns a <a + href="#pendingoperation-interface"><code>PendingOperation</code></a> + object and then tries asynchronously return ViewFinder object of the + active capture device selected by the system or user.</p> + + <p class='note'>User consent must be verified.</p> + + <p>If successful, invoke the associated <code>successCB</code> + with a <a href="#mediaarray-typedef"> <code>ViewFinder</code></a> + argument. If the attempt fails, and the method was invoked with a + non-null <code>errorCallback</code> argument, this method must invoke + the <code>errorCallback</code> with a <a + href="#captureerror-interface"><code>CaptureError</code></a> object as + an argument.</p> + + <dl class="parameters"> + <dt>CaptureCB successCB </dt> + <dd>Function to call when the asynchronous operation completes </dd> + + <dt>optional CaptureErrorCB? errorCB </dt> + <dd>Function to call when the asynchronous operation + fails. This parameter is OPTIONAL.</dd> + </dl> + </dd> + </dl> </section> <section id="mediafile"><h3><a>MediaFile</a> interface</h3> @@ -337,15 +368,15 @@ <dt>attribute unsigned long height </dt> <dd>The height attribute represents height of the image or video - in pixels. Not applicable for a sound clip.</dd> + in pixels. In the case of a sound clip this attribute has value 0.</dd> <dt>attribute double duration </dt> <dd>The duration attribute represents length of the video or sound - clip in milliseconds. Not applicable for an image.</dd> + clip in milliseconds. In the case of a image this attribute has value 0.</dd> <dt>attribute unsigned long width </dt> <dd>The width attribute represents width of the image or video - in pixels. Not applicable for a sound clip.</dd> + in pixels. In the case of a sound clip this attribute has value 0.</dd> </dl> </section> @@ -432,7 +463,6 @@ </dl> </section> - </section> <section id="pendingoperation"><h3><a>PendingOperation</a> interface</h3> @@ -445,6 +475,38 @@ </dl> </section> + + <section id="viewfinder"> + <h3><a>ViewFinder</a> interface</h3> + + <p>This interface represents a camera viewfinder. It inherits from + <code>File</code> [[FILE-API]] and provides a method to embed a + viewfinder to web content.</p> + + <dl title='[NoInterfaceObject] interface ViewFinder : File' class='idl'> + + <dt>void startCapture ()</dt> + <dd> + <p> + Starts the capture process. + </p> + <dl class='parameters'> + <dt>Blob data</dt> + <dd> + The blob to write. + </dd> + </dl> + </dd> + <dt>void stopCapture ()</dt> + <dd> + <p> + Stops the capture process. + </p> + </dd> + + </dl> + + </section> </section> <section id="formaccess"> @@ -494,36 +556,8 @@ </pre> </section> - <section id="viewfinder"> -<h2><code>ViewFinder</code> interface</h2> - -<p> -This interface represents a camera viewfinder. It inherits from <code>File</code> [[FILE-API]] and provides a method to embed a viewfinder to web content. -</p> - -<dl title='[NoInterfaceObject] interface ViewFinder : File' class='idl'> - - <dt>void startCapture ()</dt> - <dd> - <p> - Starts the capture process. - </p> - <dl class='parameters'> - <dt>Blob data</dt> - <dd> - The blob to write. - </dd> - </dl> - </dd> - <dt>void stopCapture ()</dt> - <dd> - <p> - Stops the capture process. - </p> - </dd> - -</dl> +<h2>ViewFinder aware file-select control</h2> <p>Conforming user agents MUST provide the user a file picker from which it is possible to select any of the available capture devices in @@ -535,11 +569,10 @@ the File Upload state MUST contain one or more <code>ViewFinder</code> objects instead of <code>File</code> objects as in [[FILE-API]].</p> - <pre class="example example sh_javascript_dom"> <script> - function getVideo (sucCB) { + function getVideo () { var inp = document.createElement("input"); inp.type = "file"; inp.accept = "video/*"; @@ -582,6 +615,7 @@ </pre> </section> + </section> <section class='appendix' id="related">
Received on Wednesday, 24 March 2010 16:28:07 UTC