import { Constraints } from '../core/Camera'; import { Configuration } from '../core/Config'; /** * Capture View Class is the important class in the package. It is the class used to capture the card data shown on the frame and process it internally. User is allowed to create the object for the class only when the valid `Scanflow License Key` is present, checked and verified. Before an object creation user ensures the configure function is added predefined and license key is verified. It can be oprerated in two modes like auto and manual modes. User can switch over to these modes at any point of time As discussed this class captures the cards displayed on the frame and with the external data processing engine it provides the accurate scanning results, which the user can seamelessly integrate to any JS based libraries. */ export declare class CaptureView { private gui; private user; private config; private constraints; private rootElement; private static cameraObj; static loader_class: string; static heading_class: string; static error_class: string; static loading_class: string; /** * This capture view class is used to capture the image data once the camera is initialized Required Parameters * @param rootElement - Root Element where the camera needs to be initialized for the data capture * @param configuration - Configuration includes capture mode and card Type. By default auto mode is enabled and card type aadhar card is enabled * @param constraintsData - Constraints for the camera like deviceData. By default runs on inbuilt camera devices. * Note: This constructor method auto initializes once the above params are provided. * This class needs to be initialized first inorder to configure external license library and for optimal performance. */ constructor(rootElement: HTMLElement, configuration?: Configuration, constraintsData?: Constraints); /** * This method starts the camera capture view for the user and it is initalized once object for the Capture View * class is created not required to initiate externally. * @param rootElement - Required Params indicates the position at the page to place capture view */ createCaptureView(rootElement: HTMLElement): Promise; /** * This method start captures the Image displayed on the camera and sends to the scanflow server * which runs on the separate environment for processing of the data. */ startCaptureImage(): void; /** * This method returns the media devices that are currently connected to the devices, the list of * devices with video input supported is returned * @returns Media Devices */ getMediaDevices: () => Promise; /** * This method pauses the camera view */ pauseCaptureView: () => void; /** * Resumes camera capture view */ resumeCaptureView: () => void; /** * @hidden * @param dimensions - The dimensions data if need to change */ captureImage: (dimensions?: any) => Promise; /** * @hidden * This method is used to capture Image on camera * @param dimensions - The dimensions data if need to change */ captureIdCardAndDisplay: (dataURI: string, dimensions?: any) => Promise; /** * Displays the captured data. * @hidden * @param dimensions - The dimensions data if need to change * @returns - The data captured. */ displayData: (dimensions?: any) => Promise<{ image: string; name: string; sex: string; uniqueId: string; dob: string; address: string; fatherName?: string; yob?: string; pincode?: string; country?: string; state?: string; district?: string; city?: string; relation?: string; place?: string; doorNo?: string; relationName?: string; age?: string; }>; /** * @hidden * To setup the camera element and started streaming * @param rootElement - The HTML ELement to render camera view * @param stream - The stream object once the Camera is started up * @param dimensions - The dimensions of the capture element to be specified by the user */ setUpCameraStream: (rootElement: HTMLElement, stream: any, dimensions?: any) => void; /** * @hidden * Switch card or modes type * @param rootElement - Root Element where the video renders */ switchCaptureType: (rootElement: HTMLElement) => void; }