mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 16:52:53 +08:00
parent
3865ea4777
commit
ce02d8219c
@ -1,5 +1,6 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import {Plugin, Cordova} from './plugin';
|
||||||
|
|
||||||
|
|
||||||
export interface CameraOptions {
|
export interface CameraOptions {
|
||||||
/** Picture quality in range 0-100. Default is 50 */
|
/** Picture quality in range 0-100. Default is 50 */
|
||||||
quality?: number;
|
quality?: number;
|
||||||
@ -129,6 +130,74 @@ export class Camera {
|
|||||||
platforms: ['iOS']
|
platforms: ['iOS']
|
||||||
})
|
})
|
||||||
static cleanup(){};
|
static cleanup(){};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @enum {number}
|
||||||
|
*/
|
||||||
|
static DestinationType = {
|
||||||
|
/** Return base64 encoded string. DATA_URL can be very memory intensive and cause app crashes or out of memory errors. Use FILE_URI or NATIVE_URI if possible */
|
||||||
|
DATA_URL: 0,
|
||||||
|
/** Return file uri (content://media/external/images/media/2 for Android) */
|
||||||
|
FILE_URI: 1,
|
||||||
|
/** Return native uri (eg. asset-library://... for iOS) */
|
||||||
|
NATIVE_URI: 2
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @enum {number}
|
||||||
|
*/
|
||||||
|
static EncodingType = {
|
||||||
|
/** Return JPEG encoded image */
|
||||||
|
JPEG: 0,
|
||||||
|
/** Return PNG encoded image */
|
||||||
|
PNG: 1
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* @enum {number}
|
||||||
|
*/
|
||||||
|
static MediaType = {
|
||||||
|
/** Allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType */
|
||||||
|
PICTURE: 0,
|
||||||
|
/** Allow selection of video only, ONLY RETURNS URL */
|
||||||
|
VIDEO: 1,
|
||||||
|
/** Allow selection from all media types */
|
||||||
|
ALLMEDIA : 2
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @enum {number}
|
||||||
|
*/
|
||||||
|
static PictureSourceType = {
|
||||||
|
/** Choose image from picture library (same as SAVEDPHOTOALBUM for Android) */
|
||||||
|
PHOTOLIBRARY : 0,
|
||||||
|
/** Take picture from camera */
|
||||||
|
CAMERA : 1,
|
||||||
|
/** Choose image from picture library (same as PHOTOLIBRARY for Android) */
|
||||||
|
SAVEDPHOTOALBUM : 2
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Matches iOS UIPopoverArrowDirection constants to specify arrow location on popover.
|
||||||
|
* @enum {number}
|
||||||
|
*/
|
||||||
|
static PopoverArrowDirection = {
|
||||||
|
ARROW_UP : 1,
|
||||||
|
ARROW_DOWN : 2,
|
||||||
|
ARROW_LEFT : 4,
|
||||||
|
ARROW_RIGHT : 8,
|
||||||
|
ARROW_ANY : 15
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @enum {number}
|
||||||
|
*/
|
||||||
|
static Direction = {
|
||||||
|
/** Use the back-facing camera */
|
||||||
|
BACK: 0,
|
||||||
|
/** Use the front-facing camera */
|
||||||
|
FRONT: 1
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user