@idscan/idvc2 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/idvc.js +1 -1
- package/dist/idvc.js.gzip +0 -0
- package/dist/js/defaultConfig.ts +1 -0
- package/dist/networks/Face-chunk.js +1 -1
- package/dist/types/defaultConfig.d.ts +1 -0
- package/dist/types/modules/Step.d.ts +5 -0
- package/dist/types/modules/ui/VideoWrapper/CanvasWrapper.d.ts +3 -0
- package/dist/types/modules/ui/VideoWrapper/VideoRecorderService.d.ts +9 -0
- package/package.json +1 -1
|
@@ -20,12 +20,15 @@ export interface IStepObj {
|
|
|
20
20
|
time?: number;
|
|
21
21
|
configs?: StepConfig[];
|
|
22
22
|
stepTypeImageName: StepTypeImageName;
|
|
23
|
+
shouldRecordVideo?: boolean;
|
|
23
24
|
}
|
|
24
25
|
export interface IStepCallback {
|
|
25
26
|
/** base64 encoded step image */
|
|
26
27
|
img: Base64Image | null;
|
|
27
28
|
/** blob step image */
|
|
28
29
|
blob: Blob | null;
|
|
30
|
+
/** blob step video */
|
|
31
|
+
videoBlob?: Blob | null;
|
|
29
32
|
/** step type */
|
|
30
33
|
type: StepType;
|
|
31
34
|
/** is it autocaptured from camera */
|
|
@@ -47,6 +50,7 @@ export interface IStepCallback {
|
|
|
47
50
|
}
|
|
48
51
|
export default class Step implements IStepCallback, IStepObj {
|
|
49
52
|
blob: Blob | null;
|
|
53
|
+
videoBlob: Blob | null;
|
|
50
54
|
errorCode: ErrorCodes | null | undefined;
|
|
51
55
|
mrzText?: string;
|
|
52
56
|
mrzImg?: Base64Image | null;
|
|
@@ -63,6 +67,7 @@ export default class Step implements IStepCallback, IStepObj {
|
|
|
63
67
|
img: Base64Image | null;
|
|
64
68
|
cameraInfo: Record<string, any>;
|
|
65
69
|
stepTypeImageName: StepTypeImageName;
|
|
70
|
+
shouldRecordVideo: boolean;
|
|
66
71
|
constructor(nameOrObj: string | IStepObj, type?: StepType, camera?: VideoFacingModeEnum, time?: number, img?: Base64Image | null);
|
|
67
72
|
get isShowManualSwitchButton(): boolean;
|
|
68
73
|
get capturingMode(): StepMode;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BrowserInfo } from 'detect-browser';
|
|
2
2
|
import type { Size } from '../../../helpers/image';
|
|
3
3
|
import type { StepType } from '../../../environment/stepsDescription';
|
|
4
|
+
import Step from '../../Step';
|
|
4
5
|
export declare class CanvasWrapper {
|
|
5
6
|
private componentWrapper;
|
|
6
7
|
videoCanvas: HTMLCanvasElement;
|
|
@@ -22,10 +23,12 @@ export declare class CanvasWrapper {
|
|
|
22
23
|
private readonly faceOffset;
|
|
23
24
|
private readonly canvasNames;
|
|
24
25
|
private readonly canvasCtxNames;
|
|
26
|
+
private videoRecorder;
|
|
25
27
|
constructor(componentWrapper: HTMLElement, video: HTMLVideoElement);
|
|
26
28
|
saveCanvas(): void;
|
|
27
29
|
restoreCanvas(): void;
|
|
28
30
|
toggleBorderCanvas(currentStepType: StepType, isStarted: boolean): void;
|
|
31
|
+
toggleRecordVideo(currentStepObj: Step, isStarted: boolean): void;
|
|
29
32
|
clearBorderCtx(): void;
|
|
30
33
|
setVideoCanvasSizes({ width, height }: Size): void;
|
|
31
34
|
getBaseSizes(coefficient?: number): {
|