incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwbro...@apache.org
Subject [7/64] Add generated HTML documentation.
Date Thu, 12 Jul 2012 22:09:52 GMT
http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/62a5f4d2/www/cordova_media_capture_capture.md.html
----------------------------------------------------------------------
diff --git a/www/cordova_media_capture_capture.md.html b/www/cordova_media_capture_capture.md.html
new file mode 100644
index 0000000..9aa9e35
--- /dev/null
+++ b/www/cordova_media_capture_capture.md.html
@@ -0,0 +1,1134 @@
+<!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+--><html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
+<meta name="generator" content="joDoc">
+<title>Apache Cordova API Documentation</title>
+<link rel="stylesheet" type="text/css" href="index.css">
+<link rel="stylesheet" type="text/css" href="mobile.css" media="only screen and (max-device-width: 1024px)">
+<link rel="stylesheet" type="text/css" href="prettify/prettify.css">
+</head>
+<body>
+        <div id="header">
+            <h1><a href="index.html">Apache <strong>Cordova</strong> Documentation</a></h1>
+            <small>
+                <select><optgroup label="English" value="en"><option selected value="edge">edge</option></optgroup></select></small>
+        </div>
+        <div id="subheader">
+            <h1>Capture</h1>
+            <small><select><option value="Capture">Capture</option>
+<option value="Capture_objects">      - Objects</option>
+<option value="Capture_methods">      - Methods</option>
+<option value="Capture_scope">      - Scope</option>
+<option value="Capture_properties">      - Properties</option>
+<option value="Capture_methods">      - Methods</option>
+<option value="Capture_supported_platforms">      - Supported Platforms</option>
+<option value="Capture_permissions">      - Permissions</option>
+<option value="capture.captureAudio">capture.captureAudio</option>
+<option value="capture.captureAudio_description">      - Description</option>
+<option value="capture.captureAudio_supported_platforms">      - Supported Platforms</option>
+<option value="capture.captureAudio_quick_example">      - Quick Example</option>
+<option value="capture.captureAudio_full_example">      - Full Example</option>
+<option value="capture.captureAudio_blackberry_webworks_quirks">      - BlackBerry WebWorks Quirks</option>
+<option value="capture.captureAudio_ios_quirks">      - iOS Quirks</option>
+<option value="capture.captureAudio_windows_phone_7_quirks">      - Windows Phone 7 Quirks</option>
+<option value="CaptureAudioOptions">CaptureAudioOptions</option>
+<option value="CaptureAudioOptions_properties">      - Properties</option>
+<option value="CaptureAudioOptions_quick_example">      - Quick Example</option>
+<option value="CaptureAudioOptions_android_quirks">      - Android Quirks</option>
+<option value="CaptureAudioOptions_blackberry_webworks_quirks">      - BlackBerry WebWorks Quirks</option>
+<option value="CaptureAudioOptions_ios_quirks">      - iOS Quirks</option>
+<option value="capture.captureImage">capture.captureImage</option>
+<option value="capture.captureImage_description">      - Description</option>
+<option value="capture.captureImage_supported_platforms">      - Supported Platforms</option>
+<option value="capture.captureImage_windows_phone_7_quirks">      - Windows Phone 7 Quirks</option>
+<option value="capture.captureImage_quick_example">      - Quick Example</option>
+<option value="capture.captureImage_full_example">      - Full Example</option>
+<option value="CaptureImageOptions">CaptureImageOptions</option>
+<option value="CaptureImageOptions_properties">      - Properties</option>
+<option value="CaptureImageOptions_quick_example">      - Quick Example</option>
+<option value="CaptureImageOptions_android_quirks">      - Android Quirks</option>
+<option value="CaptureImageOptions_blackberry_webworks_quirks">      - BlackBerry WebWorks Quirks</option>
+<option value="CaptureImageOptions_ios_quirks">      - iOS Quirks</option>
+<option value="capture.captureVideo">capture.captureVideo</option>
+<option value="capture.captureVideo_description">      - Description</option>
+<option value="capture.captureVideo_supported_platforms">      - Supported Platforms</option>
+<option value="capture.captureVideo_quick_example">      - Quick Example</option>
+<option value="capture.captureVideo_full_example">      - Full Example</option>
+<option value="capture.captureVideo_blackberry_webworks_quirks">      - BlackBerry WebWorks Quirks</option>
+<option value="CaptureVideoOptions">CaptureVideoOptions</option>
+<option value="CaptureVideoOptions_properties">      - Properties</option>
+<option value="CaptureVideoOptions_quick_example">      - Quick Example</option>
+<option value="CaptureVideoOptions_android_quirks">      - Android Quirks</option>
+<option value="CaptureVideoOptions_blackberry_webworks_quirks">      - BlackBerry WebWorks Quirks</option>
+<option value="CaptureVideoOptions_ios_quirks">      - iOS Quirks</option>
+<option value="CaptureError">CaptureError</option>
+<option value="CaptureError_properties">      - Properties</option>
+<option value="CaptureError_constants">      - Constants</option>
+<option value="CaptureCB">CaptureCB</option>
+<option value="CaptureCB_description">      - Description</option>
+<option value="CaptureCB_quick_example">      - Quick Example</option>
+<option value="CaptureErrorCB">CaptureErrorCB</option>
+<option value="CaptureErrorCB_description">      - Description</option>
+<option value="CaptureErrorCB_quick_example">      - Quick Example</option>
+<option value="ConfigurationData">ConfigurationData</option>
+<option value="ConfigurationData_description">      - Description</option>
+<option value="ConfigurationData_properties">      - Properties</option>
+<option value="ConfigurationData_quick_example">      - Quick Example</option>
+<option value="MediaFile">MediaFile</option>
+<option value="MediaFile_properties">      - Properties</option>
+<option value="MediaFile_methods">      - Methods</option>
+<option value="MediaFile.getFormatData">MediaFile.getFormatData</option>
+<option value="MediaFile.getFormatData_description">      - Description</option>
+<option value="MediaFile.getFormatData_supported_platforms">      - Supported Platforms</option>
+<option value="MediaFile.getFormatData_blackberry_webworks_quirks">      - BlackBerry WebWorks Quirks</option>
+<option value="MediaFile.getFormatData_android_quirks">      - Android Quirks</option>
+<option value="MediaFile.getFormatData_ios_quirks">      - iOS Quirks</option>
+<option value="MediaFileData">MediaFileData</option>
+<option value="MediaFileData_properties">      - Properties</option>
+<option value="MediaFileData_blackberry_webworks_quirks">      - BlackBerry WebWorks Quirks</option>
+<option value="MediaFileData_android_quirks">      - Android Quirks</option>
+<option value="MediaFileData_ios_quirks">      - iOS Quirks</option></select></small>
+        </div>
+
+        <div id="sidebar">
+            <div class="vertical_divider"></div>
+        <h1>API Reference</h1>
+<ul>
+<li><a href="cordova_accelerometer_accelerometer.md.html#Accelerometer">Accelerometer</a></li>
+<li><a href="cordova_camera_camera.md.html#Camera">Camera</a></li>
+<li><a href="cordova_media_capture_capture.md.html#Capture">Capture</a></li>
+<li><a href="cordova_compass_compass.md.html#Compass">Compass</a></li>
+<li><a href="cordova_connection_connection.md.html#Connection">Connection</a></li>
+<li><a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></li>
+<li><a href="cordova_device_device.md.html#Device">Device</a></li>
+<li><a href="cordova_events_events.md.html#Events">Events</a></li>
+<li><a href="cordova_file_file.md.html#File">File</a></li>
+<li><a href="cordova_geolocation_geolocation.md.html#Geolocation">Geolocation</a></li>
+<li><a href="cordova_media_media.md.html#Media">Media</a></li>
+<li><a href="cordova_notification_notification.md.html#Notification">Notification</a></li>
+<li><a href="cordova_storage_storage.md.html#Storage">Storage</a></li>
+</ul>
+<h1>Guides</h1>
+<ul>
+<li><a href="guide_getting-started_index.md.html#Getting%20Started%20Guides">Getting Started Guides</a></li>
+<li><a href="guide_command-line_index.md.html#Command-Line%20Usage">Command-Line Usage</a></li>
+<li><a href="guide_upgrading_index.md.html#Upgrading%20Guides">Upgrading Guides</a></li>
+<li><a href="guide_whitelist_index.md.html#Domain%20Whitelist%20Guide">Domain Whitelist Guide</a></li>
+<li><a href="guide_cordova-webview_index.md.html#Embedding%20WebView">Embedding WebView</a></li>
+<li><a href="_index.html">Keyword Index</a></li>
+</ul>
+</div>
+
+        <div id="scrollable">
+            <div id="content">
+                <h1><a name="Capture">Capture</a></h1>
+
+<blockquote>
+  <p>Provides access to the audio, image, and video capture capabilities of the device.</p>
+</blockquote>
+
+<h2>
+<a name="Capture_objects">Objects</a>
+</h2>
+
+<ul>
+<li><a href="cordova_media_capture_capture.md.html#Capture">Capture</a></li>
+<li><a href="cordova_media_capture_capture.md.html#CaptureAudioOptions">CaptureAudioOptions</a></li>
+<li><a href="cordova_media_capture_capture.md.html#CaptureImageOptions">CaptureImageOptions</a></li>
+<li><a href="cordova_media_capture_capture.md.html#CaptureVideoOptions">CaptureVideoOptions</a></li>
+<li><a href="cordova_media_capture_capture.md.html#CaptureCB">CaptureCB</a></li>
+<li><a href="cordova_media_capture_capture.md.html#CaptureErrorCB">CaptureErrorCB</a></li>
+<li><a href="cordova_media_capture_capture.md.html#ConfigurationData">ConfigurationData</a></li>
+<li><a href="cordova_media_capture_capture.md.html#MediaFile">MediaFile</a></li>
+<li><a href="cordova_media_capture_capture.md.html#MediaFileData">MediaFileData</a></li>
+</ul>
+<h2>
+<a name="Capture_methods">Methods</a>
+</h2>
+
+<ul>
+<li><a href="cordova_media_capture_capture.md.html#capture.captureAudio">capture.captureAudio</a></li>
+<li><a href="cordova_media_capture_capture.md.html#capture.captureImage">capture.captureImage</a></li>
+<li><a href="cordova_media_capture_capture.md.html#capture.captureVideo">capture.captureVideo</a></li>
+<li><a href="cordova_media_capture_capture.md.html#MediaFile.getFormatData">MediaFile.getFormatData</a></li>
+</ul>
+<h2>
+<a name="Capture_scope">Scope</a>
+</h2>
+
+<p>The <strong>capture</strong> object is assigned to the <strong>navigator.device</strong> object, and therefore has global scope.</p>
+
+<pre class="prettyprint"><code>// The global capture object
+var capture = navigator.device.capture;
+</code></pre>
+
+<h2>
+<a name="Capture_properties">Properties</a>
+</h2>
+
+<ul>
+<li>
+<strong>supportedAudioModes:</strong> The audio recording formats supported by the device. (<a href="cordova_media_capture_capture.md.html#ConfigurationData">ConfigurationData</a>[])</li>
+<li>
+<strong>supportedImageModes:</strong> The recording image sizes and formats supported by the device. (<a href="cordova_media_capture_capture.md.html#ConfigurationData">ConfigurationData</a>[])</li>
+<li>
+<strong>supportedVideoModes:</strong> The recording video resolutions and formats supported by the device. (<a href="cordova_media_capture_capture.md.html#ConfigurationData">ConfigurationData</a>[])</li>
+</ul>
+<h2>
+<a name="Capture_methods">Methods</a>
+</h2>
+
+<ul>
+<li>
+<a href="cordova_media_capture_capture.md.html#capture.captureAudio">capture.captureAudio</a>: Launch the device audio recording application for recording audio clip(s).</li>
+<li>
+<a href="cordova_media_capture_capture.md.html#capture.captureImage">capture.captureImage</a>: Launch the device camera application for taking image(s).</li>
+<li>
+<a href="cordova_media_capture_capture.md.html#capture.captureVideo">capture.captureVideo</a>: Launch the device video recorder application for recording video(s).</li>
+</ul>
+<h2>
+<a name="Capture_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 ( Mango )</li>
+</ul>
+<h2>
+<a name="Capture_permissions">Permissions</a>
+</h2>
+
+<h3>Android</h3>
+
+<h4>app/res/xml/plugins.xml</h4>
+
+<pre class="prettyprint"><code>&lt;plugin name="<a href="cordova_media_capture_capture.md.html#Capture">Capture</a>" value="org.apache.cordova.<a href="cordova_media_capture_capture.md.html#Capture">Capture</a>"/&gt;
+</code></pre>
+
+<h4>app/AndroidManifest.xml</h4>
+
+<pre class="prettyprint"><code>&lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt;
+&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
+</code></pre>
+
+<h3>Bada</h3>
+
+<h4>manifest.xml</h4>
+
+<pre class="prettyprint"><code>&lt;Privilege&gt;
+    &lt;Name&gt;RECORDING&lt;/Name&gt;
+&lt;/Privilege&gt;
+</code></pre>
+
+<h3>BlackBerry WebWorks</h3>
+
+<h4>www/plugins.xml</h4>
+
+<pre class="prettyprint"><code>&lt;plugin name="<a href="cordova_media_capture_capture.md.html#Capture">Capture</a>" value="org.apache.cordova.capture.MediaCapture" /&gt;
+</code></pre>
+
+<h4>www/config.xml</h4>
+
+<pre class="prettyprint"><code>&lt;feature id="blackberry.system"  required="true" version="1.0.0.0" /&gt;
+&lt;feature id="blackberry.io.file" required="true" version="1.0.0.0" /&gt;
+</code></pre>
+
+<h3>iOS</h3>
+
+<h4>App/Supporting Files/Cordova.plist</h4>
+
+<pre class="prettyprint"><code>&lt;key&gt;Plugins&lt;/key&gt;
+&lt;dict&gt;
+    &lt;key&gt;<a href="cordova_media_capture_capture.md.html#Capture">Capture</a>&lt;/key&gt;
+    &lt;string&gt;CDVCapture&lt;/string&gt;
+&lt;/dict&gt;
+</code></pre>
+
+<h3>webOS</h3>
+
+<pre class="prettyprint"><code>No permissions are required.
+</code></pre>
+
+<h3>Windows Phone</h3>
+
+<h4>Properties/WPAppManifest.xml</h4>
+
+<pre class="prettyprint"><code>&lt;Capabilities&gt;
+    &lt;Capability Name="ID_CAP_MEDIALIB" /&gt;
+    &lt;Capability Name="ID_CAP_MICROPHONE" /&gt;
+    &lt;Capability Name="ID_HW_FRONTCAMERA" /&gt;
+    &lt;Capability Name="ID_CAP_ISV_CAMERA" /&gt;
+    &lt;Capability Name="ID_CAP_CAMERA" /&gt;
+&lt;/Capabilities&gt;
+</code></pre>
+
+<hr>
+<h1><a name="capture.captureAudio">capture.captureAudio</a></h1>
+
+<blockquote>
+  <p>Start the audio recorder application and return information about captured audio clip file(s).</p>
+</blockquote>
+
+<pre class="prettyprint"><code>navigator.device.<a href="cordova_media_capture_capture.md.html#capture.captureAudio">capture.captureAudio</a>( 
+    <a href="cordova_media_capture_capture.md.html#CaptureCB">CaptureCB</a> captureSuccess, <a href="cordova_media_capture_capture.md.html#CaptureErrorCB">CaptureErrorCB</a> captureError,  [<a href="cordova_media_capture_capture.md.html#CaptureAudioOptions">CaptureAudioOptions</a> options]
+);
+</code></pre>
+
+<h2>
+<a name="capture.captureAudio_description">Description</a>
+</h2>
+
+<p>This method starts an asynchronous operation to capture audio recordings using the device's default audio recording application.  The operation allows the device user to capture multiple recordings in a single session.</p>
+
+<p>The capture operation ends when either the user exits the audio recording application, or the maximum number of recordings, specified by the <strong>limit</strong> parameter in <a href="cordova_media_capture_capture.md.html#CaptureAudioOptions">CaptureAudioOptions</a>, has been reached.  If no value is provided for the <strong>limit</strong> parameter, a default value of one (1) is used, and the capture operation will terminate after the user records a single audio clip.</p>
+
+<p>When the capture operation is finished, it will invoke the <a href="cordova_media_capture_capture.md.html#CaptureCB">CaptureCB</a> callback with an array of <a href="cordova_media_capture_capture.md.html#MediaFile">MediaFile</a> objects describing each captured audio clip file.  If the operation is terminated by the user before an audio clip is captured, the <a href="cordova_media_capture_capture.md.html#CaptureErrorCB">CaptureErrorCB</a> callback will be invoked with a <a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a> object with the <a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a>.<code>CAPTURE_NO_MEDIA_FILES</code> error code.</p>
+
+<h2>
+<a name="capture.captureAudio_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 ( Mango )</li>
+</ul>
+<h2>
+<a name="capture.captureAudio_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// capture callback
+var captureSuccess = function(mediaFiles) {
+    var i, path, len;
+    for (i = 0, len = mediaFiles.length; i &lt; len; i += 1) {
+        path = mediaFiles[i].fullPath;
+        // do something interesting with the file
+    }
+};
+
+// capture error callback
+var captureError = function(error) {
+    navigator.<a href="cordova_notification_notification.md.html#notification.alert">notification.alert</a>('Error code: ' + error.code, null, '<a href="cordova_media_capture_capture.md.html#Capture">Capture</a> Error');
+};
+
+// start audio capture
+navigator.device.<a href="cordova_media_capture_capture.md.html#capture.captureAudio">capture.captureAudio</a>(captureSuccess, captureError, {limit:2});
+</code></pre>
+
+<h2>
+<a name="capture.captureAudio_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code>&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;title&gt;<a href="cordova_media_capture_capture.md.html#Capture">Capture</a> Audio&lt;/title&gt;
+
+    &lt;script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js"&gt;&lt;/script&gt;
+    &lt;script type="text/javascript" charset="utf-8" src="json2.js"&gt;&lt;/script&gt;
+    &lt;script type="text/javascript" charset="utf-8"&gt;
+
+    // Called when capture operation is finished
+    //
+    function captureSuccess(mediaFiles) {
+        var i, len;
+        for (i = 0, len = mediaFiles.length; i &lt; len; i += 1) {
+            uploadFile(mediaFiles[i]);
+        }       
+    }
+
+    // Called if something bad happens.
+    // 
+    function captureError(error) {
+        var msg = 'An error occurred during capture: ' + error.code;
+        navigator.<a href="cordova_notification_notification.md.html#notification.alert">notification.alert</a>(msg, null, 'Uh oh!');
+    }
+
+    // A button will call this function
+    //
+    function captureAudio() {
+        // Launch device audio recording application, 
+        // allowing user to capture up to 2 audio clips
+        navigator.device.<a href="cordova_media_capture_capture.md.html#capture.captureAudio">capture.captureAudio</a>(captureSuccess, captureError, {limit: 2});
+    }
+
+    // Upload files to server
+    function uploadFile(mediaFile) {
+        var ft = new <a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a>(),
+            path = mediaFile.fullPath,
+            name = mediaFile.name;
+
+        ft.upload(path,
+            "http://my.domain.com/upload.php",
+            function(result) {
+                console.log('Upload success: ' + result.responseCode);
+                console.log(result.bytesSent + ' bytes sent');
+            },
+            function(error) {
+                console.log('Error uploading file ' + path + ': ' + error.code);
+            },
+            { fileName: name });   
+    }
+
+    &lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+        &lt;button onclick="captureAudio();"&gt;<a href="cordova_media_capture_capture.md.html#Capture">Capture</a> Audio&lt;/button&gt; &lt;br&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
+</code></pre>
+
+<h2>
+<a name="capture.captureAudio_blackberry_webworks_quirks">BlackBerry WebWorks Quirks</a>
+</h2>
+
+<ul>
+<li>Cordova for BlackBerry WebWorks attempts to launch the <strong>Voice Notes Recorder</strong> application, provided by RIM, to capture the audio recordings.  The developer will receive a <a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a>.<code>CAPTURE_NOT_SUPPORTED</code> error code if the application is not installed on the device.</li>
+</ul>
+<h2>
+<a name="capture.captureAudio_ios_quirks">iOS Quirks</a>
+</h2>
+
+<ul>
+<li>iOS does not have a default audio recording application so a simple user interface is provided.</li>
+</ul>
+<h2>
+<a name="capture.captureAudio_windows_phone_7_quirks">Windows Phone 7 Quirks</a>
+</h2>
+
+<ul>
+<li>Windows Phone 7 does not have a default audio recording application so a simple user interface is provided.</li>
+</ul>
+<hr>
+<h1><a name="CaptureAudioOptions">CaptureAudioOptions</a></h1>
+
+<blockquote>
+  <p>Encapsulates audio capture configuration options.</p>
+</blockquote>
+
+<h2>
+<a name="CaptureAudioOptions_properties">Properties</a>
+</h2>
+
+<ul>
+<li>
+<strong>limit:</strong> The maximum number of audio clips the device user can record in a single capture operation.  The value must be greater than or equal to 1 (defaults to 1).</li>
+<li>
+<strong>duration:</strong> The maximum duration of an audio sound clip, in seconds.</li>
+<li>
+<strong>mode:</strong> The selected audio mode.  The value must match one of the elements in <code>capture.supportedAudioModes</code>.</li>
+</ul>
+<h2>
+<a name="CaptureAudioOptions_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// limit capture operation to 3 media files, no longer than 10 seconds each
+var options = { limit: 3, duration: 10 };
+
+navigator.device.<a href="cordova_media_capture_capture.md.html#capture.captureAudio">capture.captureAudio</a>(captureSuccess, captureError, options);
+</code></pre>
+
+<h2>
+<a name="CaptureAudioOptions_android_quirks">Android Quirks</a>
+</h2>
+
+<ul>
+<li>The <strong>duration</strong> parameter is not supported.  Recording lengths cannot be limited programmatically.</li>
+<li>The <strong>mode</strong> parameter is not supported.  The audio recording format cannot be altered programmatically.  Recordings are encoded using Adaptive Multi-Rate (AMR) format (audio/amr).</li>
+</ul>
+<h2>
+<a name="CaptureAudioOptions_blackberry_webworks_quirks">BlackBerry WebWorks Quirks</a>
+</h2>
+
+<ul>
+<li>The <strong>duration</strong> parameter is not supported.  Recording lengths cannot be limited programmatically.</li>
+<li>The <strong>mode</strong> parameter is not supported.  The audio recording format cannot be altered programmatically.  Recordings are encoded using Adaptive Multi-Rate (AMR) format (audio/amr).</li>
+</ul>
+<h2>
+<a name="CaptureAudioOptions_ios_quirks">iOS Quirks</a>
+</h2>
+
+<ul>
+<li>The <strong>limit</strong> parameter is not supported. One recording can be created for each invocation.</li>
+<li>The <strong>mode</strong> parameter is not supported.  The audio recording format cannot be altered programmatically.  Recordings are encoded using Waveform Audio (WAV) format (audio/wav).</li>
+</ul>
+<hr>
+<h1><a name="capture.captureImage">capture.captureImage</a></h1>
+
+<blockquote>
+  <p>Start the camera application and return information about captured image file(s).</p>
+</blockquote>
+
+<pre class="prettyprint"><code>navigator.device.<a href="cordova_media_capture_capture.md.html#capture.captureImage">capture.captureImage</a>( 
+    <a href="cordova_media_capture_capture.md.html#CaptureCB">CaptureCB</a> captureSuccess, <a href="cordova_media_capture_capture.md.html#CaptureErrorCB">CaptureErrorCB</a> captureError, [<a href="cordova_media_capture_capture.md.html#CaptureImageOptions">CaptureImageOptions</a> options]
+);
+</code></pre>
+
+<h2>
+<a name="capture.captureImage_description">Description</a>
+</h2>
+
+<p>This method starts an asynchronous operation to capture images using the device camera application.  The operation allows the device user to capture multiple images in a single session.</p>
+
+<p>The capture operation ends when either the user exits the camera application, or the maximum number of images, specified by the <strong>limit</strong> parameter in <a href="cordova_media_capture_capture.md.html#CaptureImageOptions">CaptureImageOptions</a>, has been reached.  If no value is provided for the <strong>limit</strong> parameter, a default value of one (1) is used, and the capture operation will terminate after the user captures a single image.</p>
+
+<p>When the capture operation is finished, it will invoke the <a href="cordova_media_capture_capture.md.html#CaptureCB">CaptureCB</a> callback with an array of <a href="cordova_media_capture_capture.md.html#MediaFile">MediaFile</a> objects describing each captured image file.  If the operation is terminated by the user before an image is captured, the <a href="cordova_media_capture_capture.md.html#CaptureErrorCB">CaptureErrorCB</a> callback will be invoked with a <a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a> object with the <a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a>.<code>CAPTURE_NO_MEDIA_FILES</code> error code.</p>
+
+<h2>
+<a name="capture.captureImage_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 ( Mango )</li>
+</ul>
+<h2>
+<a name="capture.captureImage_windows_phone_7_quirks">Windows Phone 7 Quirks</a>
+</h2>
+
+<p>Invoking the native camera application while your device is connected
+via Zune will not work, and the error callback will be triggered.</p>
+
+<h2>
+<a name="capture.captureImage_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// capture callback
+var captureSuccess = function(mediaFiles) {
+    var i, path, len;
+    for (i = 0, len = mediaFiles.length; i &lt; len; i += 1) {
+        path = mediaFiles[i].fullPath;
+        // do something interesting with the file
+    }
+};
+
+// capture error callback
+var captureError = function(error) {
+    navigator.<a href="cordova_notification_notification.md.html#notification.alert">notification.alert</a>('Error code: ' + error.code, null, '<a href="cordova_media_capture_capture.md.html#Capture">Capture</a> Error');
+};
+
+// start image capture
+navigator.device.<a href="cordova_media_capture_capture.md.html#capture.captureImage">capture.captureImage</a>(captureSuccess, captureError, {limit:2});
+</code></pre>
+
+<h2>
+<a name="capture.captureImage_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code>&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;title&gt;<a href="cordova_media_capture_capture.md.html#Capture">Capture</a> Image&lt;/title&gt;
+
+    &lt;script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js"&gt;&lt;/script&gt;
+    &lt;script type="text/javascript" charset="utf-8" src="json2.js"&gt;&lt;/script&gt;
+    &lt;script type="text/javascript" charset="utf-8"&gt;
+
+    // Called when capture operation is finished
+    //
+    function captureSuccess(mediaFiles) {
+        var i, len;
+        for (i = 0, len = mediaFiles.length; i &lt; len; i += 1) {
+            uploadFile(mediaFiles[i]);
+        }       
+    }
+
+    // Called if something bad happens.
+    // 
+    function captureError(error) {
+        var msg = 'An error occurred during capture: ' + error.code;
+        navigator.<a href="cordova_notification_notification.md.html#notification.alert">notification.alert</a>(msg, null, 'Uh oh!');
+    }
+
+    // A button will call this function
+    //
+    function captureImage() {
+        // Launch device camera application, 
+        // allowing user to capture up to 2 images
+        navigator.device.<a href="cordova_media_capture_capture.md.html#capture.captureImage">capture.captureImage</a>(captureSuccess, captureError, {limit: 2});
+    }
+
+    // Upload files to server
+    function uploadFile(mediaFile) {
+        var ft = new <a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a>(),
+            path = mediaFile.fullPath,
+            name = mediaFile.name;
+
+        ft.upload(path,
+            "http://my.domain.com/upload.php",
+            function(result) {
+                console.log('Upload success: ' + result.responseCode);
+                console.log(result.bytesSent + ' bytes sent');
+            },
+            function(error) {
+                console.log('Error uploading file ' + path + ': ' + error.code);
+            },
+            { fileName: name });   
+    }
+
+    &lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+        &lt;button onclick="captureImage();"&gt;<a href="cordova_media_capture_capture.md.html#Capture">Capture</a> Image&lt;/button&gt; &lt;br&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
+</code></pre>
+
+<hr>
+<h1><a name="CaptureImageOptions">CaptureImageOptions</a></h1>
+
+<blockquote>
+  <p>Encapsulates image capture configuration options.</p>
+</blockquote>
+
+<h2>
+<a name="CaptureImageOptions_properties">Properties</a>
+</h2>
+
+<ul>
+<li>
+<strong>limit:</strong> The maximum number of images the device user can capture in a single capture operation.  The value must be greater than or equal to 1 (defaults to 1).</li>
+<li>
+<strong>mode:</strong> The selected image mode.  The value must match one of the elements in <code>capture.supportedImageModes</code>.</li>
+</ul>
+<h2>
+<a name="CaptureImageOptions_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// limit capture operation to 3 images
+var options = { limit: 3 };
+
+navigator.device.<a href="cordova_media_capture_capture.md.html#capture.captureImage">capture.captureImage</a>(captureSuccess, captureError, options);
+</code></pre>
+
+<h2>
+<a name="CaptureImageOptions_android_quirks">Android Quirks</a>
+</h2>
+
+<ul>
+<li>The <strong>mode</strong> parameter is not supported.  The image size and format cannot be altered programmatically; however, the image size can be altered by the device user.  Images are saved in JPEG format (image/jpeg).</li>
+</ul>
+<h2>
+<a name="CaptureImageOptions_blackberry_webworks_quirks">BlackBerry WebWorks Quirks</a>
+</h2>
+
+<ul>
+<li>The <strong>mode</strong> parameter is not supported.  The image size and format cannot be altered programmatically; however, the image size can be altered by the device user.  Images are saved in JPEG format (image/jpeg).</li>
+</ul>
+<h2>
+<a name="CaptureImageOptions_ios_quirks">iOS Quirks</a>
+</h2>
+
+<ul>
+<li>The <strong>limit</strong> parameter is not supported. One image is taken per invocation.</li>
+<li>The <strong>mode</strong> parameter is not supported.  The image size and format cannot be altered programmatically.  Images are saved in JPEG format (image/jpeg).</li>
+</ul>
+<hr>
+<h1><a name="capture.captureVideo">capture.captureVideo</a></h1>
+
+<blockquote>
+  <p>Start the video recorder application and return information about captured video clip file(s).</p>
+</blockquote>
+
+<pre class="prettyprint"><code>navigator.device.<a href="cordova_media_capture_capture.md.html#capture.captureVideo">capture.captureVideo</a>( 
+    <a href="cordova_media_capture_capture.md.html#CaptureCB">CaptureCB</a> captureSuccess, <a href="cordova_media_capture_capture.md.html#CaptureErrorCB">CaptureErrorCB</a> captureError, [<a href="cordova_media_capture_capture.md.html#CaptureVideoOptions">CaptureVideoOptions</a> options]
+);
+</code></pre>
+
+<h2>
+<a name="capture.captureVideo_description">Description</a>
+</h2>
+
+<p>This method starts an asynchronous operation to capture video recordings using the device video recording application.  The operation allows the device user to capture multiple recordings in a single session.</p>
+
+<p>The capture operation ends when either the user exits the video recording application, or the maximum number of recordings, specified by the <strong>limit</strong> parameter in <a href="cordova_media_capture_capture.md.html#CaptureVideoOptions">CaptureVideoOptions</a>, has been reached.  If no value is provided for the <strong>limit</strong> parameter, a default value of one (1) is used, and the capture operation will terminate after the user records a single video clip.</p>
+
+<p>When the capture operation is finished, it will invoke the <a href="cordova_media_capture_capture.md.html#CaptureCB">CaptureCB</a> callback with an array of <a href="cordova_media_capture_capture.md.html#MediaFile">MediaFile</a> objects describing each captured video clip file.  If the operation is terminated by the user before an video clip is captured, the <a href="cordova_media_capture_capture.md.html#CaptureErrorCB">CaptureErrorCB</a> callback will be invoked with a <a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a> object with the <a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a>.<code>CAPTURE_NO_MEDIA_FILES</code> error code.</p>
+
+<h2>
+<a name="capture.captureVideo_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 ( Mango )</li>
+</ul>
+<h2>
+<a name="capture.captureVideo_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// capture callback
+var captureSuccess = function(mediaFiles) {
+    var i, path, len;
+    for (i = 0, len = mediaFiles.length; i &lt; len; i += 1) {
+        path = mediaFiles[i].fullPath;
+        // do something interesting with the file
+    }
+};
+
+// capture error callback
+var captureError = function(error) {
+    navigator.<a href="cordova_notification_notification.md.html#notification.alert">notification.alert</a>('Error code: ' + error.code, null, '<a href="cordova_media_capture_capture.md.html#Capture">Capture</a> Error');
+};
+
+// start video capture
+navigator.device.<a href="cordova_media_capture_capture.md.html#capture.captureVideo">capture.captureVideo</a>(captureSuccess, captureError, {limit:2});
+</code></pre>
+
+<h2>
+<a name="capture.captureVideo_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code>&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;title&gt;<a href="cordova_media_capture_capture.md.html#Capture">Capture</a> Video&lt;/title&gt;
+
+    &lt;script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js"&gt;&lt;/script&gt;
+    &lt;script type="text/javascript" charset="utf-8" src="json2.js"&gt;&lt;/script&gt;
+    &lt;script type="text/javascript" charset="utf-8"&gt;
+
+    // Called when capture operation is finished
+    //
+    function captureSuccess(mediaFiles) {
+        var i, len;
+        for (i = 0, len = mediaFiles.length; i &lt; len; i += 1) {
+            uploadFile(mediaFiles[i]);
+        }       
+    }
+
+    // Called if something bad happens.
+    // 
+    function captureError(error) {
+        var msg = 'An error occurred during capture: ' + error.code;
+        navigator.<a href="cordova_notification_notification.md.html#notification.alert">notification.alert</a>(msg, null, 'Uh oh!');
+    }
+
+    // A button will call this function
+    //
+    function captureVideo() {
+        // Launch device video recording application, 
+        // allowing user to capture up to 2 video clips
+        navigator.device.<a href="cordova_media_capture_capture.md.html#capture.captureVideo">capture.captureVideo</a>(captureSuccess, captureError, {limit: 2});
+    }
+
+    // Upload files to server
+    function uploadFile(mediaFile) {
+        var ft = new <a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a>(),
+            path = mediaFile.fullPath,
+            name = mediaFile.name;
+
+        ft.upload(path,
+            "http://my.domain.com/upload.php",
+            function(result) {
+                console.log('Upload success: ' + result.responseCode);
+                console.log(result.bytesSent + ' bytes sent');
+            },
+            function(error) {
+                console.log('Error uploading file ' + path + ': ' + error.code);
+            },
+            { fileName: name });   
+    }
+
+    &lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+        &lt;button onclick="captureVideo();"&gt;<a href="cordova_media_capture_capture.md.html#Capture">Capture</a> Video&lt;/button&gt; &lt;br&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
+</code></pre>
+
+<h2>
+<a name="capture.captureVideo_blackberry_webworks_quirks">BlackBerry WebWorks Quirks</a>
+</h2>
+
+<ul>
+<li>Cordova for BlackBerry WebWorks attempts to launch the <strong>Video Recorder</strong> application, provided by RIM, to capture the video recordings.  The developer will receive a <a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a>.<code>CAPTURE_NOT_SUPPORTED</code> error code if the application is not installed on the device.</li>
+</ul>
+<hr>
+<h1><a name="CaptureVideoOptions">CaptureVideoOptions</a></h1>
+
+<blockquote>
+  <p>Encapsulates video capture configuration options.</p>
+</blockquote>
+
+<h2>
+<a name="CaptureVideoOptions_properties">Properties</a>
+</h2>
+
+<ul>
+<li>
+<strong>limit:</strong> The maximum number of video clips the device user can capture in a single capture operation.  The value must be greater than or equal to 1 (defaults to 1).</li>
+<li>
+<strong>duration:</strong> The maximum duration of a video clip, in seconds.</li>
+<li>
+<strong>mode:</strong> The selected video capture mode.  The value must match one of the elements in <code>capture.supportedVideoModes</code>.</li>
+</ul>
+<h2>
+<a name="CaptureVideoOptions_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// limit capture operation to 3 video clips
+var options = { limit: 3 };
+
+navigator.device.<a href="cordova_media_capture_capture.md.html#capture.captureVideo">capture.captureVideo</a>(captureSuccess, captureError, options);
+</code></pre>
+
+<h2>
+<a name="CaptureVideoOptions_android_quirks">Android Quirks</a>
+</h2>
+
+<ul>
+<li>The <strong>duration</strong> parameter is not supported.  Recording lengths cannot be limited programmatically.</li>
+<li>The <strong>mode</strong> parameter is not supported.  The video size and format cannot be altered programmatically; however, these parameters can be changed by the device user. By default, videos are recorded in 3GPP (video/3gpp) format.</li>
+</ul>
+<h2>
+<a name="CaptureVideoOptions_blackberry_webworks_quirks">BlackBerry WebWorks Quirks</a>
+</h2>
+
+<ul>
+<li>The <strong>duration</strong> parameter is not supported.  Recording lengths cannot be limited programmatically.</li>
+<li>The <strong>mode</strong> parameter is not supported.  The video size and format cannot be altered programmatically; however, these parameters can be changed by the device user. By default, videos are recorded in 3GPP (video/3gpp) format.</li>
+</ul>
+<h2>
+<a name="CaptureVideoOptions_ios_quirks">iOS Quirks</a>
+</h2>
+
+<ul>
+<li>The <strong>limit</strong> parameter is not supported.  One video is recorded per invocation.</li>
+<li>The <strong>duration</strong> parameter is not supported.  Recording lengths cannot be limited programmatically.</li>
+<li>The <strong>mode</strong> parameter is not supported.  The video size and format cannot be altered programmatically. By default, videos are recorded in MOV (video/quicktime) format.</li>
+</ul>
+<hr>
+<h1><a name="CaptureError">CaptureError</a></h1>
+
+<blockquote>
+  <p>Encapsulates the error code resulting from a failed media capture operation.</p>
+</blockquote>
+
+<h2>
+<a name="CaptureError_properties">Properties</a>
+</h2>
+
+<ul>
+<li>
+<strong>code:</strong> One of the pre-defined error codes listed below.</li>
+</ul>
+<h2>
+<a name="CaptureError_constants">Constants</a>
+</h2>
+
+<ul>
+<li>
+<a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a>.<code>CAPTURE_INTERNAL_ERR</code>: <a href="cordova_camera_camera.md.html#Camera">Camera</a> or microphone failed to capture image or sound. </li>
+<li>
+<a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a>.<code>CAPTURE_APPLICATION_BUSY</code>: <a href="cordova_camera_camera.md.html#Camera">Camera</a> application or audio capture application is currently serving other capture request.</li>
+<li>
+<a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a>.<code>CAPTURE_INVALID_ARGUMENT</code>: Invalid use of the API (e.g. limit parameter has value less than one).</li>
+<li>
+<a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a>.<code>CAPTURE_NO_MEDIA_FILES</code>: User exited camera application or audio capture application before capturing anything.</li>
+<li>
+<a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a>.<code>CAPTURE_NOT_SUPPORTED</code>: The requested capture operation is not supported.</li>
+</ul>
+<hr>
+<h1><a name="CaptureCB">CaptureCB</a></h1>
+
+<blockquote>
+  <p>Invoked upon a successful media capture operation.</p>
+</blockquote>
+
+<pre class="prettyprint"><code>function captureSuccess( <a href="cordova_media_capture_capture.md.html#MediaFile">MediaFile</a>[] mediaFiles ) { ... };
+</code></pre>
+
+<h2>
+<a name="CaptureCB_description">Description</a>
+</h2>
+
+<p>This function is invoked after a successful capture operation has completed.  This means a media file has been captured, and either the user has exited the media capture application, or the capture limit has been reached.</p>
+
+<p>Each <a href="cordova_media_capture_capture.md.html#MediaFile">MediaFile</a> object describes a captured media file.  </p>
+
+<h2>
+<a name="CaptureCB_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// capture callback
+function captureSuccess(mediaFiles) {
+    var i, path, len;
+    for (i = 0, len = mediaFiles.length; i &lt; len; i += 1) {
+        path = mediaFiles[i].fullPath;
+        // do something interesting with the file
+    }
+};
+</code></pre>
+
+<hr>
+<h1><a name="CaptureErrorCB">CaptureErrorCB</a></h1>
+
+<blockquote>
+  <p>Invoked if an error occurs during a media capture operation.</p>
+</blockquote>
+
+<pre class="prettyprint"><code>function captureError( <a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a> error ) { ... };
+</code></pre>
+
+<h2>
+<a name="CaptureErrorCB_description">Description</a>
+</h2>
+
+<p>This function is invoked if an error occurs when trying to launch a media capture operation and the capture application is busy, if an error occurs while the capture operation is taking place, or if the capture operation has been canceled by the user before any media files have been captured.</p>
+
+<p>This function is invoked with a <a href="cordova_media_capture_capture.md.html#CaptureError">CaptureError</a> object containing an appropriate error code.</p>
+
+<h2>
+<a name="CaptureErrorCB_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// capture error callback
+var captureError = function(error) {
+    navigator.<a href="cordova_notification_notification.md.html#notification.alert">notification.alert</a>('Error code: ' + error.code, null, '<a href="cordova_media_capture_capture.md.html#Capture">Capture</a> Error');
+};
+</code></pre>
+
+<hr>
+<h1><a name="ConfigurationData">ConfigurationData</a></h1>
+
+<blockquote>
+  <p>Encapsulates a set of media capture parameters that a device supports.</p>
+</blockquote>
+
+<h2>
+<a name="ConfigurationData_description">Description</a>
+</h2>
+
+<p>This object is used to describe media capture modes supported by the device.  The configuration data includes the MIME type, and capture dimensions (for video or image capture).  </p>
+
+<p>The MIME types should adhere to <a class="external" href="http://www.ietf.org/rfc/rfc2046.txt">RFC2046</a>.  Examples:</p>
+
+<ul>
+<li>video/3gpp</li>
+<li>video/quicktime</li>
+<li>image/jpeg</li>
+<li>audio/amr</li>
+<li>audio/wav </li>
+</ul>
+<h2>
+<a name="ConfigurationData_properties">Properties</a>
+</h2>
+
+<ul>
+<li>
+<strong>type:</strong> The ASCII-encoded string in lower case representing the media type. (DOMString)</li>
+<li>
+<strong>height:</strong> The height of the image or video in pixels.  In the case of a sound clip, this attribute has value 0. (Number)</li>
+<li>
+<strong>width:</strong> The width of the image or video in pixels.  In the case of a sound clip, this attribute has value 0. (Number)</li>
+</ul>
+<h2>
+<a name="ConfigurationData_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// retrieve supported image modes
+var imageModes = navigator.device.capture.supportedImageModes;
+
+// Select mode that has the highest horizontal resolution
+var width = 0;
+var selectedmode;
+for each (var mode in imageModes) {
+    if (mode.width &gt; width) {
+        width = mode.width;
+        selectedmode = mode;
+    }
+}
+</code></pre>
+
+<p>Not supported by any platform.  All configuration data arrays are empty.</p>
+
+<hr>
+<h1><a name="MediaFile">MediaFile</a></h1>
+
+<blockquote>
+  <p>Encapsulates properties of a media capture file.</p>
+</blockquote>
+
+<h2>
+<a name="MediaFile_properties">Properties</a>
+</h2>
+
+<ul>
+<li>
+<strong>name:</strong> The name of the file, without path information. (DOMString)</li>
+<li>
+<strong>fullPath:</strong> The full path of the file, including the name. (DOMString)</li>
+<li>
+<strong>type:</strong> The mime type (DOMString)</li>
+<li>
+<strong>lastModifiedDate:</strong> The date and time that the file was last modified. (Date)</li>
+<li>
+<strong>size:</strong> The size of the file, in bytes. (Number)</li>
+</ul>
+<h2>
+<a name="MediaFile_methods">Methods</a>
+</h2>
+
+<ul>
+<li>
+<strong><a href="cordova_media_capture_capture.md.html#MediaFile.getFormatData">MediaFile.getFormatData</a>:</strong> Retrieves the format information of the media file.</li>
+</ul>
+<hr>
+<h1><a name="MediaFile.getFormatData">MediaFile.getFormatData</a></h1>
+
+<blockquote>
+  <p>Retrieves format information about the media capture file.</p>
+</blockquote>
+
+<pre class="prettyprint"><code>mediaFile.getFormatData( 
+    MediaFileDataSuccessCB successCallback, 
+    [MediaFileDataErrorCB errorCallback]
+);
+</code></pre>
+
+<h2>
+<a name="MediaFile.getFormatData_description">Description</a>
+</h2>
+
+<p>This function asynchronously attempts to retrieve the format information for the media file.  If successful, it invokes the MediaFileDataSuccessCB callback with a <a href="cordova_media_capture_capture.md.html#MediaFileData">MediaFileData</a> object.  If the attempt fails, this function will invoke the MediaFileDataErrorCB callback.</p>
+
+<h2>
+<a name="MediaFile.getFormatData_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 ( Mango )</li>
+</ul>
+<h2>
+<a name="MediaFile.getFormatData_blackberry_webworks_quirks">BlackBerry WebWorks Quirks</a>
+</h2>
+
+<p>There is no API that provides format information of media files.  Therefore, all <a href="cordova_media_capture_capture.md.html#MediaFileData">MediaFileData</a> objects will be returned with default values.  See <a href="cordova_media_capture_capture.md.html#MediaFileData">MediaFileData</a> documentation.</p>
+
+<h2>
+<a name="MediaFile.getFormatData_android_quirks">Android Quirks</a>
+</h2>
+
+<p>The API for retrieving media file format information is limited.  Therefore, not all <a href="cordova_media_capture_capture.md.html#MediaFileData">MediaFileData</a> properties are supported.  See <a href="cordova_media_capture_capture.md.html#MediaFileData">MediaFileData</a> documentation.</p>
+
+<h2>
+<a name="MediaFile.getFormatData_ios_quirks">iOS Quirks</a>
+</h2>
+
+<p>The API for retrieving media file format information is limited.  Therefore, not all <a href="cordova_media_capture_capture.md.html#MediaFileData">MediaFileData</a> properties are supported.  See <a href="cordova_media_capture_capture.md.html#MediaFileData">MediaFileData</a> documentation.</p>
+
+<hr>
+<h1><a name="MediaFileData">MediaFileData</a></h1>
+
+<blockquote>
+  <p>Encapsulates format information about a media file.</p>
+</blockquote>
+
+<h2>
+<a name="MediaFileData_properties">Properties</a>
+</h2>
+
+<ul>
+<li>
+<strong>codecs:</strong> The actual format of the audio and video content. (DOMString)</li>
+<li>
+<strong>bitrate:</strong> The average bitrate of the content.  In case of an image, this attribute has value 0. (Number)</li>
+<li>
+<strong>height:</strong> The height of the image or video in pixels. In the case of a sound clip, this attribute has value 0. (Number)</li>
+<li>
+<strong>width:</strong> The width of the image or video in pixels. In the case of a sound clip, this attribute has value 0. (Number)</li>
+<li>
+<strong>duration:</strong> The length of the video or sound clip in seconds. In the case of an image, this attribute has value 0. (Number)</li>
+</ul>
+<h2>
+<a name="MediaFileData_blackberry_webworks_quirks">BlackBerry WebWorks Quirks</a>
+</h2>
+
+<p>There is no API that provides format information of media files.  So the <a href="cordova_media_capture_capture.md.html#MediaFileData">MediaFileData</a> object returned by the <a href="cordova_media_capture_capture.md.html#MediaFile.getFormatData">MediaFile.getFormatData</a> function will have the following default values:</p>
+
+<ul>
+<li>
+<strong>codecs:</strong> Not supported. The attribute will always be null.</li>
+<li>
+<strong>bitrate:</strong> Not supported.  The attribute will always be 0.</li>
+<li>
+<strong>height:</strong> Not supported.  The attribute will always be 0.</li>
+<li>
+<strong>width:</strong> Not supported.  The attribute will always be 0.</li>
+<li>
+<strong>duration:</strong> Not supported.  The attribute will always be 0.</li>
+</ul>
+<h2>
+<a name="MediaFileData_android_quirks">Android Quirks</a>
+</h2>
+
+<p>Support for the <a href="cordova_media_capture_capture.md.html#MediaFileData">MediaFileData</a> properties is as follows:</p>
+
+<ul>
+<li>
+<strong>codecs:</strong> Not supported.  The attribute will always be null.</li>
+<li>
+<strong>bitrate:</strong> Not supported.  The attribute will always be 0.</li>
+<li>
+<strong>height:</strong> Supported.  (Image and video files only).  </li>
+<li>
+<strong>width:</strong> Supported.  (Image and video files only). </li>
+<li>
+<strong>duration:</strong> Supported.  (Audio and video files only).</li>
+</ul>
+<h2>
+<a name="MediaFileData_ios_quirks">iOS Quirks</a>
+</h2>
+
+<p>Support for the <a href="cordova_media_capture_capture.md.html#MediaFileData">MediaFileData</a> properties is as follows:</p>
+
+<ul>
+<li>
+<strong>codecs:</strong> Not supported.  The attribute will always be null.</li>
+<li>
+<strong>bitrate:</strong> Supported on iOS4 devices for audio only. The attribute will always be 0 for image and video.</li>
+<li>
+<strong>height:</strong> Supported.  (Image and video files only).  </li>
+<li>
+<strong>width:</strong> Supported.  (Image and video files only). </li>
+<li>
+<strong>duration:</strong> Supported.  (Audio and video files only).</li>
+</ul>
+</div>
+        </div>
+
+        <!-- Functionality and Syntax Highlighting -->
+        <script type="text/javascript" src="index.js"></script><script type="text/javascript" src="prettify/prettify.js"></script>
+</body>
+</html>


Mime
View raw message