Interface ITextPatternScannerHandle

interface ITextPatternScannerHandle {
    dispose(): void;
    fetchAvailableCameras(): Promise<CameraInfo[]>;
    getActiveCameraInfo(): CameraInfo;
    getCapabilities(): MediaTrackCapabilities;
    isDetectionPaused(): boolean;
    pauseDetection(): void;
    resumeDetection(): void;
    setFacingMode(mode): Promise<void>;
    setTorchState(state): Promise<void>;
    setZoom(zoom): void;
    switchCamera(deviceId, mirrored?): void;
    updateConfiguration(config): void;
}

Hierarchy

  • IFinderScannerHandle
    • ITextPatternScannerHandle

Methods

  • Returns void

  • Returns Promise<CameraInfo[]>

  • Returns CameraInfo

  • Returns MediaTrackCapabilities

  • Returns boolean

  • Returns void

  • Returns void

  • Parameters

    Returns Promise<void>

  • Parameters

    • state: boolean

    Returns Promise<void>

  • Parameters

    • zoom: number

    Returns void

  • Parameters

    • deviceId: string
    • Optional mirrored: boolean

    Returns void

  • Parameters

    • config: {
          backgroundColor?: string;
          container?: { accessKey?: string; readonly accessKeyLabel?: string; autocapitalize?: string; dir?: string; draggable?: boolean; hidden?: boolean; inert?: boolean; innerText?: string; lang?: string; readonly offsetHeight?: number; ... 288 more ...; focus?: (options?: FocusOptions) => void; };
          containerId?: string;
          finder?: {
              aspectRatio?: { readonly width?: number; readonly height?: number; };
              minimumInsets?: { top?: number; left?: number; bottom?: number; right?: number; };
              overlayColor?: string;
              preferredHeight?: number;
              style?: ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                  _type: "FinderCorneredStyle";
              } | ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                  _type: "FinderStrokedStyle";
              };
              visible?: boolean;
          } & {
              _type: "ViewFinderConfiguration";
          } | {
              aspectRatio?: { readonly width?: number; readonly height?: number; };
              minimumInsets?: { top?: number; left?: number; bottom?: number; right?: number; };
              overlayColor?: string;
              preferredHeight?: number;
              style?: ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                  _type: "FinderCorneredStyle";
              } | ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                  _type: "FinderStrokedStyle";
              };
          } & {
              _type: "PermanentViewFinderConfiguration";
          };
          mirrored?: boolean;
          onError?: ((e) => void);
          onTextDetected?: ((e) => void);
          preferredCamera?: string;
          previewMode?: "FIT_IN" | "FILL_IN";
          scannerConfiguration?: { ocrResolutionLimit?: number; maximumNumberOfAccumulatedFrames?: number; minimumNumberOfRequiredFramesWithEqualScanningResult?: number; optimizeSingleLine?: boolean; validator?: ({ ...; } & { ...; }) | ({ ...; } & { ...; }); };
          spinnerColor?: string;
          userGuidance?: { visible?: boolean; title?: { visible?: boolean; text?: string; color?: string; useShadow?: boolean; }; background?: { strokeColor?: string; fillColor?: string; strokeWidth?: number; }; };
          videoConstraints?: any;
          zoom?: number;
      }
      • Optional backgroundColor?: string
      • Optional container?: { accessKey?: string; readonly accessKeyLabel?: string; autocapitalize?: string; dir?: string; draggable?: boolean; hidden?: boolean; inert?: boolean; innerText?: string; lang?: string; readonly offsetHeight?: number; ... 288 more ...; focus?: (options?: FocusOptions) => void; }

        The container HTML element of Scanbot Web SDK camera. Required when 'containerId' property is left undefined when calling any ScanbotSDK createScanner function. If both are provided, 'container' property takes precedence.

      • Optional containerId?: string

        The container HTML element id of Scanbot Web SDK camera. Required when 'container' property is left undefined when calling any ScanbotSDK createScanner function If both are provided, 'container' property takes precedence.

      • Optional finder?: {
            aspectRatio?: { readonly width?: number; readonly height?: number; };
            minimumInsets?: { top?: number; left?: number; bottom?: number; right?: number; };
            overlayColor?: string;
            preferredHeight?: number;
            style?: ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                _type: "FinderCorneredStyle";
            } | ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                _type: "FinderStrokedStyle";
            };
            visible?: boolean;
        } & {
            _type: "ViewFinderConfiguration";
        } | {
            aspectRatio?: { readonly width?: number; readonly height?: number; };
            minimumInsets?: { top?: number; left?: number; bottom?: number; right?: number; };
            overlayColor?: string;
            preferredHeight?: number;
            style?: ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                _type: "FinderCorneredStyle";
            } | ({ strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) & {
                _type: "FinderStrokedStyle";
            };
        } & {
            _type: "PermanentViewFinderConfiguration";
        }
      • Optional mirrored?: boolean
      • Optional onError?: ((e) => void)
          • (e): void
          • Error callback of the SDK. If any error was reported, your scanner might not be scanning anymore, e.g. due to an out-of-memory error.

            Parameters

            • e: any

            Returns void

      • Optional onTextDetected?: ((e) => void)
      • Optional preferredCamera?: string

        Camera id or camera label. A list of available cameras can be obtained from ScanbotSDK.cameras.

      • Optional previewMode?: "FIT_IN" | "FILL_IN"

        In FIT_IN – Fits the entire preview (camera) frame into the view. If aspect ratio does not fit, will contain black edges

      • Optional scannerConfiguration?: { ocrResolutionLimit?: number; maximumNumberOfAccumulatedFrames?: number; minimumNumberOfRequiredFramesWithEqualScanningResult?: number; optimizeSingleLine?: boolean; validator?: ({ ...; } & { ...; }) | ({ ...; } & { ...; }); }
      • Optional spinnerColor?: string
      • Optional userGuidance?: { visible?: boolean; title?: { visible?: boolean; text?: string; color?: string; useShadow?: boolean; }; background?: { strokeColor?: string; fillColor?: string; strokeWidth?: number; }; }
      • Optional videoConstraints?: any

        ScanbotCameraView video constraints

      • Optional zoom?: number

        Digital zoom level of the video stream. Defaults to 1.0. Please note that this is not the same as the optical zoom of the camera.

    Returns void

Generated using TypeDoc