cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwbro...@apache.org
Subject [07/12] Version 2.9.0
Date Wed, 26 Jun 2013 22:16:03 GMT
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/inappbrowser/inappbrowser.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/inappbrowser/inappbrowser.md b/docs/en/2.9.0/cordova/inappbrowser/inappbrowser.md
new file mode 100644
index 0000000..9300d81
--- /dev/null
+++ b/docs/en/2.9.0/cordova/inappbrowser/inappbrowser.md
@@ -0,0 +1,429 @@
+---
+license: 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.
+---
+
+InAppBrowser
+============
+
+> The `InAppBrowser` is a web browser that displays in the app when calling `window.open`.
+
+    var ref = window.open('http://apache.org', '_blank', 'location=yes');
+
+Description
+-----------
+
+The object returned from a call to `window.open`.
+
+Methods
+----------
+
+- addEventListener
+- removeEventListener
+- close
+- executeScript
+- insertCSS
+
+Permissions
+-----------
+
+### Android
+
+#### app/res/xml/config.xml
+
+    <plugin name="InAppBrowser" value="org.apache.cordova.InAppBrowser" />
+
+### iOS
+
+#### config.xml
+
+    <plugin name="InAppBrowser" value="CDVInAppBrowser" />
+
+### Windows Phone 7 + 8
+
+#### config.xml
+
+    <plugin name="InAppBrowser" />
+
+addEventListener
+================
+
+> Adds a listener for an event from the `InAppBrowser`.
+
+    ref.addEventListener(eventname, callback);
+
+- __ref__: reference to the `InAppBrowser` window _(InAppBrowser)_
+- __eventname__: the event to listen for _(String)_
+
+  - __loadstart__: event fires when the `InAppBrowser` starts to load a URL.
+  - __loadstop__: event fires when the `InAppBrowser` finishes loading a URL.
+  - __loaderror__: event fires when the `InAppBrowser` encounters an error when loading a URL.
+  - __exit__: event fires when the `InAppBrowser` window is closed.
+
+- __callback__: the function that executes when the event fires. The function is passed an `InAppBrowserEvent` object as a parameter.
+
+Supported Platforms
+-------------------
+
+- Android
+- iOS
+- Windows Phone 7 + 8
+
+Quick Example
+-------------
+
+    var ref = window.open('http://apache.org', '_blank', 'location=yes');
+    ref.addEventListener('loadstart', function() { alert(event.url); });
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>InAppBrowser.addEventListener Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for device API libraries to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // device APIs are available
+        //
+        function onDeviceReady() {
+             var ref = window.open('http://apache.org', '_blank', 'location=yes');
+             ref.addEventListener('loadstart', function(event) { alert('start: ' + event.url); });
+             ref.addEventListener('loadstop', function(event) { alert('stop: ' + event.url); });
+             ref.addEventListener('loaderror', function(event) { alert('error: ' + event.message); });
+             ref.addEventListener('exit', function(event) { alert(event.type); });
+        }
+
+        </script>
+      </head>
+      <body>
+      </body>
+    </html>
+
+removeEventListener
+===================
+
+> Removes a listener for an event from the `InAppBrowser`.
+
+    ref.removeEventListener(eventname, callback);
+
+- __ref__: reference to the `InAppBrowser` window. _(InAppBrowser)_
+- __eventname__: the event to stop listening for. _(String)_
+
+  - __loadstart__: event fires when the `InAppBrowser` starts to load a URL.
+  - __loadstop__: event fires when the `InAppBrowser` finishes loading a URL.
+  - __loaderror__: event fires when the `InAppBrowser` encounters an error loading a URL.
+  - __exit__: event fires when the `InAppBrowser` window is closed.
+
+- __callback__: the function to execute when the event fires.
+The function is passed an `InAppBrowserEvent` object.
+
+Supported Platforms
+-------------------
+
+- Android
+- iOS
+- Windows Phone 7 + 8
+
+Quick Example
+-------------
+
+    var ref = window.open('http://apache.org', '_blank', 'location=yes');
+    var myCallback = function() { alert(event.url); }
+    ref.addEventListener('loadstart', myCallback);
+    ref.removeEventListener('loadstart', myCallback);
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>InAppBrowser.removeEventListener Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for device API libraries to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // Global InAppBrowser reference
+        var iabRef = null;
+
+        function iabLoadStart(event) {
+            alert(event.type + ' - ' + event.url);
+        }
+
+        function iabLoadStop(event) {
+            alert(event.type + ' - ' + event.url);
+        }
+
+        function iabLoadError(event) {
+            alert(event.type + ' - ' + event.message);
+        }
+
+        function iabClose(event) {
+             alert(event.type);
+             iabRef.removeEventListener('loadstart', iabLoadStart);
+             iabRef.removeEventListener('loadstop', iabLoadStop);
+             iabRef.removeEventListener('loaderror', iabLoadError);
+             iabRef.removeEventListener('exit', iabClose);
+        }
+
+        // device APIs are available
+        //
+        function onDeviceReady() {
+             iabRef = window.open('http://apache.org', '_blank', 'location=yes');
+             iabRef.addEventListener('loadstart', iabLoadStart);
+             iabRef.addEventListener('loadstop', iabLoadStop);
+             iabRef.removeEventListener('loaderror', iabLoadError);
+             iabRef.addEventListener('exit', iabClose);
+        }
+
+        </script>
+      </head>
+      <body>
+      </body>
+    </html>
+
+close
+=====
+
+> Closes the `InAppBrowser` window.
+
+    ref.close();
+
+- __ref__: reference to the `InAppBrowser` window _(InAppBrowser)_
+
+Supported Platforms
+-------------------
+
+- Android
+- iOS
+- Windows Phone 7 + 8
+- BlackBerry 10
+
+Quick Example
+-------------
+
+    var ref = window.open('http://apache.org', '_blank', 'location=yes');
+    ref.close();
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>InAppBrowser.close Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for device API libraries to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // device APIs are available
+        //
+        function onDeviceReady() {
+             var ref = window.open('http://apache.org', '_blank', 'location=yes');
+             // close InAppBrowser after 5 seconds
+             setTimeout(function() {
+                 ref.close();
+             }, 5000);
+        }
+
+        </script>
+      </head>
+      <body>
+      </body>
+    </html>
+
+executeScript
+=============
+
+> Injects JavaScript code into the `InAppBrowser` window
+
+    ref.executeScript(details, callback);
+
+- __ref__: reference to the `InAppBrowser` window. _(InAppBrowser)_
+- __injectDetails__: details of the script to run, specifying either a `file` or `code` key. _(Object)_
+  - __file__: URL of the script to inject.
+  - __code__: Text of the script to inject.
+- __callback__: the function that executes after the JavaScript code is injected.
+    - If the injected script is of type `code`, the callback executes
+      with a single parameter, which is the return value of the
+      script, wrapped in an `Array`. For multi-line scripts, this is
+      the return value of the last statement, or the last expression
+      evaluated.
+
+Supported Platforms
+-------------------
+
+- Android
+- iOS
+
+Quick Example
+-------------
+
+    var ref = window.open('http://apache.org', '_blank', 'location=yes');
+    ref.addEventListener('loadstop', function() {
+        ref.executeSript({file: "myscript.js"});
+    });
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>InAppBrowser.executeScript Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for device API libraries to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // Global InAppBrowser reference
+        var iabRef = null;
+
+        // Inject our custom JavaScript into the InAppBrowser window
+        //
+        function replaceHeaderImage() {
+            iabRef.executeScript({
+                code: "var img=document.querySelector('#header img'); img.src='http://cordova.apache.org/images/cordova_bot.png';"
+            }, function() {
+                alert("Image Element Successfully Hijacked");
+            }
+        }
+
+        function iabClose(event) {
+             iabRef.removeEventListener('loadstop', replaceHeaderImage);
+             iabRef.removeEventListener('exit', iabClose);
+        }
+
+        // device APIs are available
+        //
+        function onDeviceReady() {
+             iabRef = window.open('http://apache.org', '_blank', 'location=yes');
+             iabRef.addEventListener('loadstop', replaceHeaderImage);
+             iabRef.addEventListener('exit', iabClose);
+        }
+
+        </script>
+      </head>
+      <body>
+      </body>
+    </html>
+
+insertCSS
+=========
+
+> Injects CSS into the `InAppBrowser` window.
+
+    ref.insertCSS(details, callback);
+
+- __ref__: reference to the `InAppBrowser` window _(InAppBrowser)_
+- __injectDetails__: details of the script to run, specifying either a `file` or `code` key. _(Object)_
+  - __file__: URL of the stylesheet to inject.
+  - __code__: Text of the stylesheet to inject.
+- __callback__: the function that executes after the CSS is injected.
+
+Supported Platforms
+-------------------
+
+- Android
+- iOS
+
+Quick Example
+-------------
+
+    var ref = window.open('http://apache.org', '_blank', 'location=yes');
+    ref.addEventListener('loadstop', function() {
+        ref.insertCSS({file: "mystyles.css"});
+    });
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>InAppBrowser.insertCSS Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for device API libraries to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // Global InAppBrowser reference
+        var iabRef = null;
+
+        // Inject our custom CSS into the InAppBrowser window
+        //
+        function changeBackgroundColor() {
+            iabRef.insertCSS({
+                code: "body { background: #ffff00"
+            }, function() {
+                alert("Styles Altered");
+            }
+        }
+
+        function iabClose(event) {
+             iabRef.removeEventListener('loadstop', changeBackgroundColor);
+             iabRef.removeEventListener('exit', iabClose);
+        }
+
+        // device APIs are available
+        //
+        function onDeviceReady() {
+             iabRef = window.open('http://apache.org', '_blank', 'location=yes');
+             iabRef.addEventListener('loadstop', changeBackgroundColor);
+             iabRef.addEventListener('exit', iabClose);
+        }
+
+        </script>
+      </head>
+      <body>
+      </body>
+    </html>
+
+InAppBrowserEvent
+=================
+
+The object that is passed to the callback function from an
+`addEventListener` call on an `InAppBrowser` object.
+
+Properties
+----------
+
+- __type__: the eventname, either `loadstart`, `loadstop`, `loaderror`, or `exit`. _(String)_
+- __url__: the URL that was loaded. _(String)_
+- __code__: the error code, only in the case of `loaderror`. _(Number)_
+- __message__: the error message, only in the case of `loaderror`. _(String)_

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/inappbrowser/window.open.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/inappbrowser/window.open.md b/docs/en/2.9.0/cordova/inappbrowser/window.open.md
new file mode 100644
index 0000000..f64eee5
--- /dev/null
+++ b/docs/en/2.9.0/cordova/inappbrowser/window.open.md
@@ -0,0 +1,100 @@
+---
+license: 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.
+---
+
+window.open
+===========
+
+Opens a URL in a new `InAppBrowser` instance, the current browser
+instance, or the system browser.
+
+    var ref = window.open(url, target, options);
+
+- __ref__: Reference to the `InAppBrowser` window. _(InAppBrowser)_
+- __url__: The URL to load _(String)_. Call `encodeURI()` on this if the URL contains Unicode characters.
+- __target__: The target in which to load the URL, an optional parameter that defaults to `_self`. _(String)_
+
+    - `_self`: Opens in the Cordova WebView if the URL is in the white list, otherwise it opens in the `InAppBrowser`.
+    - `_blank`: Opens in the `InAppBrowser`.
+    - `_system`: Opens in the system's web browser.
+
+- __options__: Options for the `InAppBrowser`. Optional, defaulting to: `location=yes`. _(String)_
+
+    The `options` string must not contain any blank space, and each feature's name/value pairs must be separated by a comma. Feature names are case insensitive. All platforms support the value below:
+
+    - __location__: Set to `yes` or `no` to turn the `InAppBrowser`'s location bar on or off.
+    
+    Android only
+    ------------
+    - __closebuttoncaption__ - set to a string that will be the caption for the "Done" button.
+
+    iOS only
+    --------
+    - __closebuttoncaption__ - set to a string that will be the caption for the "Done" button. Note that you will have to localize this value yourself.
+    - __toolbar__ -  set to 'yes' or 'no' to turn the toolbar on or off for the InAppBrowser (defaults to 'yes')
+    - __enableViewportScale__:  Set to `yes` or `no` to prevent viewport scaling through a meta tag (defaults to `no`).
+    - __mediaPlaybackRequiresUserAction__: Set to `yes` or `no` to prevent HTML5 audio or video from autoplaying (defaults to `no`).
+    - __allowInlineMediaPlayback__: Set to `yes` or `no` to allow inline HTML5 media playback, displaying within the browser window rather than a device-specific playback interface. The HTML's `video` element must also include the `webkit-playsinline` attribute (defaults to `no`)
+    - __keyboardDisplayRequiresUserAction__: Set to `yes` or `no` to open the keyboard when form elements receive focus via JavaScript's `focus()` call (defaults to `yes`).
+    - __suppressesIncrementalRendering__: Set to `yes` or `no` to wait until all new view content is received before being rendered (defaults to `no`).
+    - __presentationstyle__:  Set to `pagesheet`, `formsheet` or `fullscreen` to set the [presentation style](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (defaults to `fullscreen`).
+    - __transitionstyle__: Set to `fliphorizontal`, `crossdissolve` or `coververtical` to set the [transition style](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (defaults to `coververtical`).
+
+Supported Platforms
+-------------------
+
+- Android
+- iOS
+- BlackBerry 10
+- Windows Phone 7 + 8
+
+Quick Example
+-------------
+
+    var ref = window.open('http://apache.org', '_blank', 'location=yes');
+    var ref2 = window.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes');
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>window.open Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for device API libraries to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // device APIs are available
+        //
+        function onDeviceReady() {
+            // external url
+            var ref = window.open(encodeURI('http://apache.org'), '_blank', 'location=yes');
+            // relative document
+            ref = window.open('next.html', '_self');
+        }
+
+        </script>
+      </head>
+      <body>
+      </body>
+    </html>

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/MediaError/mediaError.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/MediaError/mediaError.md b/docs/en/2.9.0/cordova/media/MediaError/mediaError.md
new file mode 100644
index 0000000..5652a27
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/MediaError/mediaError.md
@@ -0,0 +1,45 @@
+---
+license: 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.
+---
+
+MediaError
+==========
+
+A `MediaError` object is returned to the `mediaError` callback
+function when an error occurs.
+
+Properties
+----------
+
+- __code__: One of the predefined error codes listed below.
+- __message__: An error message describing the details of the error.
+
+Constants
+---------
+
+- `MediaError.MEDIA_ERR_ABORTED`
+- `MediaError.MEDIA_ERR_NETWORK`
+- `MediaError.MEDIA_ERR_DECODE`
+- `MediaError.MEDIA_ERR_NONE_SUPPORTED`
+
+Description
+-----------
+
+The `MediaError` object is passed to a `mediaError` callback function
+when an error occurs.
+

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/Parameters/mediaError.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/Parameters/mediaError.md b/docs/en/2.9.0/cordova/media/Parameters/mediaError.md
new file mode 100644
index 0000000..08b4400
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/Parameters/mediaError.md
@@ -0,0 +1,33 @@
+---
+license: 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.
+---
+
+mediaError
+==========
+
+A user-specified callback function that executes when there is an
+error in media functions.
+
+    function(error) {
+        // Handle the error
+    }
+
+Parameters
+----------
+
+- __error__: The error returned by the device. _(MediaError)_

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/capture/CaptureCB.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/capture/CaptureCB.md b/docs/en/2.9.0/cordova/media/capture/CaptureCB.md
new file mode 100644
index 0000000..d1d7599
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/capture/CaptureCB.md
@@ -0,0 +1,47 @@
+---
+license: 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.
+---
+
+CaptureCB
+=========
+
+> Invoked upon a successful media capture operation.
+
+    function captureSuccess( MediaFile[] mediaFiles ) { ... };
+
+Description
+-----------
+
+This function executes after a successful capture operation completes.
+At this point a media file has been captured, and either the user has
+exited the media capture application, or the capture limit has been
+reached.
+
+Each `MediaFile` object describes a captured media file.
+
+Quick Example
+-------------
+
+    // capture callback
+    function captureSuccess(mediaFiles) {
+        var i, path, len;
+        for (i = 0, len = mediaFiles.length; i < len; i += 1) {
+            path = mediaFiles[i].fullPath;
+            // do something interesting with the file
+        }
+    };

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/capture/CaptureError.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/capture/CaptureError.md b/docs/en/2.9.0/cordova/media/capture/CaptureError.md
new file mode 100644
index 0000000..eb4a57d
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/capture/CaptureError.md
@@ -0,0 +1,37 @@
+---
+license: 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.
+---
+
+CaptureError
+============
+
+> Encapsulates the error code resulting from a failed media capture operation.
+
+Properties
+----------
+
+- __code__: One of the pre-defined error codes listed below.
+
+Constants
+---------
+
+- `CaptureError.CAPTURE_INTERNAL_ERR`: The camera or microphone failed to capture image or sound.
+- `CaptureError.CAPTURE_APPLICATION_BUSY`: The camera or audio capture application is currently serving another capture request.
+- `CaptureError.CAPTURE_INVALID_ARGUMENT`: Invalid use of the API (e.g. the value of `limit` is less than one).
+- `CaptureError.CAPTURE_NO_MEDIA_FILES`: The user exits the camera or audio capture application before capturing anything.
+- `CaptureError.CAPTURE_NOT_SUPPORTED`: The requested capture operation is not supported.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/capture/CaptureErrorCB.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/capture/CaptureErrorCB.md b/docs/en/2.9.0/cordova/media/capture/CaptureErrorCB.md
new file mode 100644
index 0000000..f3771e6
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/capture/CaptureErrorCB.md
@@ -0,0 +1,44 @@
+---
+license: 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.
+---
+
+CaptureErrorCB
+==============
+
+> Invoked if an error occurs during a media capture operation.
+
+    function captureError( CaptureError error ) { ... };
+
+Description
+-----------
+
+This function executes if an error occurs when trying to launch a
+media capture operation. Failure scenarios include when the capture
+application is busy, a capture operation is already taking place, or
+the user cancels the operation before any media files are captured.
+
+This function executes with a `CaptureError` object containing an
+appropriate error `code`.
+
+Quick Example
+-------------
+
+    // capture error callback
+    var captureError = function(error) {
+        navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
+    };

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/capture/ConfigurationData.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/capture/ConfigurationData.md b/docs/en/2.9.0/cordova/media/capture/ConfigurationData.md
new file mode 100644
index 0000000..361f45a
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/capture/ConfigurationData.md
@@ -0,0 +1,63 @@
+---
+license: 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.
+---
+
+ConfigurationData
+=================
+
+> Encapsulates a set of media capture parameters that a device supports.
+
+Description
+-----------
+
+Describes media capture modes supported by the device.  The
+configuration data includes the MIME type, and capture dimensions for
+video or image capture.
+
+The MIME types should adhere to [RFC2046](http://www.ietf.org/rfc/rfc2046.txt).  Examples:
+
+- `video/3gpp`
+- `video/quicktime`
+- `image/jpeg`
+- `audio/amr`
+- `audio/wav`
+
+Properties
+----------
+
+- __type__: The ASCII-encoded lowercase string representing the media type. (DOMString)
+- __height__: The height of the image or video in pixels.  The value is zero for sound clips. (Number)
+- __width__: The width of the image or video in pixels.  The value is zero for sound clips. (Number)
+
+Quick Example
+-------------
+
+    // 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 > width) {
+            width = mode.width;
+            selectedmode = mode;
+        }
+    }
+
+Not supported by any platform.  All configuration data arrays are empty.

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/capture/MediaFile.getFormatData.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/capture/MediaFile.getFormatData.md b/docs/en/2.9.0/cordova/media/capture/MediaFile.getFormatData.md
new file mode 100644
index 0000000..321958c
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/capture/MediaFile.getFormatData.md
@@ -0,0 +1,64 @@
+---
+license: 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.
+---
+
+MediaFile.getFormatData
+=======================
+
+> Retrieves format information about the media capture file.
+
+    mediaFile.getFormatData(
+        MediaFileDataSuccessCB successCallback,
+        [MediaFileDataErrorCB errorCallback]
+    );
+
+Description
+-----------
+
+This function asynchronously attempts to retrieve the format
+information for the media file.  If successful, it invokes the
+`MediaFileDataSuccessCB` callback with a `MediaFileData` object.  If
+the attempt fails, this function invokes the `MediaFileDataErrorCB`
+callback.
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Windows 8
+
+BlackBerry WebWorks Quirks
+--------------------------
+
+Does not provide an API for information about media files, so all
+`MediaFileData` objects return with default values.
+
+Android Quirks
+--------------
+
+The API to access media file format information is limited, so not all
+`MediaFileData` properties are supported.
+
+iOS Quirks
+----------
+
+The API to access media file format information is limited, so not all
+`MediaFileData` properties are supported.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/capture/MediaFile.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/capture/MediaFile.md b/docs/en/2.9.0/cordova/media/capture/MediaFile.md
new file mode 100644
index 0000000..3bca7aa
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/capture/MediaFile.md
@@ -0,0 +1,37 @@
+---
+license: 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.
+---
+
+MediaFile
+=========
+
+> Encapsulates properties of a media capture file.
+
+Properties
+----------
+
+- __name__: The name of the file, without path information. (DOMString)
+- __fullPath__: The full path of the file, including the name. (DOMString)
+- __type__: The file's mime type (DOMString)
+- __lastModifiedDate__: The date and time when the file was last modified. (Date)
+- __size__: The size of the file, in bytes. (Number)
+
+Methods
+-------
+
+- __MediaFile.getFormatData__: Retrieves the format information of the media file.

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/capture/MediaFileData.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/capture/MediaFileData.md b/docs/en/2.9.0/cordova/media/capture/MediaFileData.md
new file mode 100644
index 0000000..5458b68
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/capture/MediaFileData.md
@@ -0,0 +1,65 @@
+---
+license: 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.
+---
+
+MediaFileData
+=============
+
+> Encapsulates format information about a media file.
+
+Properties
+----------
+
+- __codecs__: The actual format of the audio and video content. (DOMString)
+- __bitrate__: The average bitrate of the content.  The value is zero for images. (Number)
+- __height__: The height of the image or video in pixels. The value is zero for audio clips. (Number)
+- __width__: The width of the image or video in pixels. The value is zero for audio clips. (Number)
+- __duration__: The length of the video or sound clip in seconds. The value is zero for images. (Number)
+
+BlackBerry WebWorks Quirks
+--------------------------
+
+No API provides format information for media files, so the
+`MediaFileData` object returned by `MediaFile.getFormatData` features
+the following default values:
+
+- __codecs__: Not supported, and returns `null`.
+- __bitrate__: Not supported, and returns zero.
+- __height__: Not supported, and returns zero.
+- __width__: Not supported, and returns zero.
+- __duration__: Not supported, and returns zero.
+
+Android Quirks
+--------------
+Supports the following `MediaFileData` properties:
+
+- __codecs__: Not supported, and returns `null`.
+- __bitrate__: Not supported, and returns zero.
+- __height__: Supported: image and video files only.
+- __width__: Supported: image and video files only.
+- __duration__: Supported: audio and video files only.
+
+iOS Quirks
+----------
+Supports the following `MediaFileData` properties:
+
+- __codecs__: Not supported, and returns null.
+- __bitrate__: Supported on iOS4 devices for audio only. Returns zero for images and videos.
+- __height__: Supported: image and video files only.
+- __width__: Supported: image and video files only.
+- __duration__: Supported: audio and video files only.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/capture/capture.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/capture/capture.md b/docs/en/2.9.0/cordova/media/capture/capture.md
new file mode 100644
index 0000000..1e3ec56
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/capture/capture.md
@@ -0,0 +1,121 @@
+---
+license: 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.
+---
+
+Capture
+=======
+
+> Provides access to the device's audio, image, and video capture capabilities.
+
+**Important privacy note:** Collection and use of images, video, or audio from the device's camera or microphone raises important privacy issues.  Your app's [privacy policy](guide_getting-started_index.md.html) should discuss how the app uses such sensors and whether the data recorded is shared with any other parties.  In addition, if the app's use of the camera or microphone is not apparent in the user interface, you should provide a just-in-time notice prior to your app accessing the camera or microphone (if the device operating system doesn't do so already). That notice should provide the same information noted above, as well as obtaining the user's permission (e.g., by presenting choices for "OK" and "No Thanks").  Note that some app marketplaces may require your app to provide just-in-time notice and obtain permission from the user prior to accessing the camera or microphone.  For more information, please see the Privacy Guide.
+
+Objects
+-------
+
+- Capture
+- CaptureAudioOptions
+- CaptureImageOptions
+- CaptureVideoOptions
+- CaptureCallback
+- CaptureErrorCB
+- ConfigurationData
+- MediaFile
+- MediaFileData
+
+Methods
+-------
+
+- capture.captureAudio
+- capture.captureImage
+- capture.captureVideo
+- MediaFile.getFormatData
+
+Scope
+-----
+
+The `capture` object is assigned to the `navigator.device` object, and
+therefore has global scope.
+
+    // The global capture object
+    var capture = navigator.device.capture;
+
+Properties
+----------
+
+- __supportedAudioModes__: The audio recording formats supported by the device. (ConfigurationData[])
+- __supportedImageModes__: The recording image sizes and formats supported by the device. (ConfigurationData[])
+- __supportedVideoModes__: The recording video resolutions and formats supported by the device. (ConfigurationData[])
+
+Methods
+-------
+
+- `capture.captureAudio`: Launch the device's audio recording application to record audio clips.
+- `capture.captureImage`: Launch the device's camera application to take photos.
+- `capture.captureVideo`: Launch the device's video recorder application to record videos.
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Windows 8
+
+Permissions
+-----------
+
+### Android
+
+#### app/res/xml/plugins.xml
+
+    <plugin name="Capture" value="org.apache.cordova.Capture"/>
+
+#### app/AndroidManifest.xml
+
+    <uses-permission android:name="android.permission.RECORD_AUDIO" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+
+### BlackBerry WebWorks
+
+#### www/plugins.xml
+
+    <plugin name="Capture" value="org.apache.cordova.capture.MediaCapture" />
+
+#### www/config.xml
+
+    <feature id="blackberry.system"  required="true" version="1.0.0.0" />
+    <feature id="blackberry.io.file" required="true" version="1.0.0.0" />
+
+### iOS
+
+#### config.xml
+
+    <plugin name="Capture" value="CDVCapture" />
+
+### Windows Phone
+
+#### Properties/WPAppManifest.xml
+
+    <Capabilities>
+        <Capability Name="ID_CAP_MEDIALIB" />
+        <Capability Name="ID_CAP_MICROPHONE" />
+        <Capability Name="ID_HW_FRONTCAMERA" />
+        <Capability Name="ID_CAP_ISV_CAMERA" />
+        <Capability Name="ID_CAP_CAMERA" />
+    </Capabilities>

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/capture/captureAudio.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/capture/captureAudio.md b/docs/en/2.9.0/cordova/media/capture/captureAudio.md
new file mode 100644
index 0000000..30ad560
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/capture/captureAudio.md
@@ -0,0 +1,152 @@
+---
+license: 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.
+---
+
+capture.captureAudio
+====================
+
+> Start the audio recorder application and return information about the captured audio clip file(s).
+
+    navigator.device.capture.captureAudio(
+        CaptureCB captureSuccess, CaptureErrorCB captureError,  [CaptureAudioOptions options]
+    );
+
+Description
+-----------
+
+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.
+
+The capture operation ends when either the user exits the audio
+recording application, or the maximum number of recordings specified
+by `CaptureAudioOptions.limit` is reached.  If no `limit` parameter
+value is specified, it defaults to one (1), and the capture operation
+terminates after the user records a single audio clip.
+
+When the capture operation finishes, the `CaptureCallback` executes
+with an array of `MediaFile` objects describing each captured audio
+clip file.  If the user terminates the operation before an audio clip
+is captured, the `CaptureErrorCallback` executes with a `CaptureError`
+object, featuring the `CaptureError.CAPTURE_NO_MEDIA_FILES` error
+code.
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Windows 8
+
+Quick Example
+-------------
+
+    // capture callback
+    var captureSuccess = function(mediaFiles) {
+        var i, path, len;
+        for (i = 0, len = mediaFiles.length; i < len; i += 1) {
+            path = mediaFiles[i].fullPath;
+            // do something interesting with the file
+        }
+    };
+
+    // capture error callback
+    var captureError = function(error) {
+        navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
+    };
+
+    // start audio capture
+    navigator.device.capture.captureAudio(captureSuccess, captureError, {limit:2});
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Capture Audio</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8" src="json2.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Called when capture operation is finished
+        //
+        function captureSuccess(mediaFiles) {
+            var i, len;
+            for (i = 0, len = mediaFiles.length; i < len; i += 1) {
+                uploadFile(mediaFiles[i]);
+            }
+        }
+
+        // Called if something bad happens.
+        //
+        function captureError(error) {
+            var msg = 'An error occurred during capture: ' + error.code;
+            navigator.notification.alert(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.capture.captureAudio(captureSuccess, captureError, {limit: 2});
+        }
+
+        // Upload files to server
+        function uploadFile(mediaFile) {
+            var ft = new FileTransfer(),
+                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 });
+        }
+
+        </script>
+        </head>
+        <body>
+            <button onclick="captureAudio();">Capture Audio</button> <br>
+        </body>
+    </html>
+
+BlackBerry WebWorks Quirks
+--------------------------
+
+- Cordova for BlackBerry WebWorks attempts to launch the __Voice Notes Recorder__ application, provided by RIM, to capture audio recordings. The app receives a `CaptureError.CAPTURE_NOT_SUPPORTED` error code if the application is not installed on the device.
+
+iOS Quirks
+----------
+
+- iOS does not have a default audio recording application, so a simple user interface is provided.
+
+Windows Phone 7 and 8 Quirks
+----------
+
+- Windows Phone 7 does not have a default audio recording application, so a simple user interface is provided.

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/capture/captureAudioOptions.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/capture/captureAudioOptions.md b/docs/en/2.9.0/cordova/media/capture/captureAudioOptions.md
new file mode 100644
index 0000000..c7d7ac2
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/capture/captureAudioOptions.md
@@ -0,0 +1,52 @@
+---
+license: 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.
+---
+
+CaptureAudioOptions
+===================
+
+> Encapsulates audio capture configuration options.
+
+Properties
+----------
+
+- __limit__: 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).
+- __duration__: The maximum duration of an audio sound clip, in seconds.
+
+Quick Example
+-------------
+
+    // limit capture operation to 3 media files, no longer than 10 seconds each
+    var options = { limit: 3, duration: 10 };
+
+    navigator.device.capture.captureAudio(captureSuccess, captureError, options);
+
+Android Quirks
+--------------
+
+- The `duration` parameter is not supported.  Recording lengths cannot be limited programmatically.
+
+BlackBerry WebWorks Quirks
+--------------------------
+
+- The `duration` parameter is not supported.  Recording lengths cannot be limited programmatically.
+
+iOS Quirks
+----------
+
+- The `limit` parameter is not supported, so only one recording can be created for each invocation.

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/capture/captureImage.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/capture/captureImage.md b/docs/en/2.9.0/cordova/media/capture/captureImage.md
new file mode 100644
index 0000000..e6ca370
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/capture/captureImage.md
@@ -0,0 +1,143 @@
+---
+license: 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.
+---
+
+capture.captureImage
+====================
+
+> Start the camera application and return information about captured image file(s).
+
+    navigator.device.capture.captureImage(
+        CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureImageOptions options]
+    );
+
+Description
+-----------
+
+Starts an asynchronous operation to capture images using the device's
+camera application.  The operation allows users to capture more than
+one image in a single session.
+
+The capture operation ends either when the user closes the camera
+application, or the maximum number of recordings specified by
+`CaptureAudioOptions.limit` is reached.  If no `limit` value is
+specified, it defaults to one (1), and the capture operation
+terminates after the user captures a single image.
+
+When the capture operation finishes, it invokes the `CaptureCB`
+callback with an array of `MediaFile` objects describing each captured
+image file.  If the user terminates the operation before capturing an
+image, the `CaptureErrorCB` callback executes with a `CaptureError`
+object featuring a `CaptureError.CAPTURE_NO_MEDIA_FILES` error code.
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Windows 8
+
+Windows Phone 7 Quirks
+----------------------
+
+Invoking the native camera application while your device is connected
+via Zune does not work, and the error callback executes.
+
+Quick Example
+-------------
+
+    // capture callback
+    var captureSuccess = function(mediaFiles) {
+        var i, path, len;
+        for (i = 0, len = mediaFiles.length; i < len; i += 1) {
+            path = mediaFiles[i].fullPath;
+            // do something interesting with the file
+        }
+    };
+
+    // capture error callback
+    var captureError = function(error) {
+        navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
+    };
+
+    // start image capture
+    navigator.device.capture.captureImage(captureSuccess, captureError, {limit:2});
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Capture Image</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8" src="json2.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Called when capture operation is finished
+        //
+        function captureSuccess(mediaFiles) {
+            var i, len;
+            for (i = 0, len = mediaFiles.length; i < len; i += 1) {
+                uploadFile(mediaFiles[i]);
+            }
+        }
+
+        // Called if something bad happens.
+        //
+        function captureError(error) {
+            var msg = 'An error occurred during capture: ' + error.code;
+            navigator.notification.alert(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.capture.captureImage(captureSuccess, captureError, {limit: 2});
+        }
+
+        // Upload files to server
+        function uploadFile(mediaFile) {
+            var ft = new FileTransfer(),
+                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 });
+        }
+
+        </script>
+        </head>
+        <body>
+            <button onclick="captureImage();">Capture Image</button> <br>
+        </body>
+    </html>
+

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/capture/captureImageOptions.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/capture/captureImageOptions.md b/docs/en/2.9.0/cordova/media/capture/captureImageOptions.md
new file mode 100644
index 0000000..b751bd1
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/capture/captureImageOptions.md
@@ -0,0 +1,41 @@
+---
+license: 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.
+---
+
+CaptureImageOptions
+===================
+
+> Encapsulates image capture configuration options.
+
+Properties
+----------
+
+- __limit__: The maximum number of images the user can capture in a single capture operation. The value must be greater than or equal to 1 (defaults to 1).
+
+Quick Example
+-------------
+
+    // limit capture operation to 3 images
+    var options = { limit: 3 };
+
+    navigator.device.capture.captureImage(captureSuccess, captureError, options);
+
+iOS Quirks
+----------
+
+- The __limit__ parameter is not supported, and only one image is taken per invocation.

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/capture/captureVideo.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/capture/captureVideo.md b/docs/en/2.9.0/cordova/media/capture/captureVideo.md
new file mode 100644
index 0000000..706c5f2
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/capture/captureVideo.md
@@ -0,0 +1,143 @@
+---
+license: 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.
+---
+
+capture.captureVideo
+====================
+
+> Start the video recorder application and return information about captured video clip file(s).
+
+    navigator.device.capture.captureVideo(
+        CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureVideoOptions options]
+    );
+
+Description
+-----------
+
+Starts an asynchronous operation to capture video recordings using the
+device's video recording application.  The operation allows the user
+to capture more than one recordings in a single session.
+
+The capture operation ends when either the user exits the video
+recording application, or the maximum number of recordings specified
+by `CaptureVideoOptions.limit` is reached.  If no `limit` parameter
+value is specified, it defaults to one (1), and the capture operation
+terminates after the user records a single video clip.
+
+When the capture operation finishes, it the `CaptureCB` callback
+executes with an array of `MediaFile` objects describing each captured
+video clip file.  If the user terminates the operation before
+capturing a video clip, the `CaptureErrorCB` callback executes with a
+`CaptureError` object featuring a
+`CaptureError.CAPTURE_NO_MEDIA_FILES` error code.
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Windows 8
+
+Quick Example
+-------------
+
+    // capture callback
+    var captureSuccess = function(mediaFiles) {
+        var i, path, len;
+        for (i = 0, len = mediaFiles.length; i < len; i += 1) {
+            path = mediaFiles[i].fullPath;
+            // do something interesting with the file
+        }
+    };
+
+    // capture error callback
+    var captureError = function(error) {
+        navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
+    };
+
+    // start video capture
+    navigator.device.capture.captureVideo(captureSuccess, captureError, {limit:2});
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Capture Video</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8" src="json2.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Called when capture operation is finished
+        //
+        function captureSuccess(mediaFiles) {
+            var i, len;
+            for (i = 0, len = mediaFiles.length; i < len; i += 1) {
+                uploadFile(mediaFiles[i]);
+            }
+        }
+
+        // Called if something bad happens.
+        //
+        function captureError(error) {
+            var msg = 'An error occurred during capture: ' + error.code;
+            navigator.notification.alert(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.capture.captureVideo(captureSuccess, captureError, {limit: 2});
+        }
+
+        // Upload files to server
+        function uploadFile(mediaFile) {
+            var ft = new FileTransfer(),
+                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 });
+        }
+
+        </script>
+        </head>
+        <body>
+            <button onclick="captureVideo();">Capture Video</button> <br>
+        </body>
+    </html>
+
+BlackBerry WebWorks Quirks
+--------------------------
+
+- Cordova for BlackBerry WebWorks attempts to launch the __Video Recorder__ application, provided by RIM, to capture video recordings. The app receives a `CaptureError.CAPTURE_NOT_SUPPORTED` error code if the application is not installed on the device.
+

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/capture/captureVideoOptions.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/capture/captureVideoOptions.md b/docs/en/2.9.0/cordova/media/capture/captureVideoOptions.md
new file mode 100644
index 0000000..769e2ac
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/capture/captureVideoOptions.md
@@ -0,0 +1,48 @@
+---
+license: 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.
+---
+
+CaptureVideoOptions
+===================
+
+> Encapsulates video capture configuration options.
+
+Properties
+----------
+
+- __limit__: The maximum number of video clips the device's user can capture in a single capture operation.  The value must be greater than or equal to 1 (defaults to 1).
+- __duration__: The maximum duration of a video clip, in seconds.
+
+Quick Example
+-------------
+
+    // limit capture operation to 3 video clips
+    var options = { limit: 3 };
+
+    navigator.device.capture.captureVideo(captureSuccess, captureError, options);
+
+BlackBerry WebWorks Quirks
+--------------------------
+
+- The __duration__ parameter is not supported, so the length of recordings cannot be limited programmatically.
+
+iOS Quirks
+----------
+
+- The __limit__ parameter is not supported.  Only one video is recorded per invocation.
+

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/media.getCurrentPosition.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/media.getCurrentPosition.md b/docs/en/2.9.0/cordova/media/media.getCurrentPosition.md
new file mode 100644
index 0000000..171bec6
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/media.getCurrentPosition.md
@@ -0,0 +1,176 @@
+---
+license: 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.
+---
+
+media.getCurrentPosition
+========================
+
+Returns the current position within an audio file.
+
+    media.getCurrentPosition(mediaSuccess, [mediaError]);
+
+Parameters
+----------
+
+- __mediaSuccess__: The callback that is passed the current position in seconds.
+- __mediaError__: (Optional) The callback to execute if an error occurs.
+
+Description
+-----------
+
+An asynchronous function that returns the current position of the
+underlying audio file of a `Media` object. Also updates the `Media`
+object's `position` parameter.
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Tizen
+- Windows 8
+
+Quick Example
+-------------
+
+    // Audio player
+    //
+    var my_media = new Media(src, onSuccess, onError);
+
+    // Update media position every second
+    var mediaTimer = setInterval(function () {
+        // get media position
+        my_media.getCurrentPosition(
+            // success callback
+            function (position) {
+                if (position > -1) {
+                    console.log((position) + " sec");
+                }
+            },
+            // error callback
+            function (e) {
+                console.log("Error getting pos=" + e);
+            }
+        );
+    }, 1000);
+
+Full Example
+------------
+
+        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+                      "http://www.w3.org/TR/html4/strict.dtd">
+        <html>
+          <head>
+            <title>Media Example</title>
+
+            <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+            <script type="text/javascript" charset="utf-8">
+
+            // Wait for device API libraries to load
+            //
+            document.addEventListener("deviceready", onDeviceReady, false);
+
+            // device APIs are available
+            //
+            function onDeviceReady() {
+                playAudio("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3");
+            }
+
+            // Audio player
+            //
+            var my_media = null;
+            var mediaTimer = null;
+
+            // Play audio
+            //
+            function playAudio(src) {
+                // Create Media object from src
+                my_media = new Media(src, onSuccess, onError);
+
+                // Play audio
+                my_media.play();
+
+                // Update my_media position every second
+                if (mediaTimer == null) {
+                    mediaTimer = setInterval(function() {
+                        // get my_media position
+                        my_media.getCurrentPosition(
+                            // success callback
+                            function(position) {
+                                if (position > -1) {
+                                    setAudioPosition((position) + " sec");
+                                }
+                            },
+                            // error callback
+                            function(e) {
+                                console.log("Error getting pos=" + e);
+                                setAudioPosition("Error: " + e);
+                            }
+                        );
+                    }, 1000);
+                }
+            }
+
+            // Pause audio
+            //
+            function pauseAudio() {
+                if (my_media) {
+                    my_media.pause();
+                }
+            }
+
+            // Stop audio
+            //
+            function stopAudio() {
+                if (my_media) {
+                    my_media.stop();
+                }
+                clearInterval(mediaTimer);
+                mediaTimer = null;
+            }
+
+            // onSuccess Callback
+            //
+            function onSuccess() {
+                console.log("playAudio():Audio Success");
+            }
+
+            // onError Callback
+            //
+            function onError(error) {
+                alert('code: '    + error.code    + '\n' +
+                      'message: ' + error.message + '\n');
+            }
+
+            // Set audio position
+            //
+            function setAudioPosition(position) {
+                document.getElementById('audio_position').innerHTML = position;
+            }
+
+            </script>
+          </head>
+          <body>
+            <a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');">Play Audio</a>
+            <a href="#" class="btn large" onclick="pauseAudio();">Pause Playing Audio</a>
+            <a href="#" class="btn large" onclick="stopAudio();">Stop Playing Audio</a>
+            <p id="audio_position"></p>
+          </body>
+        </html>

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/media.getDuration.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/media.getDuration.md b/docs/en/2.9.0/cordova/media/media.getDuration.md
new file mode 100644
index 0000000..f48f9a0
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/media.getDuration.md
@@ -0,0 +1,167 @@
+---
+license: 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.
+---
+
+media.getDuration
+=================
+
+Returns the duration of an audio file.
+
+    media.getDuration();
+
+Description
+-----------
+
+The `media.getDuration` method executes synchronously, returning the
+duration of the audio file in seconds, if known.  If the duration is
+unknown, it returns a value of -1.
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Tizen
+- Windows 8
+
+Quick Example
+-------------
+
+    // Audio player
+    //
+    var my_media = new Media(src, onSuccess, onError);
+
+    // Get duration
+    var counter = 0;
+    var timerDur = setInterval(function() {
+        counter = counter + 100;
+        if (counter > 2000) {
+            clearInterval(timerDur);
+        }
+        var dur = my_media.getDuration();
+        if (dur > 0) {
+            clearInterval(timerDur);
+            document.getElementById('audio_duration').innerHTML = (dur) + " sec";
+        }
+    }, 100);
+
+Full Example
+------------
+
+        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+                              "http://www.w3.org/TR/html4/strict.dtd">
+        <html>
+          <head>
+            <title>Media Example</title>
+
+            <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+            <script type="text/javascript" charset="utf-8">
+
+            // Wait for device API libraries to load
+            //
+            document.addEventListener("deviceready", onDeviceReady, false);
+
+            // device APIs are available
+            //
+            function onDeviceReady() {
+                playAudio("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3");
+            }
+
+            // Audio player
+            //
+            var my_media = null;
+            var mediaTimer = null;
+
+            // Play audio
+            //
+            function playAudio(src) {
+                // Create Media object from src
+                my_media = new Media(src, onSuccess, onError);
+
+                // Play audio
+                my_media.play();
+
+                // Update my_media position every second
+                if (mediaTimer == null) {
+                    mediaTimer = setInterval(function() {
+                        // get my_media position
+                        my_media.getCurrentPosition(
+                            // success callback
+                            function(position) {
+                                if (position > -1) {
+                                    setAudioPosition((position) + " sec");
+                                }
+                            },
+                            // error callback
+                            function(e) {
+                                console.log("Error getting pos=" + e);
+                                setAudioPosition("Error: " + e);
+                            }
+                        );
+                    }, 1000);
+                }
+            }
+
+            // Pause audio
+            //
+            function pauseAudio() {
+                if (my_media) {
+                    my_media.pause();
+                }
+            }
+
+            // Stop audio
+            //
+            function stopAudio() {
+                if (my_media) {
+                    my_media.stop();
+                }
+                clearInterval(mediaTimer);
+                mediaTimer = null;
+            }
+
+            // onSuccess Callback
+            //
+            function onSuccess() {
+                console.log("playAudio():Audio Success");
+            }
+
+            // onError Callback
+            //
+            function onError(error) {
+                alert('code: '    + error.code    + '\n' +
+                      'message: ' + error.message + '\n');
+            }
+
+            // Set audio position
+            //
+            function setAudioPosition(position) {
+                document.getElementById('audio_position').innerHTML = position;
+            }
+
+            </script>
+          </head>
+          <body>
+            <a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');">Play Audio</a>
+            <a href="#" class="btn large" onclick="pauseAudio();">Pause Playing Audio</a>
+            <a href="#" class="btn large" onclick="stopAudio();">Stop Playing Audio</a>
+            <p id="audio_position"></p>
+          </body>
+        </html>

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/9d152990/docs/en/2.9.0/cordova/media/media.md
----------------------------------------------------------------------
diff --git a/docs/en/2.9.0/cordova/media/media.md b/docs/en/2.9.0/cordova/media/media.md
new file mode 100644
index 0000000..2f9e49e
--- /dev/null
+++ b/docs/en/2.9.0/cordova/media/media.md
@@ -0,0 +1,133 @@
+---
+license: 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.
+---
+
+Media
+=====
+
+> The `Media` object provides the ability to record and play back audio files on a device.
+
+    var media = new Media(src, mediaSuccess, [mediaError], [mediaStatus]);
+
+__NOTE:__ The current implementation does not adhere to a W3C
+specification for media capture, and is provided for convenience only.
+A future implementation will adhere to the latest W3C specification
+and may deprecate the current APIs.
+
+Parameters
+----------
+
+- __src__: A URI containing the audio content. _(DOMString)_
+- __mediaSuccess__: (Optional) The callback that executes after a `Media` object has completed the current play, record, or stop action. _(Function)_
+- __mediaError__: (Optional) The callback that executes if an error occurs. _(Function)_
+- __mediaStatus__: (Optional) The callback that executes to indicate status changes. _(Function)_
+
+Constants
+---------
+
+The following constants are reported as the only parameter to the
+`mediaStatus` callback:
+
+- `Media.MEDIA_NONE`     = 0;
+- `Media.MEDIA_STARTING` = 1;
+- `Media.MEDIA_RUNNING`  = 2;
+- `Media.MEDIA_PAUSED`   = 3;
+- `Media.MEDIA_STOPPED`  = 4;
+
+Methods
+-------
+
+- `media.getCurrentPosition`: Returns the current position within an audio file.
+- `media.getDuration`: Returns the duration of an audio file.
+- `media.play`: Start or resume playing an audio file.
+- `media.pause`: Pause playback of an audio file.
+- `media.release`: Releases the underlying operating system's audio resources.
+- `media.seekTo`: Moves the position within the audio file.
+- `media.setVolume`: Set the volume for audio playback.
+- `media.startRecord`: Start recording an audio file.
+- `media.stopRecord`: Stop recording an audio file.
+- `media.stop`: Stop playing an audio file.
+
+Additional ReadOnly Parameters
+---------------------
+
+- __position__: The position within the audio playback, in seconds.
+    - Not automatically updated during play; call `getCurrentPosition` to update.
+- __duration__: The duration of the media, in seconds.
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7.5
+- Tizen
+- Windows 8
+
+Permissions
+-----------
+
+### Android
+
+#### app/res/xml/config.xml
+
+    <plugin name="Media" value="org.apache.cordova.AudioHandler" />
+
+#### app/AndroidManifest.xml
+
+    <uses-permission android:name="android.permission.RECORD_AUDIO" />
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+
+### BlackBerry WebWorks
+
+#### www/plugins.xml
+
+    <plugin name="Capture" value="org.apache.cordova.media.MediaCapture" />
+
+### iOS
+
+#### config.xml
+
+    <plugin name="Media" value="CDVSound" />
+
+### Windows Phone
+
+#### Properties/WPAppManifest.xml
+
+    <Capabilities>
+        <Capability Name="ID_CAP_MEDIALIB" />
+        <Capability Name="ID_CAP_MICROPHONE" />
+        <Capability Name="ID_HW_FRONTCAMERA" />
+        <Capability Name="ID_CAP_ISV_CAMERA" />
+        <Capability Name="ID_CAP_CAMERA" />
+    </Capabilities>
+
+Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
+
+### Tizen
+
+    No permissions are required.
+
+### Windows Phone Quirks
+
+- Only one media file can be played back at a time.
+- There are strict restrictions on how your application interacts with other media. See the [Microsoft documentation for details][url].
+
+[url]: http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh184838(v=vs.92).aspx


Mime
View raw message