You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2016/03/23 20:14:11 UTC
svn commit: r1736375 [35/44] - in /cordova/site/public: ./
announcements/2016/03/22/ blog/ docs/en/6.x/guide/cli/
docs/en/6.x/guide/hybrid/plugins/ docs/en/6.x/reference/cordova-cli/
docs/en/6.x/reference/cordova-plugin-splashscreen/ docs/en/dev/cordov...
Added: cordova/site/public/docs/en/dev/gen/cordova-plugin-media-capture/index.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/dev/gen/cordova-plugin-media-capture/index.html?rev=1736375&view=auto
==============================================================================
--- cordova/site/public/docs/en/dev/gen/cordova-plugin-media-capture/index.html (added)
+++ cordova/site/public/docs/en/dev/gen/cordova-plugin-media-capture/index.html Wed Mar 23 19:14:10 2016
@@ -0,0 +1,3401 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta name="format-detection" content="telephone=no">
+ <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
+ <meta name="description" content=" ">
+
+ <title>
+
+ Apache Cordova
+
+ </title>
+
+ <link rel="SHORTCUT ICON" href="/favicon.ico"/>
+ <link rel="canonical" href="https://cordova.apache.org/docs/en/dev/gen/cordova-plugin-media-capture/">
+
+ <!-- CSS -->
+ <link rel="stylesheet" type="text/css" href="/static/css/main.css">
+
+
+ <link rel="stylesheet" type="text/css" href="/static/js/lib/prettify/prettify.css">
+
+
+ <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
+ <!--[if lt IE 9]>
+ <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
+ <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+ <![endif]-->
+ <script type="text/javascript">
+ var disqus_developer = 1; // this would set it to developer mode
+ </script>
+
+ <!-- JS -->
+ <script defer type="text/javascript" src="/static/js/lib/jquery-2.1.1.min.js"></script>
+ <script defer type="text/javascript" src="/static/js/lib/bootstrap.min.js"></script>
+ <script defer type="text/javascript" src="/static/js/lib/ZeroClipboard.js"></script>
+</head>
+
+<body>
+ <header>
+ <a class="scroll-point pt-top" name="top"></a>
+ <nav class="navbar navbar-inverse navbar-fixed-top">
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="/"><img id="logo_top" src="/static/img/cordova-logo-newbrand.svg"/></a>
+ </div>
+ <div id="navbar" class="navbar-collapse collapse">
+ <div class="nav_bar_center">
+ <ul class="nav navbar-nav">
+ <li class="active">
+ <a href="/docs/en/latest/guide/overview/">Documentation</a>
+ </li>
+ <li >
+ <a href="/plugins">Plugins</a>
+ </li>
+ <li >
+ <a href="/blog" id="blog_button">Blog<span class="badge" id="new_blog_count"></span></a>
+ </li>
+ <li >
+ <a href="/contribute">Contribute</a>
+ </li>
+ <li>
+ <a href="/#getstarted">Get Started</a>
+ </li>
+ </ul>
+ <form action="https://www.google.com/search" method="GET" class="navbar-form navbar-right" id="header-search-form" role="search">
+ <div class="input-group">
+ <input type="text" name="q" class="form-control hidden-sm" placeholder="Site-wide Search">
+ <span class="input-group-btn">
+ <button type="submit" class="btn search-button">
+ <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
+ </button>
+ </span>
+ </div>
+ <input type="hidden" name="q" value="site:cordova.apache.org">
+ </form>
+ </div>
+ </div><!--/.navbar-collapse -->
+ </div>
+ </nav>
+ <div id="_fixed_navbar_spacer" style="padding-top:50px"></div>
+</header>
+
+ <!-- Use the manual ToC, and if it doesn't exist, use the generated one -->
+
+
+
+
+
+
+
+
+
+
+
+
+<div class="docs container">
+
+ <!-- Table of Contents -->
+ <div class="hidden-xs hidden-sm col-md-3 site-toc-container">
+ <h2 class="site-toc-title">Table of Contents</h2>
+ <ul class="site-toc">
+
+
+
+
+
+
+
+ <li>
+
+ <span class="toc-section-heading">
+ Introduction
+ </span>
+
+
+
+
+
+
+ <ul class="site-toc">
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/overview/index.html">
+ Overview
+ </a>
+
+
+
+
+
+
+ </li>
+
+</ul>
+
+
+ </li>
+
+
+
+
+
+
+
+ <li>
+
+ <span class="toc-section-heading">
+ Create apps
+ </span>
+
+
+
+
+
+
+ <ul class="site-toc">
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/cli/index.html">
+ Create your first app
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/support/index.html">
+ Platform support
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+
+
+ <li>
+
+ <span class="toc-section-heading">
+ Develop for platforms
+ </span>
+
+
+
+
+
+
+ <ul class="site-toc">
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/platforms/android/index.html">
+ Android
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/platforms/blackberry10/home.html">
+ Blackberry 10
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/platforms/ios/index.html">
+ iOS
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/platforms/ubuntu/index.html">
+ Ubuntu
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/platforms/win8/index.html">
+ Windows
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/platforms/wp8/home.html">
+ WP8
+ </a>
+
+
+
+
+
+
+ </li>
+
+</ul>
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../platform_plugin_versioning_ref/index.html">
+ Manage versions and platforms
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../config_ref/images.html">
+ Use icons
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova/storage/storage.html">
+ Store data
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/appdev/privacy/index.html">
+ Manage privacy
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/appdev/security/index.html">
+ Manage security
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/appdev/whitelist/index.html">
+ Whitelisting
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+
+</ul>
+
+
+ </li>
+
+
+
+
+
+
+
+ <li>
+
+ <span class="toc-section-heading">
+ Create plugins
+ </span>
+
+
+
+
+
+
+ <ul class="site-toc">
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/hybrid/plugins/index.html">
+ Create a plugin
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+
+ <span class="toc-section-heading">
+ Develop for platforms
+ </span>
+
+
+
+
+
+
+ <ul class="site-toc">
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/platforms/android/plugin.html">
+ Android
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/platforms/blackberry10/plugin.html">
+ Blackberry 10
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/platforms/ios/plugin.html">
+ iOS
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/platforms/win8/plugin.html">
+ Windows
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/platforms/wp8/plugin.html">
+ WP8
+ </a>
+
+
+
+
+
+
+ </li>
+
+</ul>
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../plugin_ref/plugman.html">
+ Use Plugman
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+
+</ul>
+
+
+ </li>
+
+
+
+
+
+
+
+ <li>
+
+ <span class="toc-section-heading">
+ Advanced Topics
+ </span>
+
+
+
+
+
+
+ <ul class="site-toc">
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/hybrid/webviews/index.html">
+ Embed Cordova in native apps
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/next/index.html">
+ Next Steps
+ </a>
+
+
+
+
+
+
+ </li>
+
+</ul>
+
+
+ </li>
+
+
+
+
+
+
+
+ <li>
+
+ <span class="toc-section-heading">
+ Reference
+ </span>
+
+
+
+
+
+
+ <ul class="site-toc">
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../config_ref/index.html">
+ Config.xml
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova/events/events.html">
+ Events
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-cli/index.html">
+ CLI
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../guide/appdev/hooks/index.html">
+ Hooks
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../plugin_ref/spec.html">
+ Plugin.xml
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+
+
+ <li>
+
+ <span class="toc-section-heading">
+ Plugin APIs
+ </span>
+
+
+
+
+
+
+ <ul class="site-toc">
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-battery-status/index.html">
+ Battery Status
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-camera/index.html">
+ Camera
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-console/index.html">
+ Console
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-contacts/index.html">
+ Contacts
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-device/index.html">
+ Device
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-device-motion/index.html">
+ Device Motion
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-device-orientation/index.html">
+ Device Orientation
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-dialogs/index.html">
+ Dialogs
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-file/index.html">
+ File
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-file-transfer/index.html">
+ File Transfer
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-geolocation/index.html">
+ Geolocation
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-globalization/index.html">
+ Globalization
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-inappbrowser/index.html">
+ Inappbrowser
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-media/index.html">
+ Media
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-media-capture/index.html">
+ Media Capture
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-network-information/index.html">
+ Network Information
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-splashscreen/index.html">
+ Splashscreen
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-vibration/index.html">
+ Vibration
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-statusbar/index.html">
+ Statusbar
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-whitelist/index.html">
+ Whitelist
+ </a>
+
+
+
+
+
+
+ </li>
+
+
+
+
+
+ <li>
+
+ <a class="" href="../../cordova-plugin-legacy-whitelist/index.html">
+ Legacy Whitelist
+ </a>
+
+
+
+
+
+
+ </li>
+
+</ul>
+
+
+ </li>
+
+</ul>
+
+
+ </li>
+
+
+
+
+
+
+</ul>
+
+ </div>
+
+ <!-- Page content -->
+ <div class="col-md-8 col-md-offset-1">
+
+ <!-- ToC Dropdown (for XS and SM sizes only) -->
+ <div class="toc-dropdown content-header visible-xs-block visible-sm-block">
+ <div class="dropdown">
+ <button class="btn btn-default dropdown-toggle" type="button" id="tocDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
+ Table of Contents
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+
+
+
+
+
+<li>
+ <a class="" href="../../guide/overview/index.html">
+ Overview
+ </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+<li>
+ <a class="" href="../../guide/cli/index.html">
+ Create your first app
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../guide/support/index.html">
+ Platform support
+ </a>
+</li>
+
+
+
+
+
+
+
+<li>
+ <a class="" href="../../guide/platforms/android/index.html">
+ Android
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../guide/platforms/blackberry10/home.html">
+ Blackberry 10
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../guide/platforms/ios/index.html">
+ iOS
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../guide/platforms/ubuntu/index.html">
+ Ubuntu
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../guide/platforms/win8/index.html">
+ Windows
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../guide/platforms/wp8/home.html">
+ WP8
+ </a>
+</li>
+
+
+
+
+
+
+
+<li>
+ <a class="" href="../../platform_plugin_versioning_ref/index.html">
+ Manage versions and platforms
+ </a>
+</li>
+
+
+
+
+
+
+
+<li>
+ <a class="" href="../../config_ref/images.html">
+ Use icons
+ </a>
+</li>
+
+
+
+
+
+
+
+<li>
+ <a class="" href="../../cordova/storage/storage.html">
+ Store data
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../guide/appdev/privacy/index.html">
+ Manage privacy
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../guide/appdev/security/index.html">
+ Manage security
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../guide/appdev/whitelist/index.html">
+ Whitelisting
+ </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<li>
+ <a class="" href="../../guide/hybrid/plugins/index.html">
+ Create a plugin
+ </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+<li>
+ <a class="" href="../../guide/platforms/android/plugin.html">
+ Android
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../guide/platforms/blackberry10/plugin.html">
+ Blackberry 10
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../guide/platforms/ios/plugin.html">
+ iOS
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../guide/platforms/win8/plugin.html">
+ Windows
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../guide/platforms/wp8/plugin.html">
+ WP8
+ </a>
+</li>
+
+
+
+
+
+
+
+<li>
+ <a class="" href="../../plugin_ref/plugman.html">
+ Use Plugman
+ </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<li>
+ <a class="" href="../../guide/hybrid/webviews/index.html">
+ Embed Cordova in native apps
+ </a>
+</li>
+
+
+
+
+
+
+
+<li>
+ <a class="" href="../../guide/next/index.html">
+ Next Steps
+ </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+<li>
+ <a class="" href="../../config_ref/index.html">
+ Config.xml
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova/events/events.html">
+ Events
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-cli/index.html">
+ CLI
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../guide/appdev/hooks/index.html">
+ Hooks
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../plugin_ref/spec.html">
+ Plugin.xml
+ </a>
+</li>
+
+
+
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-battery-status/index.html">
+ Battery Status
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-camera/index.html">
+ Camera
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-console/index.html">
+ Console
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-contacts/index.html">
+ Contacts
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-device/index.html">
+ Device
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-device-motion/index.html">
+ Device Motion
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-device-orientation/index.html">
+ Device Orientation
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-dialogs/index.html">
+ Dialogs
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-file/index.html">
+ File
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-file-transfer/index.html">
+ File Transfer
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-geolocation/index.html">
+ Geolocation
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-globalization/index.html">
+ Globalization
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-inappbrowser/index.html">
+ Inappbrowser
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-media/index.html">
+ Media
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-media-capture/index.html">
+ Media Capture
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-network-information/index.html">
+ Network Information
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-splashscreen/index.html">
+ Splashscreen
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-vibration/index.html">
+ Vibration
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-statusbar/index.html">
+ Statusbar
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-whitelist/index.html">
+ Whitelist
+ </a>
+</li>
+
+
+
+
+<li>
+ <a class="" href="../../cordova-plugin-legacy-whitelist/index.html">
+ Legacy Whitelist
+ </a>
+</li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ </ul>
+ </div>
+ </div>
+
+ <div class="content-header">
+
+ <a class="edit" href="https://github.com/apache/cordova-plugin-media-capture/blob/1.2.0/README.md">
+ <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit
+ </a>
+
+ <!-- Language dropdown -->
+ <div class="dropdown">
+ <button class="btn btn-default dropdown-toggle" type="button" id="languageDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
+ English
+ <span class="caret"></span>
+ </button>
+
+ <!-- List all languages -->
+ <ul class="dropdown-menu" aria-labelledby="languageDropdown">
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <a href="/docs/de/dev/gen/cordova-plugin-media-capture/index.html" class="
+
+
+ "
+ >
+
+ Deutsch
+
+ </a>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <a href="/docs/en/dev/gen/cordova-plugin-media-capture/index.html" class="
+
+
+ "
+ >
+
+ <span class="selected">
+ English
+ </span>
+
+ </a>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <a href="/docs/es/dev/gen/cordova-plugin-media-capture/index.html" class="
+
+
+ "
+ >
+
+ Español
+
+ </a>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <a href="/docs/fr/dev/gen/cordova-plugin-media-capture/index.html" class="
+
+
+ "
+ >
+
+ Français
+
+ </a>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <a href="/docs/it/dev/gen/cordova-plugin-media-capture/index.html" class="
+
+
+ "
+ >
+
+ Italiano
+
+ </a>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <a href="/docs/ja/dev/gen/cordova-plugin-media-capture/index.html" class="
+
+
+ "
+ >
+
+ æ¥æ¬èª
+
+ </a>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <a href="/docs/ko/dev/gen/cordova-plugin-media-capture/index.html" class="
+
+
+ "
+ >
+
+ íêµì´
+
+ </a>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <a href="/docs/pl/dev/gen/cordova-plugin-media-capture/index.html" class="
+
+
+ "
+ >
+
+ Polski
+
+ </a>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <a href="/docs/ru/dev/gen/cordova-plugin-media-capture/index.html" class="
+
+
+ "
+ >
+
+ Ð ÑÑÑкий
+
+ </a>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <a href="/docs/sl/dev/gen/cordova-plugin-media-capture/index.html" class="
+
+
+ "
+ >
+
+ Slovene
+
+ </a>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <a href="/docs/zh/dev/gen/cordova-plugin-media-capture/index.html" class="
+
+
+ "
+ >
+
+ æ±è¯
+
+ </a>
+ </li>
+
+ </ul>
+ </div>
+
+ <!-- Version dropdown -->
+ <div class="dropdown">
+ <button class="btn btn-default dropdown-toggle" type="button" id="versionDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
+ dev
+
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu" aria-labelledby="versionDropdown">
+
+ <!-- List versions available in this language -->
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/dev/gen/cordova-plugin-media-capture/index.html">
+
+ <span class="selected">
+
+ dev
+
+
+ </span>
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/6.x/gen/cordova-plugin-media-capture/index.html">
+
+
+ 6.x
+
+ (Latest)
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/5.4.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 5.4.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/5.1.1/gen/cordova-plugin-media-capture/index.html">
+
+
+ 5.1.1
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/5.0.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 5.0.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/4.0.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 4.0.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/3.6.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 3.6.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/3.5.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 3.5.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/3.4.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 3.4.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/3.3.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 3.3.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/3.2.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 3.2.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/3.1.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 3.1.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/3.0.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 3.0.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/2.9.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 2.9.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/2.8.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 2.8.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/2.7.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 2.7.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/2.6.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 2.6.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/2.5.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 2.5.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/2.4.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 2.4.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/2.3.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 2.3.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/2.2.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 2.2.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/2.1.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 2.1.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/2.0.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 2.0.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/1.9.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 1.9.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/1.8.1/gen/cordova-plugin-media-capture/index.html">
+
+
+ 1.8.1
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/1.8.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 1.8.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/1.7.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 1.7.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/1.6.1/gen/cordova-plugin-media-capture/index.html">
+
+
+ 1.6.1
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/1.6.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 1.6.0
+
+
+
+ </a>
+ </li>
+
+ <li>
+
+
+
+
+
+
+
+
+ <a href="/docs/en/1.5.0/gen/cordova-plugin-media-capture/index.html">
+
+
+ 1.5.0
+
+
+
+ </a>
+ </li>
+
+ </ul>
+ </div>
+ </div>
+
+ <!-- Get URL for this page in the latest version -->
+
+
+
+
+ <!-- Show warnings for special versions (i.e. non-latest, and dev) -->
+
+
+
+
+
+
+
+ <div class="alert alert-info docs-alert" role="alert">
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close">
+ <span aria-hidden="true">×</span>
+ </button>
+ This version of the documentation is under development!
+ <a href="/docs/en/latest/gen/cordova-plugin-media-capture/index.html">
+ Click here for the latest released version.
+ </a>
+ </div>
+
+
+
+
+ <div class="alert alert-warning docs-alert" role="alert">
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close">
+ <span aria-hidden="true">×</span>
+ </button>
+ This documentation describes this plugin at version 1.2.0.
+ <a href="https://github.com/apache/apache/cordova-plugin-media-capture/releases">
+ Other versions are on GitHub.
+ </a>
+ </div>
+
+
+
+ <div id="page-toc-source">
+ <!--
+# 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.
+-->
+
+<h1>cordova-plugin-media-capture</h1>
+
+<p>This plugin provides access to the device's audio, image, and video capture capabilities.</p>
+
+<p><strong>WARNING</strong>: Collection and use of images, video, or
+audio from the device's camera or microphone raises important privacy
+issues. Your app's privacy policy 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 before the app accesses 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 <strong>OK</strong> and <strong>No
+Thanks</strong>). 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.</p>
+
+<p>This plugin defines global <code class="prettyprint">navigator.device.capture</code> object.</p>
+
+<p>Although in the global scope, it is not available until after the <code class="prettyprint">deviceready</code> event.</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">document.addEventListener("deviceready", onDeviceReady, false);
+function onDeviceReady() {
+ console.log(navigator.device.capture);
+}
+</code></pre></div>
+<h2>Installation</h2>
+<div class="highlight"><pre><code class="language-text" data-lang="text">cordova plugin add cordova-plugin-media-capture
+</code></pre></div>
+<h2>Supported Platforms</h2>
+
+<ul>
+<li>Amazon Fire OS</li>
+<li>Android</li>
+<li>BlackBerry 10</li>
+<li>Browser</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Windows 8</li>
+<li>Windows</li>
+</ul>
+
+<h2>Objects</h2>
+
+<ul>
+<li>Capture</li>
+<li>CaptureAudioOptions</li>
+<li>CaptureImageOptions</li>
+<li>CaptureVideoOptions</li>
+<li>CaptureCallback</li>
+<li>CaptureErrorCB</li>
+<li>ConfigurationData</li>
+<li>MediaFile</li>
+<li>MediaFileData</li>
+</ul>
+
+<h2>Methods</h2>
+
+<ul>
+<li>capture.captureAudio</li>
+<li>capture.captureImage</li>
+<li>capture.captureVideo</li>
+<li>MediaFile.getFormatData</li>
+</ul>
+
+<h2>Properties</h2>
+
+<ul>
+<li><p><strong>supportedAudioModes</strong>: The audio recording formats supported by the device. (ConfigurationData[])</p></li>
+<li><p><strong>supportedImageModes</strong>: The recording image sizes and formats supported by the device. (ConfigurationData[])</p></li>
+<li><p><strong>supportedVideoModes</strong>: The recording video resolutions and formats supported by the device. (ConfigurationData[])</p></li>
+</ul>
+
+<h2>capture.captureAudio</h2>
+
+<blockquote>
+<p>Start the audio recorder application and return information about captured audio clip files.</p>
+</blockquote>
+<div class="highlight"><pre><code class="language-text" data-lang="text">navigator.device.capture.captureAudio(
+ CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureAudioOptions options]
+);
+</code></pre></div>
+<h3>Description</h3>
+
+<p>Starts an asynchronous operation to capture audio recordings using the
+device's default audio recording application. The operation allows
+the device user to capture multiple recordings in a single session.</p>
+
+<p>The capture operation ends when either the user exits the audio
+recording application, or the maximum number of recordings specified
+by <code class="prettyprint">CaptureAudioOptions.limit</code> is reached. If no <code class="prettyprint">limit</code> parameter
+value is specified, it defaults to one (1), and the capture operation
+terminates after the user records a single audio clip.</p>
+
+<p>When the capture operation finishes, the <code class="prettyprint">CaptureCallback</code> executes
+with an array of <code class="prettyprint">MediaFile</code> objects describing each captured audio
+clip file. If the user terminates the operation before an audio clip
+is captured, the <code class="prettyprint">CaptureErrorCallback</code> executes with a <code class="prettyprint">CaptureError</code>
+object, featuring the <code class="prettyprint">CaptureError.CAPTURE_NO_MEDIA_FILES</code> error
+code.</p>
+
+<h3>Supported Platforms</h3>
+
+<ul>
+<li>Amazon Fire OS</li>
+<li>Android</li>
+<li>BlackBerry 10</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Windows 8</li>
+<li>Windows</li>
+</ul>
+
+<h3>Example</h3>
+<div class="highlight"><pre><code class="language-text" data-lang="text">// 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});
+</code></pre></div>
+<h3>iOS Quirks</h3>
+
+<ul>
+<li>iOS does not have a default audio recording application, so a simple user interface is provided.</li>
+</ul>
+
+<h3>Windows Phone 7 and 8 Quirks</h3>
+
+<ul>
+<li>Windows Phone 7 does not have a default audio recording application, so a simple user interface is provided.</li>
+</ul>
+
+<h2>CaptureAudioOptions</h2>
+
+<blockquote>
+<p>Encapsulates audio capture configuration options.</p>
+</blockquote>
+
+<h3>Properties</h3>
+
+<ul>
+<li><p><strong>limit</strong>: The maximum number of audio clips the device user can record in a single capture operation. The value must be greater than or equal to 1 (defaults to 1).</p></li>
+<li><p><strong>duration</strong>: The maximum duration of an audio sound clip, in seconds.</p></li>
+</ul>
+
+<h3>Example</h3>
+<div class="highlight"><pre><code class="language-text" data-lang="text">// 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);
+</code></pre></div>
+<h3>Amazon Fire OS Quirks</h3>
+
+<ul>
+<li>The <code class="prettyprint">duration</code> parameter is not supported. Recording lengths cannot be limited programmatically.</li>
+</ul>
+
+<h3>Android Quirks</h3>
+
+<ul>
+<li>The <code class="prettyprint">duration</code> parameter is not supported. Recording lengths can't be limited programmatically.</li>
+</ul>
+
+<h3>BlackBerry 10 Quirks</h3>
+
+<ul>
+<li>The <code class="prettyprint">duration</code> parameter is not supported. Recording lengths can't be limited programmatically.</li>
+<li>The <code class="prettyprint">limit</code> parameter is not supported, so only one recording can be created for each invocation.</li>
+</ul>
+
+<h3>iOS Quirks</h3>
+
+<ul>
+<li>The <code class="prettyprint">limit</code> parameter is not supported, so only one recording can be created for each invocation.</li>
+</ul>
+
+<h2>capture.captureImage</h2>
+
+<blockquote>
+<p>Start the camera application and return information about captured image files.</p>
+</blockquote>
+<div class="highlight"><pre><code class="language-text" data-lang="text">navigator.device.capture.captureImage(
+ CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureImageOptions options]
+);
+</code></pre></div>
+<h3>Description</h3>
+
+<p>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.</p>
+
+<p>The capture operation ends either when the user closes the camera
+application, or the maximum number of recordings specified by
+<code class="prettyprint">CaptureAudioOptions.limit</code> is reached. If no <code class="prettyprint">limit</code> value is
+specified, it defaults to one (1), and the capture operation
+terminates after the user captures a single image.</p>
+
+<p>When the capture operation finishes, it invokes the <code class="prettyprint">CaptureCB</code>
+callback with an array of <code class="prettyprint">MediaFile</code> objects describing each captured
+image file. If the user terminates the operation before capturing an
+image, the <code class="prettyprint">CaptureErrorCB</code> callback executes with a <code class="prettyprint">CaptureError</code>
+object featuring a <code class="prettyprint">CaptureError.CAPTURE_NO_MEDIA_FILES</code> error code.</p>
+
+<h3>Supported Platforms</h3>
+
+<ul>
+<li>Amazon Fire OS</li>
+<li>Android</li>
+<li>BlackBerry 10</li>
+<li>Browser</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Windows 8</li>
+<li>Windows</li>
+</ul>
+
+<h3>Windows Phone 7 Quirks</h3>
+
+<p>Invoking the native camera application while your device is connected
+via Zune does not work, and the error callback executes.</p>
+
+<h3>Browser Quirks</h3>
+
+<p>Works in Chrome, Firefox and Opera only (since IE and Safari doesn't supports
+navigator.getUserMedia API)</p>
+
+<p>Displaying images using captured file's URL available in Chrome/Opera only.
+Firefox stores captured images in IndexedDB storage (see File plugin documentation),
+and due to this the only way to show captured image is to read it and show using its DataURL.</p>
+
+<h3>Example</h3>
+<div class="highlight"><pre><code class="language-text" data-lang="text">// 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});
+</code></pre></div>
+<h2>CaptureImageOptions</h2>
+
+<blockquote>
+<p>Encapsulates image capture configuration options.</p>
+</blockquote>
+
+<h3>Properties</h3>
+
+<ul>
+<li><strong>limit</strong>: 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).</li>
+</ul>
+
+<h3>Example</h3>
+<div class="highlight"><pre><code class="language-text" data-lang="text">// limit capture operation to 3 images
+var options = { limit: 3 };
+
+navigator.device.capture.captureImage(captureSuccess, captureError, options);
+</code></pre></div>
+<h3>iOS Quirks</h3>
+
+<ul>
+<li>The <strong>limit</strong> parameter is not supported, and only one image is taken per invocation.</li>
+</ul>
+
+<h2>capture.captureVideo</h2>
+
+<blockquote>
+<p>Start the video recorder application and return information about captured video clip files.</p>
+</blockquote>
+<div class="highlight"><pre><code class="language-text" data-lang="text">navigator.device.capture.captureVideo(
+ CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureVideoOptions options]
+);
+</code></pre></div>
+<h3>Description</h3>
+
+<p>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.</p>
+
+<p>The capture operation ends when either the user exits the video
+recording application, or the maximum number of recordings specified
+by <code class="prettyprint">CaptureVideoOptions.limit</code> is reached. If no <code class="prettyprint">limit</code> parameter
+value is specified, it defaults to one (1), and the capture operation
+terminates after the user records a single video clip.</p>
+
+<p>When the capture operation finishes, it the <code class="prettyprint">CaptureCB</code> callback
+executes with an array of <code class="prettyprint">MediaFile</code> objects describing each captured
+video clip file. If the user terminates the operation before
+capturing a video clip, the <code class="prettyprint">CaptureErrorCB</code> callback executes with a
+<code class="prettyprint">CaptureError</code> object featuring a
+<code class="prettyprint">CaptureError.CAPTURE_NO_MEDIA_FILES</code> error code.</p>
+
+<h3>Supported Platforms</h3>
+
+<ul>
+<li>Amazon Fire OS</li>
+<li>Android</li>
+<li>BlackBerry 10</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Windows 8</li>
+<li>Windows</li>
+</ul>
+
+<h3>Example</h3>
+<div class="highlight"><pre><code class="language-text" data-lang="text">// 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});
+</code></pre></div>
+<h3>BlackBerry 10 Quirks</h3>
+
+<ul>
+<li>Cordova for BlackBerry 10 attempts to launch the <strong>Video Recorder</strong> application, provided by RIM, to capture video recordings. The app receives a <code class="prettyprint">CaptureError.CAPTURE_NOT_SUPPORTED</code> error code if the application is not installed on the device.</li>
+</ul>
+
+<h2>CaptureVideoOptions</h2>
+
+<blockquote>
+<p>Encapsulates video capture configuration options.</p>
+</blockquote>
+
+<h3>Properties</h3>
+
+<ul>
+<li><p><strong>limit</strong>: 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).</p></li>
+<li><p><strong>duration</strong>: The maximum duration of a video clip, in seconds.</p></li>
+</ul>
+
+<h3>Example</h3>
+<div class="highlight"><pre><code class="language-text" data-lang="text">// limit capture operation to 3 video clips
+var options = { limit: 3 };
+
+navigator.device.capture.captureVideo(captureSuccess, captureError, options);
+</code></pre></div>
+<h3>BlackBerry 10 Quirks</h3>
+
+<ul>
+<li>The <strong>duration</strong> property is ignored, so the length of recordings can't be limited programmatically.</li>
+</ul>
+
+<h3>iOS Quirks</h3>
+
+<ul>
+<li>The <strong>limit</strong> property is ignored. Only one video is recorded per invocation.</li>
+</ul>
+
+<h3>Android Quirks</h3>
+
+<ul>
+<li>Android supports an additional <strong>quality</strong> property, to allow capturing video at different qualities. A value of <code class="prettyprint">1</code> ( the default ) means high quality and value of <code class="prettyprint">0</code> means low quality, suitable for MMS messages.
+See http://developer.android.com/reference/android/provider/MediaStore.html#EXTRA<em>VIDEO</em>QUALITY for more details.</li>
+</ul>
+
+<h3>Example ( Android w/ quality )</h3>
+<div class="highlight"><pre><code class="language-text" data-lang="text">// limit capture operation to 1 video clip of low quality
+var options = { limit: 1, quality: 0 };
+navigator.device.capture.captureVideo(captureSuccess, captureError, options);
+</code></pre></div>
+<h2>CaptureCB</h2>
+
+<blockquote>
+<p>Invoked upon a successful media capture operation.</p>
+</blockquote>
+<div class="highlight"><pre><code class="language-text" data-lang="text">function captureSuccess( MediaFile[] mediaFiles ) { ... };
+</code></pre></div>
+<h3>Description</h3>
+
+<p>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.</p>
+
+<p>Each <code class="prettyprint">MediaFile</code> object describes a captured media file.</p>
+
+<h3>Example</h3>
+<div class="highlight"><pre><code class="language-text" data-lang="text">// 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
+ }
+};
+</code></pre></div>
+<h2>CaptureError</h2>
+
+<blockquote>
+<p>Encapsulates the error code resulting from a failed media capture operation.</p>
+</blockquote>
+
+<h3>Properties</h3>
+
+<ul>
+<li><strong>code</strong>: One of the pre-defined error codes listed below.</li>
+</ul>
+
+<h3>Constants</h3>
+
+<ul>
+<li><p><code class="prettyprint">CaptureError.CAPTURE_INTERNAL_ERR</code>: The camera or microphone failed to capture image or sound.</p></li>
+<li><p><code class="prettyprint">CaptureError.CAPTURE_APPLICATION_BUSY</code>: The camera or audio capture application is currently serving another capture request.</p></li>
+<li><p><code class="prettyprint">CaptureError.CAPTURE_INVALID_ARGUMENT</code>: Invalid use of the API (e.g., the value of <code class="prettyprint">limit</code> is less than one).</p></li>
+<li><p><code class="prettyprint">CaptureError.CAPTURE_NO_MEDIA_FILES</code>: The user exits the camera or audio capture application before capturing anything.</p></li>
+<li><p><code class="prettyprint">CaptureError.CAPTURE_NOT_SUPPORTED</code>: The requested capture operation is not supported.</p></li>
+</ul>
+
+<h2>CaptureErrorCB</h2>
+
+<blockquote>
+<p>Invoked if an error occurs during a media capture operation.</p>
+</blockquote>
+<div class="highlight"><pre><code class="language-text" data-lang="text">function captureError( CaptureError error ) { ... };
+</code></pre></div>
+<h3>Description</h3>
+
+<p>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.</p>
+
+<p>This function executes with a <code class="prettyprint">CaptureError</code> object containing an
+appropriate error <code class="prettyprint">code</code>.</p>
+
+<h3>Example</h3>
+<div class="highlight"><pre><code class="language-text" data-lang="text">// capture error callback
+var captureError = function(error) {
+ navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
+};
+</code></pre></div>
+<h2>ConfigurationData</h2>
+
+<blockquote>
+<p>Encapsulates a set of media capture parameters that a device supports.</p>
+</blockquote>
+
+<h3>Description</h3>
+
+<p>Describes media capture modes supported by the device. The
+configuration data includes the MIME type, and capture dimensions for
+video or image capture.</p>
+
+<p>The MIME types should adhere to <a href="http://www.ietf.org/rfc/rfc2046.txt">RFC2046</a>. Examples:</p>
+
+<ul>
+<li><code class="prettyprint">video/3gpp</code></li>
+<li><code class="prettyprint">video/quicktime</code></li>
+<li><code class="prettyprint">image/jpeg</code></li>
+<li><code class="prettyprint">audio/amr</code></li>
+<li><code class="prettyprint">audio/wav</code></li>
+</ul>
+
+<h3>Properties</h3>
+
+<ul>
+<li><p><strong>type</strong>: The ASCII-encoded lowercase string representing the media type. (DOMString)</p></li>
+<li><p><strong>height</strong>: The height of the image or video in pixels. The value is zero for sound clips. (Number)</p></li>
+<li><p><strong>width</strong>: The width of the image or video in pixels. The value is zero for sound clips. (Number)</p></li>
+</ul>
+
+<h3>Example</h3>
+<div class="highlight"><pre><code class="language-text" data-lang="text">// 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;
+ }
+}
+</code></pre></div>
+<p>Not supported by any platform. All configuration data arrays are empty.</p>
+
+<h2>MediaFile.getFormatData</h2>
+
+<blockquote>
+<p>Retrieves format information about the media capture file.</p>
+</blockquote>
+<div class="highlight"><pre><code class="language-text" data-lang="text">mediaFile.getFormatData(
+ MediaFileDataSuccessCB successCallback,
+ [MediaFileDataErrorCB errorCallback]
+);
+</code></pre></div>
+<h3>Description</h3>
+
+<p>This function asynchronously attempts to retrieve the format
+information for the media file. If successful, it invokes the
+<code class="prettyprint">MediaFileDataSuccessCB</code> callback with a <code class="prettyprint">MediaFileData</code> object. If
+the attempt fails, this function invokes the <code class="prettyprint">MediaFileDataErrorCB</code>
+callback.</p>
+
+<h3>Supported Platforms</h3>
+
+<ul>
+<li>Amazon Fire OS</li>
+<li>Android</li>
+<li>BlackBerry 10</li>
+<li>iOS</li>
+<li>Windows Phone 7 and 8</li>
+<li>Windows 8</li>
+<li>Windows</li>
+</ul>
+
+<h3>Amazon Fire OS Quirks</h3>
+
+<p>The API to access media file format information is limited, so not all
+<code class="prettyprint">MediaFileData</code> properties are supported.</p>
+
+<h3>BlackBerry 10 Quirks</h3>
+
+<p>Does not provide an API for information about media files, so all
+<code class="prettyprint">MediaFileData</code> objects return with default values.</p>
+
+<h3>Android Quirks</h3>
+
+<p>The API to access media file format information is limited, so not all
+<code class="prettyprint">MediaFileData</code> properties are supported.</p>
+
+<h3>iOS Quirks</h3>
+
+<p>The API to access media file format information is limited, so not all
+<code class="prettyprint">MediaFileData</code> properties are supported.</p>
+
+<h2>MediaFile</h2>
+
+<blockquote>
+<p>Encapsulates properties of a media capture file.</p>
+</blockquote>
+
+<h3>Properties</h3>
+
+<ul>
+<li><p><strong>name</strong>: The name of the file, without path information. (DOMString)</p></li>
+<li><p><strong>fullPath</strong>: The full path of the file, including the name. (DOMString)</p></li>
+<li><p><strong>type</strong>: The file's mime type (DOMString)</p></li>
+<li><p><strong>lastModifiedDate</strong>: The date and time when the file was last modified. (Date)</p></li>
+<li><p><strong>size</strong>: The size of the file, in bytes. (Number)</p></li>
+</ul>
+
+<h3>Methods</h3>
+
+<ul>
+<li><strong>MediaFile.getFormatData</strong>: Retrieves the format information of the media file.</li>
+</ul>
+
+<h2>MediaFileData</h2>
+
+<blockquote>
+<p>Encapsulates format information about a media file.</p>
+</blockquote>
+
+<h3>Properties</h3>
+
+<ul>
+<li><p><strong>codecs</strong>: The actual format of the audio and video content. (DOMString)</p></li>
+<li><p><strong>bitrate</strong>: The average bitrate of the content. The value is zero for images. (Number)</p></li>
+<li><p><strong>height</strong>: The height of the image or video in pixels. The value is zero for audio clips. (Number)</p></li>
+<li><p><strong>width</strong>: The width of the image or video in pixels. The value is zero for audio clips. (Number)</p></li>
+<li><p><strong>duration</strong>: The length of the video or sound clip in seconds. The value is zero for images. (Number)</p></li>
+</ul>
+
+<h3>BlackBerry 10 Quirks</h3>
+
+<p>No API provides format information for media files, so the
+<code class="prettyprint">MediaFileData</code> object returned by <code class="prettyprint">MediaFile.getFormatData</code> features
+the following default values:</p>
+
+<ul>
+<li><p><strong>codecs</strong>: Not supported, and returns <code class="prettyprint">null</code>.</p></li>
+<li><p><strong>bitrate</strong>: Not supported, and returns zero.</p></li>
+<li><p><strong>height</strong>: Not supported, and returns zero.</p></li>
+<li><p><strong>width</strong>: Not supported, and returns zero.</p></li>
+<li><p><strong>duration</strong>: Not supported, and returns zero.</p></li>
+</ul>
+
+<h3>Amazon Fire OS Quirks</h3>
+
+<p>Supports the following <code class="prettyprint">MediaFileData</code> properties:</p>
+
+<ul>
+<li><p><strong>codecs</strong>: Not supported, and returns <code class="prettyprint">null</code>.</p></li>
+<li><p><strong>bitrate</strong>: Not supported, and returns zero.</p></li>
+<li><p><strong>height</strong>: Supported: image and video files only.</p></li>
+<li><p><strong>width</strong>: Supported: image and video files only.</p></li>
+<li><p><strong>duration</strong>: Supported: audio and video files only</p></li>
+</ul>
+
+<h3>Android Quirks</h3>
+
+<p>Supports the following <code class="prettyprint">MediaFileData</code> properties:</p>
+
+<ul>
+<li><p><strong>codecs</strong>: Not supported, and returns <code class="prettyprint">null</code>.</p></li>
+<li><p><strong>bitrate</strong>: Not supported, and returns zero.</p></li>
+<li><p><strong>height</strong>: Supported: image and video files only.</p></li>
+<li><p><strong>width</strong>: Supported: image and video files only.</p></li>
+<li><p><strong>duration</strong>: Supported: audio and video files only.</p></li>
+</ul>
+
+<h3>iOS Quirks</h3>
+
+<p>Supports the following <code class="prettyprint">MediaFileData</code> properties:</p>
+
+<ul>
+<li><p><strong>codecs</strong>: Not supported, and returns <code class="prettyprint">null</code>.</p></li>
+<li><p><strong>bitrate</strong>: Supported on iOS4 devices for audio only. Returns zero for images and videos.</p></li>
+<li><p><strong>height</strong>: Supported: image and video files only.</p></li>
+<li><p><strong>width</strong>: Supported: image and video files only.</p></li>
+<li><p><strong>duration</strong>: Supported: audio and video files only.</p></li>
+</ul>
+
+
+ </div>
+ </div>
+</div>
+
+<script defer type="text/javascript" src="/static/js/lib/toc.min.js"></script>
+<script defer type="text/javascript" src="/static/js/docs.js"></script>
+
+ <div class="blue-divider"></div>
+<footer>
+ <div class="container" id="footer">
+ <div class="row">
+ <div class="col-sm-9">
+ <h1>More Resources</h1>
+ <div class="row">
+ <div class="col-sm-4">
+ <h2>General</h2>
+ <ul class="nav">
+ <li>
+ <a target="_blank" href="https://projects.apache.org/project.html?cordova">Apache Project Page</a>
+ </li>
+ <li>
+ <a href="https://dist.apache.org/repos/dist/release/cordova/">Source Distribution</a>
+ </li>
+ <li>
+ <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">License</a>
+ </li>
+ <li>
+ <a href="/artwork">Artwork</a>
+ </li>
+ </ul>
+ </div>
+ <div class="col-sm-4">
+ <h2>Development</h2>
+ <ul class="nav">
+ <li><a target="_blank" href="https://github.com/apache?utf8=%E2%9C%93&query=cordova-">Source Code</a></li>
+ <li><a target="_blank" href="https://issues.apache.org/jira/browse/CB/">Issue Tracker</a></li>
+ <li><a target="_blank" href="http://stackoverflow.com/questions/tagged/cordova">Stack Overflow</a></li>
+ <li><a href="/contact">Mailing List</a></li>
+ </ul>
+ </div>
+ <div class="col-sm-4">
+ <h2>Apache Software Foundation</h2>
+ <ul class="nav">
+ <li>
+ <a target="_blank" href="http://www.apache.org/">About ASF</a>
+ </li>
+ <li>
+ <a target="_blank" href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a>
+ </li>
+ <li>
+ <a target="_blank" href="http://www.apache.org/foundation/thanks.html">Thanks</a>
+ </li>
+ <li>
+ <a target="_blank" href="http://www.apache.org/security/">Security</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ <div class="col-sm-3">
+ <h1>Contribute</h1>
+ <p style="padding-top:20px"><strong>Help Cordova move forward!</strong></p>
+ <p>Report bugs, improve the docs, or contribute to the code.</p>
+ <a href="/contribute" class="btn btn-lg btn-primary">
+ Learn More
+ </a>
+ <p style="padding-top:20px"> <a href="https://twitter.com/apachecordova" class="twitter-follow-button" data-show-count="false">Follow @apachecordova</a></p>
+ <script async defer src="https://slack.cordova.io/slackin.js"></script>
+ </div>
+ </div>
+ <p class="copyright_text">
+ Copyright © 2012, 2013, 2015 The Apache Software Foundation, Licensed under the <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>
+ Apache and the Apache feather logos are <a target="_blank" href="http://www.apache.org/foundation/marks/list/">trademarks</a> of The Apache Software Foundation.
+ </p>
+ <a class="closing" href="#top"></a>
+ </div>
+</footer>
+
+<script defer type="text/javascript" src="/static/js/lib/prettify/prettify.js"></script>
+<script defer type="text/javascript" src="/static/js/index.js"></script>
+<script defer type="text/javascript" src="/static/js/twitter.js"></script>
+
+ <script>
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+ ga('create', 'UA-64283057-3', 'auto');
+ ga('send', 'pageview');
+</script>
+
+</body>
+</html>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org