Apache Cordova · Schema

CameraOptions

Options for configuring the Apache Cordova Camera plugin getPicture call

ApacheCross-PlatformHybrid AppsJavaScriptMobileOpen SourcePlugins

Properties

Name Type Description
quality integer Quality of the saved image, expressed as a range of 0-100, where 100 is typically full resolution with no file compression loss.
destinationType integer Choose the format of the return value. 0 = DATA_URL (base64 encoded string), 1 = FILE_URI (image file URI).
sourceType integer Set the source of the picture. 0 = PHOTOLIBRARY, 1 = CAMERA, 2 = SAVEDPHOTOALBUM.
allowEdit boolean Allow simple editing of image before selection.
encodingType integer Choose the returned image file encoding. 0 = JPEG, 1 = PNG.
targetWidth integer Width in pixels to scale image. Must be used with targetHeight. Aspect ratio remains constant.
targetHeight integer Height in pixels to scale image. Must be used with targetWidth. Aspect ratio remains constant.
mediaType integer Set the type of media to select from. 0 = PICTURE, 1 = VIDEO, 2 = ALLMEDIA. Only works when sourceType is PHOTOLIBRARY or SAVEDPHOTOALBUM.
correctOrientation boolean Rotate the image to correct for the orientation of the device during capture.
saveToPhotoAlbum boolean Save the image to the photo album on the device after capture.
cameraDirection integer Choose the camera to use. 0 = BACK, 1 = FRONT.
View JSON Schema on GitHub