scanbot-web-sdk 2.9.2-beta2 → 2.9.2-beta4

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.
@@ -1,7 +1,7 @@
1
- export interface IBarcodeScannerHandle {
1
+ import { IScannerCommon } from "./i-scanner-common-handle";
2
+ export interface IBarcodeScannerHandle extends IScannerCommon {
2
3
  saveExtractedImageData(): void;
3
4
  resumeDetection(): void;
4
5
  pauseDetection(): void;
5
6
  isDetectionPaused(): boolean;
6
- dispose(): void;
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { DocumentDetectionResult } from "../model/document/document-detection-result";
2
- export interface IDocumentScannerHandle {
3
- dispose(): void;
2
+ import { IScannerCommon } from "./i-scanner-common-handle";
3
+ export interface IDocumentScannerHandle extends IScannerCommon {
4
4
  detectAndCrop(): Promise<DocumentDetectionResult>;
5
5
  enableAutoCapture(): void;
6
6
  disableAutoCapture(): void;
@@ -1,6 +1,6 @@
1
- export interface IMrzScannerHandle {
1
+ import { IScannerCommon } from "./i-scanner-common-handle";
2
+ export interface IMrzScannerHandle extends IScannerCommon {
2
3
  resumeDetection(): void;
3
4
  pauseDetection(): void;
4
5
  isDetectionPaused(): boolean;
5
- dispose(): void;
6
6
  }
@@ -0,0 +1,4 @@
1
+ export interface IScannerCommon {
2
+ swapCameraFacing(force?: boolean): void;
3
+ dispose(): void;
4
+ }
@@ -1,6 +1,6 @@
1
- export interface ITextDataScannerHandle {
1
+ import { IScannerCommon } from "./i-scanner-common-handle";
2
+ export interface ITextDataScannerHandle extends IScannerCommon {
2
3
  resumeDetection(): void;
3
4
  pauseDetection(): void;
4
5
  isDetectionPaused(): boolean;
5
- dispose(): void;
6
6
  }
@@ -23,4 +23,5 @@ export declare abstract class ScannerView<P extends ScanbotCameraProps, S extend
23
23
  isSupported(): boolean;
24
24
  onVideoReady: () => void;
25
25
  onVideoError: (err: Error) => void;
26
+ swapCameraFacing(force?: boolean): void;
26
27
  }
@@ -15,6 +15,8 @@ export default class VideoStream extends React.Component<VideoStreamProps, Video
15
15
  orientationChanged(e: Event): void;
16
16
  tryAddDeviceId(constraints: any): Promise<any>;
17
17
  componentDidMount(): Promise<void>;
18
+ refreshStream(): Promise<void>;
19
+ stopCurrentStreams(): Promise<void>;
18
20
  componentWillUnmount(): void;
19
21
  videoTrack(stream: any): any;
20
22
  updateTorch(enabled: boolean): Promise<void>;
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import VideoStream from "../utils/video-stream";
2
3
  import { Size } from "../utils/dto/Size";
3
4
  import { Frame } from "../utils/dto/Frame";
4
5
  import { WindowStyleConfiguration } from "../model/configuration/window-style-configuration";
@@ -10,12 +11,18 @@ export interface ScanbotCameraViewProps {
10
11
  onReady: () => void;
11
12
  onError: (err: Error) => void;
12
13
  }
13
- export default class ScanbotCameraView extends React.Component<ScanbotCameraViewProps, {}> {
14
+ export interface ScanbotCameraViewState {
15
+ facingModeRear: boolean;
16
+ mirrored: boolean;
17
+ }
18
+ export default class ScanbotCameraView extends React.Component<ScanbotCameraViewProps, ScanbotCameraViewState> {
14
19
  cutout?: Frame;
15
20
  video: HTMLVideoElement | null;
21
+ videoStream: VideoStream | null;
16
22
  canvas: HTMLCanvasElement | null;
17
23
  videoLoaded: boolean;
18
24
  reloadCanvas: boolean;
25
+ constructor(props: any);
19
26
  videoSize(): {
20
27
  width: number;
21
28
  height: number;
@@ -34,4 +41,5 @@ export default class ScanbotCameraView extends React.Component<ScanbotCameraView
34
41
  onStreamChanged: (stream: MediaStream) => void;
35
42
  style(): React.CSSProperties;
36
43
  render(): JSX.Element;
44
+ swapCameraFacing(force?: boolean): void;
37
45
  }