@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.
@@ -23,6 +23,7 @@ export type StepConfig = {
23
23
  autocaptureDelay?: number;
24
24
  enableDesktopNotification?: boolean;
25
25
  enableFourCornerCapture?: boolean;
26
+ shouldRecordVideo?: boolean;
26
27
  };
27
28
  export type DocumentType = {
28
29
  type: DocumentTypeName;
@@ -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): {
@@ -0,0 +1,9 @@
1
+ export declare class VideoRecorderService {
2
+ private mediaRecorder;
3
+ private recordedBlobs;
4
+ private videoType;
5
+ startRecording(canvas: HTMLCanvasElement): void;
6
+ stopRecording(): void;
7
+ private handleDataAvailable;
8
+ private handleStop;
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idscan/idvc2",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "component for the capturing documents",
5
5
  "main": "dist/idvc.js",
6
6
  "types": "dist/types/idvc.d.ts",