Skip to content

Commit

Permalink
feat(camera-preview): add disable method
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Nov 23, 2016
1 parent 3dd863c commit 6ad54ec
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/plugins/camera-preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ export class CameraPreview {
@Cordova({
sync: true
})
static startCamera(rect: CameraPreviewRect, defaultCamera: string, tapEnabled: boolean, dragEnabled: boolean, toBack: boolean, alpha: number): void { };
static startCamera(rect: CameraPreviewRect, defaultCamera: string, tapEnabled: boolean, dragEnabled: boolean, toBack: boolean, alpha: number): void { }

/**
* Stops the camera preview instance.
*/
@Cordova({
sync: true
})
static stopCamera(): void { };
static stopCamera(): void { }

/**
* Take the picture, the parameter size is optional
Expand All @@ -106,45 +106,53 @@ export class CameraPreview {
@Cordova({
sync: true
})
static takePicture(size: CameraPreviewSize): void { };
static takePicture(size: CameraPreviewSize): void { }

/**
* Register a callback function that receives the original picture and the image captured from the preview box.
*/
@Cordova({
observable: true
})
static setOnPictureTakenHandler(): Observable<any> { return; };
static setOnPictureTakenHandler(): Observable<any> { return; }

/**
* Switch from the rear camera and front camera, if available.
*/
@Cordova({
sync: true
})
static switchCamera(): void { };
static switchCamera(): void { }

/**
* Show the camera preview box.
*/
@Cordova({
sync: true
})
static show(): void { };
static show(): void { }

/**
* Hide the camera preview box.
*/
@Cordova({
sync: true
})
static hide(): void { };
static hide(): void { }

/**
* Disables the camera preview
*/
@Cordova({
sync: true
})
static disable(): void { }

/**
* Set camera color effect.
*/
@Cordova({
sync: true
})
static setColorEffect(effect: string): void { };
static setColorEffect(effect: string): void { }
}

0 comments on commit 6ad54ec

Please sign in to comment.