Provides access to the audio, image, and video capture capabilities of the device.
The capture object is assigned to the navigator.device object, and therefore has global scope.
// The global capture object var capture = navigator.device.capture;
- supportedAudioModes: The audio recording formats supported by the device. (ConfigurationData)
- supportedImageModes: The recording image sizes and formats supported by the device. (ConfigurationData)
- supportedVideoModes: The recording video resolutions and formats supported by the device. (ConfigurationData)
- capture.captureAudio: Launch the device audio recording application for recording audio clip(s).
- capture.captureImage: Launch the device camera application for taking image(s).
- capture.captureVideo: Launch the device video recorder application for recording video(s).
- BlackBerry WebWorks (OS 5.0 and higher)
- Windows Phone 7 and 8
- Windows 8
<plugin name="Capture" value="org.apache.cordova.Capture"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<Privilege> <Name>RECORDING</Name> </Privilege>
<plugin name="Capture" value="org.apache.cordova.capture.MediaCapture" />
<feature id="blackberry.system" required="true" version="220.127.116.11" /> <feature id="blackberry.io.file" required="true" version="18.104.22.168" />
<plugin name="Capture" value="CDVCapture" />
No permissions are required.
<Capabilities> <Capability Name="ID_CAP_MEDIALIB" /> <Capability Name="ID_CAP_MICROPHONE" /> <Capability Name="ID_HW_FRONTCAMERA" /> <Capability Name="ID_CAP_ISV_CAMERA" /> <Capability Name="ID_CAP_CAMERA" /> </Capabilities>