mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
New methods and constants available
This commit is contained in:
parent
4bd6aaba2b
commit
0a7f56d960
@ -134,6 +134,38 @@ export interface CameraPreviewPictureOptions {
|
||||
@Injectable()
|
||||
export class CameraPreview {
|
||||
|
||||
EXPOSURE_MODES = {
|
||||
LOCK: 'lock', // IOS Only
|
||||
AUTO: 'auto', // IOS Only
|
||||
CONTINUOUS: 'continuous',
|
||||
CUSTOM: 'custom'
|
||||
};
|
||||
|
||||
FLASH_MODE = {
|
||||
OFF: 'off',
|
||||
ON: 'on',
|
||||
AUTO: 'auto',
|
||||
RED_EYE: 'red-eye',
|
||||
TORCH: 'torch' // Android Only
|
||||
};
|
||||
|
||||
COLOR_EFFECT = {
|
||||
AQUA: 'aqua', // Android Only
|
||||
BLACKBOARD: 'blackboard', // Android Only
|
||||
MONO: 'mono',
|
||||
NEGATIVE: 'negative',
|
||||
NONE: 'none',
|
||||
POSTERIZE: 'posterize',
|
||||
SEPIA: 'sepia',
|
||||
SOLARIZE: 'solarize', // Android Only
|
||||
WHITEBOARD: 'whiteboard' // Android Only
|
||||
};
|
||||
|
||||
CAMERA_DIRECTION = {
|
||||
BACK: 'back',
|
||||
FRONT: 'front'
|
||||
};
|
||||
|
||||
/**
|
||||
* Starts the camera preview instance.
|
||||
* @param {CameraPreviewOptions} options
|
||||
@ -149,40 +181,28 @@ export class CameraPreview {
|
||||
* Stops the camera preview instance. (iOS & Android)
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1
|
||||
})
|
||||
@Cordova()
|
||||
stopCamera(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Switch from the rear camera and front camera, if available.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1
|
||||
})
|
||||
@Cordova()
|
||||
switchCamera(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Hide the camera preview box.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1
|
||||
})
|
||||
@Cordova()
|
||||
hide(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Show the camera preview box.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1
|
||||
})
|
||||
@Cordova()
|
||||
show(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
@ -220,6 +240,19 @@ export class CameraPreview {
|
||||
})
|
||||
setZoom(zoom?: number): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get the maximum zoom (Android)
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMaxZoom(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get current zoom (Android)
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getZoom(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Set the preview Size
|
||||
@ -228,8 +261,7 @@ export class CameraPreview {
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
platforms: ['Android']
|
||||
errorIndex: 2
|
||||
})
|
||||
setPreviewSize(dimensions?: CameraPreviewDimensions): Promise<any> { return; }
|
||||
|
||||
@ -244,4 +276,68 @@ export class CameraPreview {
|
||||
})
|
||||
setFlashMode(flashMode?: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get supported picture sizes
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getSupportedPictureSizes(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get supported flash modes
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getSupportedFlashModes(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get exposure mode
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getExposureMode(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get exposure modes
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getExposureModes(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Set exposure mode
|
||||
* @param [lock] {string}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
setExposureMode(lock?: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get exposure compensation (Android)
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getExposureCompensation(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Set exposure compensation (Android)
|
||||
* @param [exposureCompensation] {number}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
setExposureCompensation(exposureCompensation?: number): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get exposure compensation range (Android)
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getExposureCompensationRange(): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user