- Accelerometer
- Camera
- Capture
- Compass
- Connection
- Contacts
- Device
- Events
- File
- Geolocation
- Globalization
- InAppBrowser
- Media
- Notification
- Splashscreen
- Storage
- Overview
- Platform Guides
- The Cordova Command-line Interface
- Command-Line Usage
- Privacy Guide
- Upgrading Guides
- Project Settings
- Plugin Development Guide
- Domain Whitelist Guide
- Embedding WebView
This version of the documentation is outdated!
Click here for the latest released version.
ConfigurationData
Encapsulates a set of media capture parameters that a device supports.
Description
Describes media capture modes supported by the device. The configuration data includes the MIME type, and capture dimensions for video or image capture.
The MIME types should adhere to RFC2046. Examples:
video/3gpp
video/quicktime
image/jpeg
audio/amr
audio/wav
Properties
- type: The ASCII-encoded lowercase string representing the media type. (DOMString)
- height: The height of the image or video in pixels. The value is zero for sound clips. (Number)
- width: The width of the image or video in pixels. The value is zero for sound clips. (Number)
Quick Example
// retrieve supported image modes
var imageModes = navigator.device.capture.supportedImageModes;
// Select mode that has the highest horizontal resolution
var width = 0;
var selectedmode;
for each (var mode in imageModes) {
if (mode.width > width) {
width = mode.width;
selectedmode = mode;
}
}
Not supported by any platform. All configuration data arrays are empty.