You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2013/10/01 05:56:01 UTC

svn commit: r1527865 [12/25] - in /cordova/site/public/docs/en/3.1.0: ./ img/ img/guide/ img/guide/cli/ img/guide/platforms/ img/guide/platforms/android/ img/guide/platforms/bada/ img/guide/platforms/blackberry10/ img/guide/platforms/ios/ img/guide/pla...

Added: cordova/site/public/docs/en/3.1.0/cordova_media_media.md.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/3.1.0/cordova_media_media.md.html?rev=1527865&view=auto
==============================================================================
--- cordova/site/public/docs/en/3.1.0/cordova_media_media.md.html (added)
+++ cordova/site/public/docs/en/3.1.0/cordova_media_media.md.html Tue Oct  1 03:55:57 2013
@@ -0,0 +1,2016 @@
+<!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="Chinese" value="zh"><option value="edge">edge</option></optgroup>
+<optgroup label="English" value="en">
+<option value="edge">edge</option>
+<option selected value="3.1.0">3.1.0</option>
+<option value="3.0.0">3.0.0</option>
+<option value="2.9.0">2.9.0</option>
+<option value="2.8.0">2.8.0</option>
+<option value="2.7.0">2.7.0</option>
+<option value="2.6.0">2.6.0</option>
+<option value="2.5.0">2.5.0</option>
+<option value="2.4.0">2.4.0</option>
+<option value="2.3.0">2.3.0</option>
+<option value="2.2.0">2.2.0</option>
+<option value="2.1.0">2.1.0</option>
+<option value="2.0.0">2.0.0</option>
+<option value="1.9.0">1.9.0</option>
+<option value="1.8.1">1.8.1</option>
+<option value="1.8.0">1.8.0</option>
+<option value="1.7.0">1.7.0</option>
+<option value="1.6.1">1.6.1</option>
+<option value="1.6.0">1.6.0</option>
+<option value="1.5.0">1.5.0</option>
+</optgroup>
+<optgroup label="French" value="fr"><option value="edge">edge</option></optgroup>
+<optgroup label="German" value="de"><option value="edge">edge</option></optgroup>
+<optgroup label="Italian" value="it"><option value="edge">edge</option></optgroup>
+<optgroup label="Japanese" value="ja">
+<option value="edge">edge</option>
+<option value="2.2.0">2.2.0</option>
+<option value="2.1.0">2.1.0</option>
+<option value="2.0.0">2.0.0</option>
+<option value="1.9.0">1.9.0</option>
+<option value="1.8.1">1.8.1</option>
+<option value="1.7.0">1.7.0</option>
+</optgroup>
+<optgroup label="Korean" value="ko">
+<option value="edge">edge</option>
+<option value="2.0.0">2.0.0</option>
+</optgroup>
+<optgroup label="Russian" value="ru"><option value="edge">edge</option></optgroup>
+<optgroup label="Spanish" value="es"><option value="edge">edge</option></optgroup></select></small>
+        </div>
+        <div id="subheader">
+            <h1>Media</h1>
+            <small><select><option value="Media">Media</option>
+<option value="Media_parameters">      - Parameters</option>
+<option value="Media_constants">      - Constants</option>
+<option value="Media_methods">      - Methods</option>
+<option value="Media_additional_readonly_parameters">      - Additional ReadOnly Parameters</option>
+<option value="Media_supported_platforms">      - Supported Platforms</option>
+<option value="Media_accessing_the_feature">      - Accessing the Feature</option>
+<option value="media.getCurrentPosition">media.getCurrentPosition</option>
+<option value="media.getCurrentPosition_parameters">      - Parameters</option>
+<option value="media.getCurrentPosition_description">      - Description</option>
+<option value="media.getCurrentPosition_supported_platforms">      - Supported Platforms</option>
+<option value="media.getCurrentPosition_quick_example">      - Quick Example</option>
+<option value="media.getCurrentPosition_full_example">      - Full Example</option>
+<option value="media.getDuration">media.getDuration</option>
+<option value="media.getDuration_description">      - Description</option>
+<option value="media.getDuration_supported_platforms">      - Supported Platforms</option>
+<option value="media.getDuration_quick_example">      - Quick Example</option>
+<option value="media.getDuration_full_example">      - Full Example</option>
+<option value="media.pause">media.pause</option>
+<option value="media.pause_description">      - Description</option>
+<option value="media.pause_supported_platforms">      - Supported Platforms</option>
+<option value="media.pause_quick_example">      - Quick Example</option>
+<option value="media.pause_full_example">      - Full Example</option>
+<option value="media.play">media.play</option>
+<option value="media.play_description">      - Description</option>
+<option value="media.play_supported_platforms">      - Supported Platforms</option>
+<option value="media.play_quick_example">      - Quick Example</option>
+<option value="media.play_full_example">      - Full Example</option>
+<option value="media.play_blackberry_webworks_quirks">      - BlackBerry WebWorks Quirks</option>
+<option value="media.play_ios_quirks">      - iOS Quirks</option>
+<option value="media.release">media.release</option>
+<option value="media.release_description">      - Description</option>
+<option value="media.release_supported_platforms">      - Supported Platforms</option>
+<option value="media.release_quick_example">      - Quick Example</option>
+<option value="media.release_full_example">      - Full Example</option>
+<option value="media.seekTo">media.seekTo</option>
+<option value="media.seekTo_parameters">      - Parameters</option>
+<option value="media.seekTo_description">      - Description</option>
+<option value="media.seekTo_supported_platforms">      - Supported Platforms</option>
+<option value="media.seekTo_quick_example">      - Quick Example</option>
+<option value="media.seekTo_full_example">      - Full Example</option>
+<option value="media.seekTo_blackberry_webworks_quirks">      - BlackBerry WebWorks Quirks</option>
+<option value="media.setVolume">media.setVolume</option>
+<option value="media.setVolume_parameters">      - Parameters</option>
+<option value="media.setVolume_description">      - Description</option>
+<option value="media.setVolume_supported_platforms">      - Supported Platforms</option>
+<option value="media.setVolume_quick_example">      - Quick Example</option>
+<option value="media.setVolume_full_example">      - Full Example</option>
+<option value="media.startRecord">media.startRecord</option>
+<option value="media.startRecord_description">      - Description</option>
+<option value="media.startRecord_supported_platforms">      - Supported Platforms</option>
+<option value="media.startRecord_quick_example">      - Quick Example</option>
+<option value="media.startRecord_full_example">      - Full Example</option>
+<option value="media.startRecord_android_quirks">      - Android Quirks</option>
+<option value="media.startRecord_blackberry_webworks_quirks">      - BlackBerry WebWorks Quirks</option>
+<option value="media.startRecord_ios_quirks">      - iOS Quirks</option>
+<option value="media.startRecord_tizen_quirks">      - Tizen Quirks</option>
+<option value="media.stop">media.stop</option>
+<option value="media.stop_description">      - Description</option>
+<option value="media.stop_supported_platforms">      - Supported Platforms</option>
+<option value="media.stop_quick_example">      - Quick Example</option>
+<option value="media.stop_full_example">      - Full Example</option>
+<option value="media.stopRecord">media.stopRecord</option>
+<option value="media.stopRecord_description">      - Description</option>
+<option value="media.stopRecord_supported_platforms">      - Supported Platforms</option>
+<option value="media.stopRecord_quick_example">      - Quick Example</option>
+<option value="media.stopRecord_full_example">      - Full Example</option>
+<option value="media.stopRecord_tizen_quirks">      - Tizen Quirks</option>
+<option value="MediaError">MediaError</option>
+<option value="MediaError_properties">      - Properties</option>
+<option value="MediaError_constants">      - Constants</option>
+<option value="MediaError_description">      - Description</option>
+<option value="mediaError">mediaError</option>
+<option value="mediaError_parameters">      - Parameters</option></select></small>
+        </div>
+
+        <div id="sidebar">
+            <div class="vertical_divider"></div>
+        <h1>Guides</h1>
+<ul>
+<li><a href="guide_overview_index.md.html#Overview">Overview</a></li>
+<li><a href="guide_cli_index.md.html#The%20Command-line%20Interface">The Command-line Interface</a></li>
+<li><a href="guide_platforms_index.md.html#Platform%20Guides">Platform Guides</a></li>
+<li><a href="config_ref_index.md.html#The%20config.xml%20File">The config.xml File</a></li>
+<li><a href="guide_hybrid_webviews_index.md.html#Embedding%20WebViews">Embedding WebViews</a></li>
+<li><a href="guide_hybrid_plugins_index.md.html#Plugin%20Development%20Guide">Plugin Development Guide</a></li>
+<li><a href="guide_appdev_privacy_index.md.html#Privacy%20Guide">Privacy Guide</a></li>
+<li><a href="guide_appdev_whitelist_index.md.html#Domain%20Whitelist%20Guide">Domain Whitelist Guide</a></li>
+<li><a href="_index.html">Keyword Index</a></li>
+</ul>
+<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_globalization_globalization.md.html#Globalization">Globalization</a></li>
+<li><a href="cordova_inappbrowser_inappbrowser.md.html#InAppBrowser">InAppBrowser</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_splashscreen_splashscreen.md.html#Splashscreen">Splashscreen</a></li>
+<li><a href="cordova_storage_storage.md.html#Storage">Storage</a></li>
+</ul>
+</div>
+
+        <div id="scrollable">
+            <div id="content">
+                <h1><a name="Media">Media</a></h1>
+
+<blockquote>
+  <p>The <code><a href="cordova_media_media.md.html#Media">Media</a></code> object provides the ability to record and play back audio files on a device.</p>
+</blockquote>
+
+<pre class="prettyprint"><code>var media = new <a href="cordova_media_media.md.html#Media">Media</a>(src, mediaSuccess, [<a href="cordova_media_media.md.html#mediaError">mediaError</a>], [mediaStatus]);
+</code></pre>
+
+<p><strong>NOTE:</strong> 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.</p>
+
+<h2>
+<a name="Media_parameters">Parameters</a>
+</h2>
+
+<ul>
+<li><p><strong>src</strong>: A URI containing the audio content. <em>(DOMString)</em></p></li>
+<li><p><strong>mediaSuccess</strong>: (Optional) The callback that executes after a <code><a href="cordova_media_media.md.html#Media">Media</a></code> object has completed the current play, record, or stop action. <em>(Function)</em></p></li>
+<li><p><strong><a href="cordova_media_media.md.html#mediaError">mediaError</a></strong>: (Optional) The callback that executes if an error occurs. <em>(Function)</em></p></li>
+<li><p><strong>mediaStatus</strong>: (Optional) The callback that executes to indicate status changes. <em>(Function)</em></p></li>
+</ul>
+<h2>
+<a name="Media_constants">Constants</a>
+</h2>
+
+<p>The following constants are reported as the only parameter to the
+<code>mediaStatus</code> callback:</p>
+
+<ul>
+<li>
+<code><a href="cordova_media_media.md.html#Media">Media</a>.MEDIA_NONE</code>     = 0;</li>
+<li>
+<code><a href="cordova_media_media.md.html#Media">Media</a>.MEDIA_STARTING</code> = 1;</li>
+<li>
+<code><a href="cordova_media_media.md.html#Media">Media</a>.MEDIA_RUNNING</code>  = 2;</li>
+<li>
+<code><a href="cordova_media_media.md.html#Media">Media</a>.MEDIA_PAUSED</code>   = 3;</li>
+<li>
+<code><a href="cordova_media_media.md.html#Media">Media</a>.MEDIA_STOPPED</code>  = 4;</li>
+</ul>
+<h2>
+<a name="Media_methods">Methods</a>
+</h2>
+
+<ul>
+<li><p><code><a href="cordova_media_media.md.html#media.getCurrentPosition">media.getCurrentPosition</a></code>: Returns the current position within an audio file.</p></li>
+<li><p><code><a href="cordova_media_media.md.html#media.getDuration">media.getDuration</a></code>: Returns the duration of an audio file.</p></li>
+<li><p><code><a href="cordova_media_media.md.html#media.play">media.play</a></code>: Start or <a href="cordova_events_events.md.html#resume">resume</a> playing an audio file.</p></li>
+<li><p><code><a href="cordova_media_media.md.html#media.pause">media.pause</a></code>: Pause playback of an audio file.</p></li>
+<li><p><code><a href="cordova_media_media.md.html#media.release">media.release</a></code>: Releases the underlying operating system's audio resources.</p></li>
+<li><p><code><a href="cordova_media_media.md.html#media.seekTo">media.seekTo</a></code>: Moves the position within the audio file.</p></li>
+<li><p><code><a href="cordova_media_media.md.html#media.setVolume">media.setVolume</a></code>: Set the volume for audio playback.</p></li>
+<li><p><code><a href="cordova_media_media.md.html#media.startRecord">media.startRecord</a></code>: Start recording an audio file.</p></li>
+<li><p><code><a href="cordova_media_media.md.html#media.stopRecord">media.stopRecord</a></code>: Stop recording an audio file.</p></li>
+<li><p><code><a href="cordova_media_media.md.html#media.stop">media.stop</a></code>: Stop playing an audio file.</p></li>
+</ul>
+<h2>
+<a name="Media_additional_readonly_parameters">Additional ReadOnly Parameters</a>
+</h2>
+
+<ul>
+<li>
+<p><strong>position</strong>: The position within the audio playback, in seconds.</p>
+
+<ul>
+<li>Not automatically updated during play; call <code>getCurrentPosition</code> to update.</li>
+</ul>
+</li>
+<li><p><strong>duration</strong>: The duration of the media, in seconds.</p></li>
+</ul>
+<h2>
+<a name="Media_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.5</li>
+<li>Tizen</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="Media_accessing_the_feature">Accessing the Feature</a>
+</h2>
+
+<p>As of version 3.0, Cordova implements device-level APIs as <em>plugins</em>.
+Use the CLI's <code>plugin</code> command, described in <a href="#The%20Command-line%0AInterface">The Command-line
+Interface</a>, to add or remove this feature for a project:</p>
+
+<pre class="prettyprint"><code>    $ cordova plugin add org.apache.cordova.media 
+    $ cordova plugin ls
+    [ 'org.apache.cordova.media' ]
+    $ cordova plugin rm org.apache.cordova.media
+</code></pre>
+
+<p>These commands apply to all targeted platforms, but modify the
+platform-specific configuration settings described below:</p>
+
+<ul>
+<li>
+<p>Android</p>
+
+<pre class="prettyprint"><code>(in app/res/xml/config.xml)
+&lt;feature name="<a href="cordova_media_media.md.html#Media">Media</a>"&gt;
+    &lt;param name="android-package" value="org.apache.cordova.AudioHandler" /&gt;
+&lt;/feature&gt;
+
+
+(in app/AndroidManifest.xml)
+&lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt;
+&lt;uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /&gt;
+&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
+</code></pre>
+</li>
+<li>
+<p>BlackBerry WebWorks</p>
+
+<pre class="prettyprint"><code>(in www/plugins.xml)
+&lt;feature name="<a href="cordova_media_capture_capture.md.html#Capture">Capture</a>"&gt;
+    &lt;param name="blackberry-package" value="org.apache.cordova.media.MediaCapture" /&gt;
+&lt;/feature&gt;
+</code></pre>
+</li>
+<li>
+<p>iOS (in <code>config.xml</code>)</p>
+
+<pre class="prettyprint"><code>&lt;feature name="<a href="cordova_media_media.md.html#Media">Media</a>"&gt;
+    &lt;param name="ios-package" value="CDVSound" /&gt;
+&lt;/feature&gt;
+</code></pre>
+</li>
+<li>
+<p>Windows Phone (in <code>Properties/WPAppManifest.xml</code>)</p>
+
+<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>
+
+<p>Reference: <a class="external" href="http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx">Application Manifest for Windows Phone</a></p>
+</li>
+</ul>
+<p>Some platforms may support this feature without requiring any special
+configuration.  See <em>Platform Support</em> in the <a href="guide_overview_index.md.html#Overview">Overview</a> section.</p>
+
+<h3>Windows Phone Quirks</h3>
+
+<ul>
+<li><p>Only one media file can be played back at a time.</p></li>
+<li><p>There are strict restrictions on how your application interacts with other media. See the <a class="external" href="http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh184838(v=vs.92).aspx">Microsoft documentation for details</a>.</p></li>
+</ul>
+<hr>
+<h1><a name="media.getCurrentPosition">media.getCurrentPosition</a></h1>
+
+<p>Returns the current position within an audio file.</p>
+
+<pre class="prettyprint"><code><a href="cordova_media_media.md.html#media.getCurrentPosition">media.getCurrentPosition</a>(mediaSuccess, [<a href="cordova_media_media.md.html#mediaError">mediaError</a>]);
+</code></pre>
+
+<h2>
+<a name="media.getCurrentPosition_parameters">Parameters</a>
+</h2>
+
+<ul>
+<li><p><strong>mediaSuccess</strong>: The callback that is passed the current position in seconds.</p></li>
+<li><p><strong><a href="cordova_media_media.md.html#mediaError">mediaError</a></strong>: (Optional) The callback to execute if an error occurs.</p></li>
+</ul>
+<h2>
+<a name="media.getCurrentPosition_description">Description</a>
+</h2>
+
+<p>An asynchronous function that returns the current position of the
+underlying audio file of a <code><a href="cordova_media_media.md.html#Media">Media</a></code> object. Also updates the <code><a href="cordova_media_media.md.html#Media">Media</a></code>
+object's <code>position</code> parameter.</p>
+
+<h2>
+<a name="media.getCurrentPosition_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li><p>Android</p></li>
+<li><p>BlackBerry WebWorks (OS 5.0 and higher)</p></li>
+<li><p>iOS</p></li>
+<li><p>Windows Phone 7 and 8</p></li>
+<li><p>Tizen</p></li>
+<li><p>Windows 8</p></li>
+</ul>
+<h2>
+<a name="media.getCurrentPosition_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// Audio player
+//
+var my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(src, onSuccess, onError);
+
+// Update media position every second
+var mediaTimer = setInterval(function () {
+    // get media position
+    my_media.getCurrentPosition(
+        // success callback
+        function (position) {
+            if (position &gt; -1) {
+                console.log((position) + " sec");
+            }
+        },
+        // error callback
+        function (e) {
+            console.log("Error getting pos=" + e);
+        }
+    );
+}, 1000);
+</code></pre>
+
+<h2>
+<a name="media.getCurrentPosition_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code>    &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+                  "http://www.w3.org/TR/html4/strict.dtd"&gt;
+    &lt;html&gt;
+      &lt;head&gt;
+        &lt;title&gt;<a href="cordova_media_media.md.html#Media">Media</a> Example&lt;/title&gt;
+
+        &lt;script type="text/javascript" charset="utf-8" src="cordova.js"&gt;&lt;/script&gt;
+        &lt;script type="text/javascript" charset="utf-8"&gt;
+
+        // Wait for device API libraries to load
+        //
+        document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", 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 <a href="cordova_media_media.md.html#Media">Media</a> object from src
+            my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(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 &gt; -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.<a href="cordova_events_events.md.html#pause">pause</a>();
+            }
+        }
+
+        // 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;
+        }
+
+        &lt;/script&gt;
+      &lt;/head&gt;
+      &lt;body&gt;
+        &lt;a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');"&gt;Play Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="pauseAudio();"&gt;Pause Playing Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="stopAudio();"&gt;Stop Playing Audio&lt;/a&gt;
+        &lt;p id="audio_position"&gt;&lt;/p&gt;
+      &lt;/body&gt;
+    &lt;/html&gt;
+</code></pre>
+
+<hr>
+<h1><a name="media.getDuration">media.getDuration</a></h1>
+
+<p>Returns the duration of an audio file.</p>
+
+<pre class="prettyprint"><code><a href="cordova_media_media.md.html#media.getDuration">media.getDuration</a>();
+</code></pre>
+
+<h2>
+<a name="media.getDuration_description">Description</a>
+</h2>
+
+<p>The <code><a href="cordova_media_media.md.html#media.getDuration">media.getDuration</a></code> 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.</p>
+
+<h2>
+<a name="media.getDuration_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 and 8</li>
+<li>Tizen</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="media.getDuration_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// Audio player
+//
+var my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(src, onSuccess, onError);
+
+// Get duration
+var counter = 0;
+var timerDur = setInterval(function() {
+    counter = counter + 100;
+    if (counter &gt; 2000) {
+        clearInterval(timerDur);
+    }
+    var dur = my_media.getDuration();
+    if (dur &gt; 0) {
+        clearInterval(timerDur);
+        document.getElementById('audio_duration').innerHTML = (dur) + " sec";
+    }
+}, 100);
+</code></pre>
+
+<h2>
+<a name="media.getDuration_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code>    &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+                          "http://www.w3.org/TR/html4/strict.dtd"&gt;
+    &lt;html&gt;
+      &lt;head&gt;
+        &lt;title&gt;<a href="cordova_media_media.md.html#Media">Media</a> Example&lt;/title&gt;
+
+        &lt;script type="text/javascript" charset="utf-8" src="cordova.js"&gt;&lt;/script&gt;
+        &lt;script type="text/javascript" charset="utf-8"&gt;
+
+        // Wait for device API libraries to load
+        //
+        document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", 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 <a href="cordova_media_media.md.html#Media">Media</a> object from src
+            my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(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 &gt; -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.<a href="cordova_events_events.md.html#pause">pause</a>();
+            }
+        }
+
+        // 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;
+        }
+
+        &lt;/script&gt;
+      &lt;/head&gt;
+      &lt;body&gt;
+        &lt;a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');"&gt;Play Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="pauseAudio();"&gt;Pause Playing Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="stopAudio();"&gt;Stop Playing Audio&lt;/a&gt;
+        &lt;p id="audio_position"&gt;&lt;/p&gt;
+      &lt;/body&gt;
+    &lt;/html&gt;
+</code></pre>
+
+<hr>
+<h1><a name="media.pause">media.pause</a></h1>
+
+<p>Pauses playing an audio file.</p>
+
+<pre class="prettyprint"><code><a href="cordova_media_media.md.html#media.pause">media.pause</a>();
+</code></pre>
+
+<h2>
+<a name="media.pause_description">Description</a>
+</h2>
+
+<p>The <code><a href="cordova_media_media.md.html#media.pause">media.pause</a></code> method executes synchronously, and pauses playing an audio file.</p>
+
+<h2>
+<a name="media.pause_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 and 8</li>
+<li>Tizen</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="media.pause_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// Play audio
+//
+function playAudio(url) {
+    // Play the audio file at url
+    var my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(url,
+        // success callback
+        function () { console.log("playAudio():Audio Success"); },
+        // error callback
+        function (err) { console.log("playAudio():Audio Error: " + err); }
+    );
+
+    // Play audio
+    my_media.play();
+
+    // Pause after 10 seconds
+    setTimeout(function () {
+        <a href="cordova_media_media.md.html#media.pause">media.pause</a>();
+    }, 10000);
+}
+</code></pre>
+
+<h2>
+<a name="media.pause_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code>    &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+                          "http://www.w3.org/TR/html4/strict.dtd"&gt;
+    &lt;html&gt;
+      &lt;head&gt;
+        &lt;title&gt;<a href="cordova_media_media.md.html#Media">Media</a> Example&lt;/title&gt;
+
+        &lt;script type="text/javascript" charset="utf-8" src="cordova.js"&gt;&lt;/script&gt;
+        &lt;script type="text/javascript" charset="utf-8"&gt;
+
+        // Wait for device API libraries to load
+        //
+        document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", 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 <a href="cordova_media_media.md.html#Media">Media</a> object from src
+            my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(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 &gt; -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.<a href="cordova_events_events.md.html#pause">pause</a>();
+            }
+        }
+
+        // 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;
+        }
+
+        &lt;/script&gt;
+      &lt;/head&gt;
+      &lt;body&gt;
+        &lt;a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');"&gt;Play Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="pauseAudio();"&gt;Pause Playing Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="stopAudio();"&gt;Stop Playing Audio&lt;/a&gt;
+        &lt;p id="audio_position"&gt;&lt;/p&gt;
+      &lt;/body&gt;
+    &lt;/html&gt;
+</code></pre>
+
+<hr>
+<h1><a name="media.play">media.play</a></h1>
+
+<p>Starts or resumes playing an audio file.</p>
+
+<pre class="prettyprint"><code><a href="cordova_media_media.md.html#media.play">media.play</a>();
+</code></pre>
+
+<h2>
+<a name="media.play_description">Description</a>
+</h2>
+
+<p>The <code><a href="cordova_media_media.md.html#media.play">media.play</a></code> method executes synchronously, and starts or resumes
+playing an audio file.</p>
+
+<h2>
+<a name="media.play_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 and 8</li>
+<li>Tizen</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="media.play_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// Play audio
+//
+function playAudio(url) {
+    // Play the audio file at url
+    var my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(url,
+        // success callback
+        function () {
+            console.log("playAudio():Audio Success");
+        },
+        // error callback
+        function (err) {
+            console.log("playAudio():Audio Error: " + err);
+        }
+    );
+    // Play audio
+    my_media.play();
+}
+</code></pre>
+
+<h2>
+<a name="media.play_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code>    &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+                          "http://www.w3.org/TR/html4/strict.dtd"&gt;
+    &lt;html&gt;
+      &lt;head&gt;
+        &lt;title&gt;<a href="cordova_media_media.md.html#Media">Media</a> Example&lt;/title&gt;
+
+        &lt;script type="text/javascript" charset="utf-8" src="cordova.js"&gt;&lt;/script&gt;
+        &lt;script type="text/javascript" charset="utf-8"&gt;
+
+        // Wait for device API libraries to load
+        //
+        document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", 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) {
+            if (my_media == null) {
+                // Create <a href="cordova_media_media.md.html#Media">Media</a> object from src
+                my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(src, onSuccess, onError);
+            } // else play current audio
+            // 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 &gt; -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.<a href="cordova_events_events.md.html#pause">pause</a>();
+            }
+        }
+
+        // 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;
+        }
+
+        &lt;/script&gt;
+      &lt;/head&gt;
+      &lt;body&gt;
+        &lt;a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');"&gt;Play Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="pauseAudio();"&gt;Pause Playing Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="stopAudio();"&gt;Stop Playing Audio&lt;/a&gt;
+        &lt;p id="audio_position"&gt;&lt;/p&gt;
+      &lt;/body&gt;
+    &lt;/html&gt;
+</code></pre>
+
+<h2>
+<a name="media.play_blackberry_webworks_quirks">BlackBerry WebWorks Quirks</a>
+</h2>
+
+<ul>
+<li>BlackBerry devices support a limited number of simultaneous audio
+channels. CDMA devices only support a single audio channel. Other
+devices support up to two simultaneous channels. An attempt to play
+more audio files than the supported amount results in previous
+playback being stopped.</li>
+</ul>
+<h2>
+<a name="media.play_ios_quirks">iOS Quirks</a>
+</h2>
+
+<ul>
+<li>
+<p><strong>numberOfLoops</strong>: Pass this option to the <code>play</code> method to specify
+the number of times you want the media file to play, e.g.:</p>
+
+<pre class="prettyprint"><code>var myMedia = new <a href="cordova_media_media.md.html#Media">Media</a>("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3")
+myMedia.play({ numberOfLoops: 2 })
+</code></pre>
+</li>
+<li>
+<p><strong>playAudioWhenScreenIsLocked</strong>: Pass in this option to the <code>play</code>
+method to specify whether you want to allow playback when the screen
+is locked.  If set to <code>true</code> (the default value), the state of the
+hardware mute button is ignored, e.g.:</p>
+
+<pre class="prettyprint"><code>var myMedia = new <a href="cordova_media_media.md.html#Media">Media</a>("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3")
+myMedia.play({ playAudioWhenScreenIsLocked : false })
+</code></pre>
+</li>
+<li>
+<p><strong>order of file search</strong>: When only a file name or simple path is
+provided, iOS searches in the <code>www</code> directory for the file, then in
+the application's <code>documents/tmp</code> directory:</p>
+
+<pre class="prettyprint"><code>var myMedia = new <a href="cordova_media_media.md.html#Media">Media</a>("audio/beer.mp3")
+myMedia.play()  // first looks for file in www/audio/beer.mp3 then in &lt;application&gt;/documents/tmp/audio/beer.mp3
+</code></pre>
+</li>
+</ul>
+<hr>
+<h1><a name="media.release">media.release</a></h1>
+
+<p>Releases the underlying operating system's audio resources.</p>
+
+<pre class="prettyprint"><code><a href="cordova_media_media.md.html#media.release">media.release</a>();
+</code></pre>
+
+<h2>
+<a name="media.release_description">Description</a>
+</h2>
+
+<p>The <code><a href="cordova_media_media.md.html#media.release">media.release</a></code> method executes synchronously, releasing the
+underlying operating system's audio resources.  This is particularly
+important for Android, since there are a finite amount of OpenCore
+instances for media playback. Applications should call the <code>release</code>
+function for any <code><a href="cordova_media_media.md.html#Media">Media</a></code> resource that is no longer needed.</p>
+
+<h2>
+<a name="media.release_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 and 8</li>
+<li>Tizen</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="media.release_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// Audio player
+//
+var my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(src, onSuccess, onError);
+
+my_media.play();
+my_media.stop();
+my_media.release();
+</code></pre>
+
+<h2>
+<a name="media.release_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code>    &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+                          "http://www.w3.org/TR/html4/strict.dtd"&gt;
+    &lt;html&gt;
+      &lt;head&gt;
+        &lt;title&gt;<a href="cordova_media_media.md.html#Media">Media</a> Example&lt;/title&gt;
+
+        &lt;script type="text/javascript" charset="utf-8" src="cordova.js"&gt;&lt;/script&gt;
+        &lt;script type="text/javascript" charset="utf-8"&gt;
+
+        // Wait for device API libraries to load
+        //
+        document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", 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 <a href="cordova_media_media.md.html#Media">Media</a> object from src
+            my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(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 &gt; -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.<a href="cordova_events_events.md.html#pause">pause</a>();
+            }
+        }
+
+        // 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;
+        }
+
+        &lt;/script&gt;
+      &lt;/head&gt;
+      &lt;body&gt;
+        &lt;a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');"&gt;Play Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="pauseAudio();"&gt;Pause Playing Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="stopAudio();"&gt;Stop Playing Audio&lt;/a&gt;
+        &lt;p id="audio_position"&gt;&lt;/p&gt;
+      &lt;/body&gt;
+    &lt;/html&gt;
+</code></pre>
+
+<hr>
+<h1><a name="media.seekTo">media.seekTo</a></h1>
+
+<p>Sets the current position within an audio file.</p>
+
+<pre class="prettyprint"><code><a href="cordova_media_media.md.html#media.seekTo">media.seekTo</a>(milliseconds);
+</code></pre>
+
+<h2>
+<a name="media.seekTo_parameters">Parameters</a>
+</h2>
+
+<ul>
+<li>
+<strong>milliseconds</strong>: The position to set the playback position within the audio, in milliseconds.</li>
+</ul>
+<h2>
+<a name="media.seekTo_description">Description</a>
+</h2>
+
+<p>The <code><a href="cordova_media_media.md.html#media.seekTo">media.seekTo</a></code> executes asynchronously, updating the current
+playback position within an audio file referenced by a <code><a href="cordova_media_media.md.html#Media">Media</a></code>
+object. Also updates the <code><a href="cordova_media_media.md.html#Media">Media</a></code> object's <code>position</code> parameter.</p>
+
+<h2>
+<a name="media.seekTo_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>BlackBerry WebWorks (OS 6.0 and higher)</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Tizen</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="media.seekTo_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// Audio player
+//
+var my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(src, onSuccess, onError);
+    my_media.play();
+// SeekTo to 10 seconds after 5 seconds
+setTimeout(function() {
+    my_media.seekTo(10000);
+}, 5000);
+</code></pre>
+
+<h2>
+<a name="media.seekTo_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code>    &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
+                          "http://www.w3.org/TR/html4/strict.dtd"&gt;
+    &lt;html&gt;
+      &lt;head&gt;
+        &lt;title&gt;<a href="cordova_media_media.md.html#Media">Media</a> Example&lt;/title&gt;
+
+        &lt;script type="text/javascript" charset="utf-8" src="cordova.js"&gt;&lt;/script&gt;
+        &lt;script type="text/javascript" charset="utf-8"&gt;
+
+        // Wait for device API libraries to load
+        //
+        document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", 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 <a href="cordova_media_media.md.html#Media">Media</a> object from src
+            my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(src, onSuccess, onError);
+
+            // Play audio
+            my_media.play();
+
+            // Update media position every second
+            mediaTimer = setInterval(function() {
+                // get media position
+                my_media.getCurrentPosition(
+                    // success callback
+                    function(position) {
+                        if (position &gt; -1) {
+                            setAudioPosition(position + " sec");
+                        }
+                    },
+                    // error callback
+                    function(e) {
+                        console.log("Error getting pos=" + e);
+                    }
+                );
+            }, 1000);
+
+            // SeekTo to 10 seconds after 5 seconds
+            setTimeout(function() {
+                my_media.seekTo(10000);
+            }, 5000);
+        }
+
+        // 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;
+        }
+
+        &lt;/script&gt;
+      &lt;/head&gt;
+      &lt;body&gt;
+        &lt;a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');"&gt;Play Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="stopAudio();"&gt;Stop Playing Audio&lt;/a&gt;
+        &lt;p id="audio_position"&gt;&lt;/p&gt;
+      &lt;/body&gt;
+    &lt;/html&gt;
+</code></pre>
+
+<h2>
+<a name="media.seekTo_blackberry_webworks_quirks">BlackBerry WebWorks Quirks</a>
+</h2>
+
+<ul>
+<li>Not supported on BlackBerry OS 5 devices.</li>
+</ul>
+<hr>
+<h1><a name="media.setVolume">media.setVolume</a></h1>
+
+<p>Set the volume for an audio file.</p>
+
+<pre class="prettyprint"><code><a href="cordova_media_media.md.html#media.setVolume">media.setVolume</a>(volume);
+</code></pre>
+
+<h2>
+<a name="media.setVolume_parameters">Parameters</a>
+</h2>
+
+<ul>
+<li>
+<strong>volume</strong>: The volume to set for playback.  The value must be within the range of 0.0 to 1.0.</li>
+</ul>
+<h2>
+<a name="media.setVolume_description">Description</a>
+</h2>
+
+<p>Function <code><a href="cordova_media_media.md.html#media.setVolume">media.setVolume</a></code> is an asynchronous function that sets the volume during audio playback.</p>
+
+<h2>
+<a name="media.setVolume_supported_platforms">Supported Platforms</a>
+</h2>
+
+<ul>
+<li>Android</li>
+<li>iOS</li>
+</ul>
+<h2>
+<a name="media.setVolume_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// Play audio
+//
+function playAudio(url) {
+    // Play the audio file at url
+    var my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(url,
+        // success callback
+        function() {
+            console.log("playAudio():Audio Success");
+        },
+        // error callback
+        function(err) {
+            console.log("playAudio():Audio Error: "+err);
+    });
+
+    // Play audio
+    my_media.play();
+
+    // Mute volume after 2 seconds
+    setTimeout(function() {
+        my_media.setVolume('0.0');
+    }, 2000);
+
+    // Set volume to 1.0 after 5 seconds
+    setTimeout(function() {
+        my_media.setVolume('1.0');
+    }, 5000);
+}
+</code></pre>
+
+<h2>
+<a name="media.setVolume_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code>    &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+                          "http://www.w3.org/TR/html4/strict.dtd"&gt;
+    &lt;html&gt;
+      &lt;head&gt;
+        &lt;title&gt;<a href="cordova_media_media.md.html#Media">Media</a> Example&lt;/title&gt;
+
+        &lt;script type="text/javascript" charset="utf-8" src="cordova.js"&gt;&lt;/script&gt;
+        &lt;script type="text/javascript" charset="utf-8"&gt;
+
+        // Wait for Cordova to load
+        //
+        document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+        // Cordova is ready
+        //
+        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 <a href="cordova_media_media.md.html#Media">Media</a> object from src
+            my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(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 &gt; -1) {
+                                setAudioPosition((position) + " sec");
+                            }
+                        },
+                        // error callback
+                        function(e) {
+                            console.log("Error getting pos=" + e);
+                            setAudioPosition("Error: " + e);
+                        }
+                    );
+                }, 1000);
+            }
+        }
+
+        // Set audio volume
+        //
+        function setVolume(volume) {
+            if (my_media) {
+                my_media.setVolume(volume);
+            }
+        }
+
+        // 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;
+        }
+
+        &lt;/script&gt;
+      &lt;/head&gt;
+      &lt;body&gt;
+        &lt;a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');"&gt;Play Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="setVolume('0.0');"&gt;Mute Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="setVolume('1.0');"&gt;Unmute Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="stopAudio();"&gt;Stop Playing Audio&lt;/a&gt;
+        &lt;p id="audio_position"&gt;&lt;/p&gt;
+      &lt;/body&gt;
+    &lt;/html&gt;
+</code></pre>
+
+<hr>
+<h1><a name="media.startRecord">media.startRecord</a></h1>
+
+<p>Starts recording an audio file.</p>
+
+<pre class="prettyprint"><code><a href="cordova_media_media.md.html#media.startRecord">media.startRecord</a>();
+</code></pre>
+
+<h2>
+<a name="media.startRecord_description">Description</a>
+</h2>
+
+<p>The <code><a href="cordova_media_media.md.html#media.startRecord">media.startRecord</a></code> method executes synchronously, starts a
+recording for an audio file.</p>
+
+<h2>
+<a name="media.startRecord_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 and 8</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="media.startRecord_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// Record audio
+//
+function recordAudio() {
+    var src = "myrecording.mp3";
+    var mediaRec = new <a href="cordova_media_media.md.html#Media">Media</a>(src,
+        // success callback
+        function() {
+            console.log("recordAudio():Audio Success");
+        },
+
+        // error callback
+        function(err) {
+            console.log("recordAudio():Audio Error: "+ err.code);
+        });
+
+    // Record audio
+    mediaRec.startRecord();
+}
+</code></pre>
+
+<h2>
+<a name="media.startRecord_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_device_device.md.html#Device">Device</a> Properties Example&lt;/title&gt;
+
+    &lt;script type="text/javascript" charset="utf-8" src="cordova.js"&gt;&lt;/script&gt;
+    &lt;script type="text/javascript" charset="utf-8"&gt;
+
+    // Wait for device API libraries to load
+    //
+    document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+    // Record audio
+    //
+    function recordAudio() {
+        var src = "myrecording.amr";
+        var mediaRec = new <a href="cordova_media_media.md.html#Media">Media</a>(src, onSuccess, onError);
+
+        // Record audio
+        mediaRec.startRecord();
+
+        // Stop recording after 10 sec
+        var recTime = 0;
+        var recInterval = setInterval(function() {
+            recTime = recTime + 1;
+            setAudioPosition(recTime + " sec");
+            if (recTime &gt;= 10) {
+                clearInterval(recInterval);
+                mediaRec.stopRecord();
+            }
+        }, 1000);
+    }
+
+    // device APIs are available
+    //
+    function onDeviceReady() {
+        recordAudio();
+    }
+
+    // onSuccess Callback
+    //
+    function onSuccess() {
+        console.log("recordAudio():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;
+    }
+
+    &lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p id="media"&gt;Recording audio...&lt;/p&gt;
+    &lt;p id="audio_position"&gt;&lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</code></pre>
+
+<h2>
+<a name="media.startRecord_android_quirks">Android Quirks</a>
+</h2>
+
+<ul>
+<li>Android devices record audio in Adaptive Multi-Rate format. The specified file should end with a <em>.amr</em> extension.</li>
+</ul>
+<h2>
+<a name="media.startRecord_blackberry_webworks_quirks">BlackBerry WebWorks Quirks</a>
+</h2>
+
+<ul>
+<li>BlackBerry devices record audio in Adaptive Multi-Rate format. The specified file must end with a <em>.amr</em> extension.</li>
+</ul>
+<h2>
+<a name="media.startRecord_ios_quirks">iOS Quirks</a>
+</h2>
+
+<ul>
+<li><p>iOS only records to files of type <em>.wav</em> and returns an error if the file name extension is not correct.</p></li>
+<li><p>If a full path is not provided, the recording is placed in the application's <code>documents/tmp</code> directory. This can be accessed via the <code><a href="cordova_file_file.md.html#File">File</a></code> API using <code><a href="cordova_file_file.md.html#LocalFileSystem">LocalFileSystem</a>.TEMPORARY</code>. Any subdirectory specified at record time must already exist.</p></li>
+<li>
+<p>Files can be recorded and played back using the documents URI:</p>
+
+<pre class="prettyprint"><code>var myMedia = new <a href="cordova_media_media.md.html#Media">Media</a>("documents://beer.mp3")
+</code></pre>
+</li>
+</ul>
+<h2>
+<a name="media.startRecord_tizen_quirks">Tizen Quirks</a>
+</h2>
+
+<ul>
+<li>Not supported on Tizen devices.</li>
+</ul>
+<hr>
+<h1><a name="media.stop">media.stop</a></h1>
+
+<p>Stops playing an audio file.</p>
+
+<pre class="prettyprint"><code><a href="cordova_media_media.md.html#media.stop">media.stop</a>();
+</code></pre>
+
+<h2>
+<a name="media.stop_description">Description</a>
+</h2>
+
+<p>The <code><a href="cordova_media_media.md.html#media.stop">media.stop</a></code> method executes synchronously to stop playing an
+audio file.</p>
+
+<h2>
+<a name="media.stop_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 and 8</li>
+<li>Tizen</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="media.stop_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// Play audio
+//
+function playAudio(url) {
+    // Play the audio file at url
+    var my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(url,
+        // success callback
+        function() {
+            console.log("playAudio():Audio Success");
+        },
+        // error callback
+        function(err) {
+            console.log("playAudio():Audio Error: "+err);
+        }
+    );
+
+    // Play audio
+    my_media.play();
+
+    // Pause after 10 seconds
+    setTimeout(function() {
+        my_media.stop();
+    }, 10000);
+}
+</code></pre>
+
+<h2>
+<a name="media.stop_full_example">Full Example</a>
+</h2>
+
+<pre class="prettyprint"><code>    &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+                          "http://www.w3.org/TR/html4/strict.dtd"&gt;
+    &lt;html&gt;
+      &lt;head&gt;
+        &lt;title&gt;<a href="cordova_media_media.md.html#Media">Media</a> Example&lt;/title&gt;
+
+        &lt;script type="text/javascript" charset="utf-8" src="cordova.js"&gt;&lt;/script&gt;
+        &lt;script type="text/javascript" charset="utf-8"&gt;
+
+        // Wait for device API libraries to load
+        //
+        document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", 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 <a href="cordova_media_media.md.html#Media">Media</a> object from src
+            my_media = new <a href="cordova_media_media.md.html#Media">Media</a>(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 &gt; -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.<a href="cordova_events_events.md.html#pause">pause</a>();
+            }
+        }
+
+        // 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;
+        }
+
+        &lt;/script&gt;
+      &lt;/head&gt;
+      &lt;body&gt;
+        &lt;a href="#" class="btn large" onclick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');"&gt;Play Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="pauseAudio();"&gt;Pause Playing Audio&lt;/a&gt;
+        &lt;a href="#" class="btn large" onclick="stopAudio();"&gt;Stop Playing Audio&lt;/a&gt;
+        &lt;p id="audio_position"&gt;&lt;/p&gt;
+      &lt;/body&gt;
+    &lt;/html&gt;
+</code></pre>
+
+<hr>
+<h1><a name="media.stopRecord">media.stopRecord</a></h1>
+
+<p>Stops recording an audio file.</p>
+
+<pre class="prettyprint"><code><a href="cordova_media_media.md.html#media.stopRecord">media.stopRecord</a>();
+</code></pre>
+
+<h2>
+<a name="media.stopRecord_description">Description</a>
+</h2>
+
+<p>The <code><a href="cordova_media_media.md.html#media.stopRecord">media.stopRecord</a></code> method executes synchronously, stopping the
+recording of an audio file.</p>
+
+<h2>
+<a name="media.stopRecord_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 and 8</li>
+<li>Windows 8</li>
+</ul>
+<h2>
+<a name="media.stopRecord_quick_example">Quick Example</a>
+</h2>
+
+<pre class="prettyprint"><code>// Record audio
+//
+function recordAudio() {
+    var src = "myrecording.mp3";
+    var mediaRec = new <a href="cordova_media_media.md.html#Media">Media</a>(src,
+        // success callback
+        function() {
+            console.log("recordAudio():Audio Success");
+        },
+
+        // error callback
+        function(err) {
+            console.log("recordAudio():Audio Error: "+ err.code);
+        }
+    );
+
+    // Record audio
+    mediaRec.startRecord();
+
+    // Stop recording after 10 seconds
+    setTimeout(function() {
+        mediaRec.stopRecord();
+    }, 10000);
+}
+</code></pre>
+
+<h2>
+<a name="media.stopRecord_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_device_device.md.html#Device">Device</a> Properties Example&lt;/title&gt;
+
+    &lt;script type="text/javascript" charset="utf-8" src="cordova.js"&gt;&lt;/script&gt;
+    &lt;script type="text/javascript" charset="utf-8"&gt;
+
+    // Wait for device API libraries to load
+    //
+    document.<a href="cordova_inappbrowser_inappbrowser.md.html#addEventListener">addEventListener</a>("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
+
+    // Record audio
+    //
+    function recordAudio() {
+        var src = "myrecording.mp3";
+        var mediaRec = new <a href="cordova_media_media.md.html#Media">Media</a>(src, onSuccess, onError);
+
+        // Record audio
+        mediaRec.startRecord();
+
+        // Stop recording after 10 sec
+        var recTime = 0;
+        var recInterval = setInterval(function() {
+            recTime = recTime + 1;
+            setAudioPosition(recTime + " sec");
+            if (recTime &gt;= 10) {
+                clearInterval(recInterval);
+                mediaRec.stopRecord();
+            }
+        }, 1000);
+    }
+
+    // device APIs are available
+    //
+    function onDeviceReady() {
+        recordAudio();
+    }
+
+    // onSuccess Callback
+    //
+    function onSuccess() {
+        console.log("recordAudio():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;
+    }
+
+    &lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p id="media"&gt;Recording audio...&lt;/p&gt;
+    &lt;p id="audio_position"&gt;&lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</code></pre>
+
+<h2>
+<a name="media.stopRecord_tizen_quirks">Tizen Quirks</a>
+</h2>
+
+<ul>
+<li>Not supported on Tizen devices.</li>
+</ul>
+<hr>
+<h1><a name="MediaError">MediaError</a></h1>
+
+<p>A <code><a href="cordova_media_media.md.html#MediaError">MediaError</a></code> object is returned to the <code><a href="cordova_media_media.md.html#mediaError">mediaError</a></code> callback
+function when an error occurs.</p>
+
+<h2>
+<a name="MediaError_properties">Properties</a>
+</h2>
+
+<ul>
+<li><p><strong>code</strong>: One of the predefined error codes listed below.</p></li>
+<li><p><strong>message</strong>: An error message describing the details of the error.</p></li>
+</ul>
+<h2>
+<a name="MediaError_constants">Constants</a>
+</h2>
+
+<ul>
+<li><code><a href="cordova_media_media.md.html#MediaError">MediaError</a>.MEDIA_ERR_ABORTED</code></li>
+<li><code><a href="cordova_media_media.md.html#MediaError">MediaError</a>.MEDIA_ERR_NETWORK</code></li>
+<li><code><a href="cordova_media_media.md.html#MediaError">MediaError</a>.MEDIA_ERR_DECODE</code></li>
+<li><code><a href="cordova_media_media.md.html#MediaError">MediaError</a>.MEDIA_ERR_NONE_SUPPORTED</code></li>
+</ul>
+<h2>
+<a name="MediaError_description">Description</a>
+</h2>
+
+<p>The <code><a href="cordova_media_media.md.html#MediaError">MediaError</a></code> object is passed to a <code><a href="cordova_media_media.md.html#mediaError">mediaError</a></code> callback function
+when an error occurs.</p>
+
+<hr>
+<h1><a name="mediaError">mediaError</a></h1>
+
+<p>A user-specified callback function that executes when there is an
+error in media functions.</p>
+
+<pre class="prettyprint"><code>function(error) {
+    // Handle the error
+}
+</code></pre>
+
+<h2>
+<a name="mediaError_parameters">Parameters</a>
+</h2>
+
+<ul>
+<li>
+<strong>error</strong>: The error returned by the device. <em>(<a href="cordova_media_media.md.html#MediaError">MediaError</a>)</em>
+</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>