diff --git a/src/plugins/camera-preview.ts b/src/plugins/camera-preview.ts index 57f16f9ae..0c45db674 100644 --- a/src/plugins/camera-preview.ts +++ b/src/plugins/camera-preview.ts @@ -2,25 +2,11 @@ import { Cordova, Plugin } from './plugin'; import { Observable } from 'rxjs/Observable'; -export interface CameraPreviewOptions { +export interface CameraPreviewRect { x: number; y: number; width: number; height: number; - /** - * Choose the camera to use (front- or back-facing). - * 'front' for front camera - * 'rear' for rear camera - */ - camera: string; - /** Take photo on tap */ - tapPhoto: boolean; - /** */ - previewDrag: boolean; - /** */ - toBack: boolean; - /** Alpha use when toBack is set to true */ - alpha: number; } export interface CameraPreviewSize { @@ -46,12 +32,19 @@ export class CameraPreview { /** * Starts the camera preview instance. - * @param {CameraPreviewOptions} options for the preview + * @param {CameraPreviewRect} position and size of the preview window - {x: number, y: number, width: number, height: number} + * @param {string} which camera to use - 'front' | 'back' + * @param {boolean} enable tap to take picture + * @param {boolean} enable preview box drag across the screen + * @param {boolean} send preview box to the back of the webview + * @param {number} alpha of the preview box */ @Cordova({ sync: true }) - static startCamera(options: CameraPreviewOptions): void { }; + static startCamera(rect: CameraPreviewRect, defaultCamera: string, tapEnabled: boolean, dragEnabled: boolean, toBack: boolean, alpha: number): void { + + }; /** * Stops the camera preview instance. @@ -63,6 +56,7 @@ export class CameraPreview { /** * Take the picture, the parameter size is optional + * @param {CameraPreviewSize} optional - size of the picture to take */ @Cordova({ sync: true