@idscan/idvc2 3.6.0 → 3.7.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 +4 -0
- package/dist/idvc.js +1 -1
- package/dist/idvc.js.gzip +0 -0
- package/dist/js/defaultConfig.ts +1 -1
- package/dist/networks/Face-chunk.js +1 -1
- package/dist/types/defaultConfig.d.ts +1 -1
- package/dist/types/modules/Step.d.ts +5 -5
- package/dist/types/modules/ui/ControlButton/index.d.ts +2 -0
- package/dist/types/modules/ui/VideoWrapper/CanvasWrapper.d.ts +2 -2
- package/dist/types/modules/ui/VideoWrapper/CaptureButton.d.ts +15 -0
- package/dist/types/modules/ui/VideoWrapper/{VideoRecorderService.d.ts → MultiImagesRecorderService.d.ts} +2 -2
- package/dist/types/modules/ui/VideoWrapper/VideoWrapper.d.ts +3 -5
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ export type StepConfig = {
|
|
|
23
23
|
autocaptureDelay?: number;
|
|
24
24
|
enableDesktopNotification?: boolean;
|
|
25
25
|
enableFourCornerCapture?: boolean;
|
|
26
|
-
|
|
26
|
+
shouldRecordMultiImages?: boolean;
|
|
27
27
|
delayUntilCaptureButtonVisible?: number;
|
|
28
28
|
};
|
|
29
29
|
export type DocumentType = {
|
|
@@ -20,7 +20,7 @@ export interface IStepObj {
|
|
|
20
20
|
time?: number;
|
|
21
21
|
configs?: StepConfig[];
|
|
22
22
|
stepTypeImageName: StepTypeImageName;
|
|
23
|
-
|
|
23
|
+
shouldRecordMultiImages?: boolean;
|
|
24
24
|
delayUntilCaptureButtonVisible?: number;
|
|
25
25
|
}
|
|
26
26
|
export interface IStepCallback {
|
|
@@ -28,8 +28,8 @@ export interface IStepCallback {
|
|
|
28
28
|
img: Base64Image | null;
|
|
29
29
|
/** blob step image */
|
|
30
30
|
blob: Blob | null;
|
|
31
|
-
/** blob step
|
|
32
|
-
|
|
31
|
+
/** blob step MultiImages */
|
|
32
|
+
multiImagesBlob?: Blob | null;
|
|
33
33
|
/** step type */
|
|
34
34
|
type: StepType;
|
|
35
35
|
/** is it autocaptured from camera */
|
|
@@ -51,7 +51,7 @@ export interface IStepCallback {
|
|
|
51
51
|
}
|
|
52
52
|
export default class Step implements IStepCallback, IStepObj {
|
|
53
53
|
blob: Blob | null;
|
|
54
|
-
|
|
54
|
+
multiImagesBlob: Blob | null;
|
|
55
55
|
errorCode: ErrorCodes | null | undefined;
|
|
56
56
|
mrzText?: string;
|
|
57
57
|
mrzImg?: Base64Image | null;
|
|
@@ -68,7 +68,7 @@ export default class Step implements IStepCallback, IStepObj {
|
|
|
68
68
|
img: Base64Image | null;
|
|
69
69
|
cameraInfo: Record<string, any>;
|
|
70
70
|
stepTypeImageName: StepTypeImageName;
|
|
71
|
-
|
|
71
|
+
shouldRecordMultiImages: boolean;
|
|
72
72
|
delayUntilCaptureButtonVisible?: number;
|
|
73
73
|
constructor(nameOrObj: string | IStepObj, type?: StepType, camera?: VideoFacingModeEnum, time?: number, img?: Base64Image | null);
|
|
74
74
|
get isShowManualSwitchButton(): boolean;
|
|
@@ -25,12 +25,12 @@ export declare class CanvasWrapper {
|
|
|
25
25
|
private readonly faceOffset;
|
|
26
26
|
private readonly canvasNames;
|
|
27
27
|
private readonly canvasCtxNames;
|
|
28
|
-
private
|
|
28
|
+
private multiImagesRecorder;
|
|
29
29
|
constructor(componentWrapper: HTMLElement, video: HTMLVideoElement);
|
|
30
30
|
saveCanvas(): void;
|
|
31
31
|
restoreCanvas(): void;
|
|
32
32
|
toggleBorderCanvas(currentStepType: StepType, isStarted: boolean): void;
|
|
33
|
-
|
|
33
|
+
toggleRecordMultiImages(currentStepObj: Step, isStarted: boolean): void;
|
|
34
34
|
clearBorderCtx(): void;
|
|
35
35
|
setVideoCanvasSizes({ width, height }: Size): void;
|
|
36
36
|
getBaseSizes(coefficient?: number): {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ControlButtonEvents } from '../ControlButton';
|
|
2
|
+
export interface ICaptureButton {
|
|
3
|
+
setStart(): void;
|
|
4
|
+
setStop(): void;
|
|
5
|
+
}
|
|
6
|
+
export declare class CaptureButton implements ICaptureButton {
|
|
7
|
+
private controlButton;
|
|
8
|
+
private readonly checkIsCameraErrorVisible;
|
|
9
|
+
constructor(element: HTMLElement, onClick: ControlButtonEvents, checkIsCameraErrorVisible: () => boolean);
|
|
10
|
+
private timeout;
|
|
11
|
+
private showCaptureButtonTimeout;
|
|
12
|
+
private setVisible;
|
|
13
|
+
setStart: () => void;
|
|
14
|
+
setStop: () => void;
|
|
15
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare class
|
|
1
|
+
export declare class MultiImagesRecorderService {
|
|
2
2
|
private mediaRecorder;
|
|
3
3
|
private recordedBlobs;
|
|
4
|
-
private
|
|
4
|
+
private multiImagesType;
|
|
5
5
|
startRecording(canvas: HTMLCanvasElement): void;
|
|
6
6
|
stopRecording(): void;
|
|
7
7
|
private handleDataAvailable;
|
|
@@ -4,8 +4,8 @@ import { CanvasWrapper } from './CanvasWrapper';
|
|
|
4
4
|
import { UiHints } from './UIHints';
|
|
5
5
|
import Step from '../../Step';
|
|
6
6
|
import { StepPreview } from './StepPreview/StepPreview';
|
|
7
|
-
import { ControlButton } from '../ControlButton/ControlButton';
|
|
8
7
|
import { StatusPlank } from '../StatusPlank/StatusPlank';
|
|
8
|
+
import { ICaptureButton } from './CaptureButton';
|
|
9
9
|
export type UpdateVideoWrapParams = {
|
|
10
10
|
currentStepImg: string;
|
|
11
11
|
currentStepObj: Step;
|
|
@@ -18,7 +18,7 @@ export declare class VideoWrapper {
|
|
|
18
18
|
canvasWrapper: CanvasWrapper;
|
|
19
19
|
hints: UiHints;
|
|
20
20
|
stepPreview: StepPreview;
|
|
21
|
-
captureButton:
|
|
21
|
+
captureButton: ICaptureButton;
|
|
22
22
|
statusPlank: StatusPlank;
|
|
23
23
|
video: HTMLVideoElement;
|
|
24
24
|
videoWrap: HTMLDivElement;
|
|
@@ -31,7 +31,6 @@ export declare class VideoWrapper {
|
|
|
31
31
|
private cameraErrorHeader;
|
|
32
32
|
private cameraErrorText;
|
|
33
33
|
private UIComponents;
|
|
34
|
-
private isShowDemandButton;
|
|
35
34
|
constructor(componentWrapper: HTMLElement);
|
|
36
35
|
updateVideoWrap({ currentStepImg, currentStepObj, }: UpdateVideoWrapParams): void;
|
|
37
36
|
setMirroring(isMirroring: boolean): void;
|
|
@@ -40,12 +39,11 @@ export declare class VideoWrapper {
|
|
|
40
39
|
setFakeContourStyles(width: number): void;
|
|
41
40
|
hideVideoError(): void;
|
|
42
41
|
showVideoError(errorCode: string): void;
|
|
43
|
-
setCaptureButtonHidden(newValue: boolean): void;
|
|
44
42
|
private init;
|
|
45
43
|
setCameraErrorText(header: string, text: string): void;
|
|
46
44
|
showCameraError(): void;
|
|
47
45
|
hideCameraError(): void;
|
|
48
|
-
checkIsCameraErrorVisible()
|
|
46
|
+
checkIsCameraErrorVisible: () => boolean;
|
|
49
47
|
changeType(step: Step): void;
|
|
50
48
|
remountUIComponents(): void;
|
|
51
49
|
private getFakeContourWidth;
|