Modern devices offer to the user a huge range of media capabilities; right now people can register a video, record some audio, take a picture, and use all of these media in their communication flow.
The Capture API works asynchronously as most of the PhoneGap APIs and provides access to the audio, image, and video capture capabilities of the device. In order to start working with this API you have to access the capture
object stored in the navigator.device
object.
var capture = navigator.device.capture;
Once you get access to the capture
object, it's possible to detect which video, audio, and image formats are supported by the device through the following properties:
supportedAudioModes
supportedImageModes
supportedVideoModes
Each property returns an array of ConfigurationData
objects, each item of the array represents a supported media type. There are three properties defined in the ConfigurationData
object you can use to clearly identify the media types supported by the...