-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathYoonit.Camera.common.d.ts
30 lines (30 loc) · 1.83 KB
/
Yoonit.Camera.common.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { ContentView, EventData } from '@nativescript/core';
import { Camera as CameraDefinition, StatusEventData, FaceImageCreatedEventData, FaceDetectedEventData, BarcodeScannedEventData, FrameImageCreatedEventData } from '.';
export declare abstract class CameraBase extends ContentView implements CameraDefinition {
preview(): void;
stopCapture(): void;
toggleLens(): void;
getLens(): number;
startCapture(captureType: string): void;
setFaceNumberOfImages(faceNumberOfImages: number): void;
setFaceDetectionBox(faceDetectionBox: Boolean): void;
setFaceTimeBetweenImages(faceTimeBetweenImages: number): void;
setFacePaddingPercent(facePaddingPercent: number): void;
setFaceImageSize(width: number, height: number): void;
setFaceCaptureMinSize(faceCaptureMinSize: number): void;
setFaceCaptureMaxSize(faceCaptureMaxSize: number): void;
setFrameNumberOfImages(frameNumberOfImages: number): void;
setFrameTimeBetweenImages(frameTimeBetweenImages: number): void;
requestPermission(explanationText?: string): Promise<boolean>;
hasPermission(): boolean;
}
export interface CameraBase {
on(eventNames: string, callback: (data: EventData) => void, thisArg?: any): any;
on(event: "faceImage", callback: (args: FaceImageCreatedEventData) => void, thisArg?: any): any;
on(event: "frameImage", callback: (args: FrameImageCreatedEventData) => void, thisArg?: any): any;
on(event: "faceDetected", callback: (args: FaceDetectedEventData) => void, thisArg?: any): any;
on(event: "endCapture", callback: () => void, thisArg?: any): any;
on(event: "qrCodeContent", callback: (args: BarcodeScannedEventData) => void, thisArg?: any): any;
on(event: "status", callback: (args: StatusEventData) => void, thisArg?: any): any;
on(event: "permissionDenied", callback: () => void, thisArg?: any): any;
}