From 7ae1df2489b8ff524c1ba1bfa7624dcb50247905 Mon Sep 17 00:00:00 2001 From: Praveen Challa Date: Tue, 23 Jun 2020 22:31:14 +0530 Subject: [PATCH] feat(camera-preview): add record video functions (#3463) * Update index.ts Added video instance * Fixed lints Fixed lints --- .../plugins/camera-preview/index.ts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/@ionic-native/plugins/camera-preview/index.ts b/src/@ionic-native/plugins/camera-preview/index.ts index 76624b886..a1b7eb02b 100644 --- a/src/@ionic-native/plugins/camera-preview/index.ts +++ b/src/@ionic-native/plugins/camera-preview/index.ts @@ -202,6 +202,20 @@ export class CameraPreview extends IonicNativePlugin { startCamera(options: CameraPreviewOptions): Promise { return; } + + /** + * Starts the camera video instance. + * @param {any} options + * @return {Promise} + */ + @Cordova({ + successIndex: 1, + errorIndex: 2, + }) + startRecordVideo(options: any): Promise { + return; + } + /** * Stops the camera preview instance. (iOS & Android) @@ -211,6 +225,15 @@ export class CameraPreview extends IonicNativePlugin { stopCamera(): Promise { return; } + + /** + * Stops the camera video instance. (iOS & Android) + * @return {Promise} + */ + @Cordova() + stopRecordVideo(): Promise { + return; + } /** * Switch from the rear camera and front camera, if available.