BarcodeReader is the primary interface of the STRICH SDK.

Constructors

Properties

detected?: ((detections) => void)

User-supplied barcode detection handler.

This is a synchronous call, so further processing will not happen until the handler returns.

Type declaration

    • (detections): void
    • User-supplied barcode detection handler.

      This is a synchronous call, so further processing will not happen until the handler returns.

      Parameters

      Returns void

onError?: ((error) => void)

Optional user-supplied error callback.

This is invoked by the BarcodeReader if an error occurred while processing frames, and is usually not recoverable.

Type declaration

    • (error): void
    • Optional user-supplied error callback.

      This is invoked by the BarcodeReader if an error occurred while processing frames, and is usually not recoverable.

      Parameters

      • error: Error

      Returns void

Methods

  • Destroy this BarcodeReader instance, making it unusable.

    This will release all associated resources, and should be called whenever an application no longer needs to scan.

    Returns Promise<void>

    Promise that resolves when the BarcodeReader and its associated resources are fully destroyed.

  • Returns boolean

    the current visibility of this BarcodeReader instance

  • Initialize the BarcodeReader instance.

    Returns Promise<BarcodeReader>

    A promise resolving to an initialized BarcodeReader instance, or an error object.

  • Show/hide the BarcodeReader instance.

    Parameters

    • visible: boolean

      True/false for visible/hidden

    Returns Promise<void>

  • Start scanning for barcodes.

    Returns Promise<void>

  • Stop the BarcodeReader instance.

    This will temporarily suspend processing of camera frames / detection of codes.

    Returns Promise<void>

Generated using TypeDoc