Interface VideoScannerOptions

Options for configuring the VideoScanner.

interface VideoScannerOptions {
    negativeDebounce?: number;
    onRepaint?: (() => unknown);
    onScanClose?: (() => unknown);
    onScanDetect?: ((readResults) => unknown);
    onScanStart?: (() => unknown);
    onScanStop?: (() => unknown);
    onScanUpdate?: ((readResults) => unknown);
    readerOptions?: ReaderOptions;
    scanThrottle?: number;
    wasmLocation?: string;
}

Hierarchy (view full)

Properties

negativeDebounce?: number

Minimum duration in milliseconds before a negative result is confirmed.

onRepaint?: (() => unknown)

Callback function that is triggered when the browser repaints.

Type declaration

    • (): unknown
    • Callback function that is triggered when the browser repaints.

      Returns unknown

onScanClose?: (() => unknown)

Callback function that is triggered when the scanning process is closed.

Type declaration

    • (): unknown
    • Callback function that is triggered when the scanning process is closed.

      Returns unknown

onScanDetect?: ((readResults) => unknown)

Callback function that is triggered when a new barcode is detected.

Type declaration

    • (readResults): unknown
    • Callback function that is triggered when a new barcode is detected.

      Parameters

      • readResults: ReadResult[]

        Array of detected barcodes.

      Returns unknown

Param: readResults

Array of detected barcodes.

onScanStart?: (() => unknown)

Callback function that is triggered when the scanning process starts.

Type declaration

    • (): unknown
    • Callback function that is triggered when the scanning process starts.

      Returns unknown

onScanStop?: (() => unknown)

Callback function that is triggered when the scanning process stops.

Type declaration

    • (): unknown
    • Callback function that is triggered when the scanning process stops.

      Returns unknown

onScanUpdate?: ((readResults) => unknown)

Callback function that is triggered on each scan update, regardless of new detections.

Type declaration

    • (readResults): unknown
    • Callback function that is triggered on each scan update, regardless of new detections.

      Parameters

      • readResults: ReadResult[]

        Array of detected barcodes.

      Returns unknown

Param: readResults

Array of detected barcodes.

readerOptions?: ReaderOptions

Configuration options for the ZXing barcode reader.

scanThrottle?: number

Minimum interval in milliseconds between scan operations to throttle the scan frequency.

wasmLocation?: string

Location of the ZXing WebAssembly (WASM) file used for barcode decoding.

Generated using TypeDoc