kwikid-camera
Version:
KwikID's Camera Component
78 lines (77 loc) • 3.16 kB
TypeScript
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core";
import { DomSanitizer } from "@angular/platform-browser";
import { TuiAlertService } from "@taiga-ui/core";
import { KwikUILoaderService } from "kwikui";
import { TRecordingState } from "./kwikid-camera-record.definitions";
import { KwikIDCameraRecordService } from "./kwikid-camera-record.service";
import * as i0 from "@angular/core";
export declare class KwikIDCameraRecordComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit {
private recordService;
private ref;
private sanitizer;
kwikuiLoaderService: KwikUILoaderService;
protected readonly alert: TuiAlertService;
readonly BUTTON_PROPS: any;
videoElement: ElementRef<HTMLVideoElement>;
previewElement: ElementRef<HTMLDivElement>;
inputFile: ElementRef<any>;
config: any;
video: any;
setVideo(video: any): void;
resetVideo(): void;
/**
* Video is emitted at following scenarios -
* 1. When stop button is clicked and blob is retrieved from RecordRTC subscription.
* 2. When save button is clicked from Preview Dialog.
*/
getVideo: EventEmitter<any>;
onClickBack: EventEmitter<any>;
onClickClose: EventEmitter<any>;
onClickSave: EventEmitter<any>;
originalVideoBlob: any;
getOriginalVideoBlob(): string;
setOriginalVideoBlob(video: any): void;
resetOriginalVideoBlob(): void;
mediaStreamSubscription: any;
blobSubscription: any;
timerSubscription: any;
recordingTime: number;
recordingState: TRecordingState;
recordingStateSuscription: any;
videoPreviewVisible: boolean;
showVideoPreview(): void;
hideVideoPreview(): void;
files: any[];
private mediaStream;
devicesList: any[];
activeDeviceId: string;
changeDetectionRefInterval: any;
constructor(recordService: KwikIDCameraRecordService, ref: ChangeDetectorRef, sanitizer: DomSanitizer, kwikuiLoaderService: KwikUILoaderService, alert: TuiAlertService);
ngOnInit(): Promise<void>;
ngOnChanges(changes: SimpleChanges): void;
ngAfterViewInit(): Promise<void>;
ngOnDestroy(): void;
startCamera(): Promise<void>;
stopCamera(): void;
startRecording(): void;
pauseRecording(): void;
resumeRecording(): void;
stopRecording(): void;
downloadRecording(): void;
clearRecording(): void;
back(): void;
close(): void;
retry(): void;
save(): void;
handleOnSelectInputFile(): void;
upload(): void;
flip(): void;
correctMirror(): void;
isSwitching: boolean;
switchCamera(): Promise<void>;
loading: boolean;
presentLoading(msg?: string): void;
dismissLoading(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<KwikIDCameraRecordComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<KwikIDCameraRecordComponent, "kwikid-camera-record", never, { "config": "config"; "video": "video"; }, { "getVideo": "getVideo"; "onClickBack": "onClickBack"; "onClickClose": "onClickClose"; "onClickSave": "onClickSave"; }, never, ["[slot='record-header']"]>;
}