interface BarcodeScanConfig {
    _barcodeFormatNumberString?: string;
    barcodeFormats?: bigint;
    expectedBarcodesCount?: number;
    isAutoZoomEnabled?: boolean;
    isBeepEnabled?: boolean;
    isCameraToggleButtonVisible?: boolean;
    isCloseButtonVisible?: boolean;
    isScanLaserVisible?: boolean;
    isTorchButtonVisible?: boolean;
    license?: string;
    maxConsecutiveStableFramesToExit?: number;
    scanningMode?: EnumScanningMode;
    scanRegion?: DSRect;
    templateFile?: string;
    templateNodeRequire?: NodeRequire;
}

Properties

_barcodeFormatNumberString?: string

internal field, don't set it.

barcodeFormats?: bigint

Sets the barcode format(s) to read. This value is a combination of EnumBarcodeFormat flags that determine which barcode types to read. For example, to scan QR codes and OneD codes, set the value to EnumBarcodeFormat.BF_QR_CODE | EnumBarcodeFormat.BF_ONED.

expectedBarcodesCount?: number

Defines the expected number of barcodes to be scanned. The scanning process will automatically stop when the number of detected barcodes reaches this count.

isAutoZoomEnabled?: boolean

Enables or disables the auto-zoom feature during scanning. When enabled (true), the scanner will automatically zoom in to improve barcode detection.

isBeepEnabled?: boolean

Specifies if a beep sound should be played when a barcode is successfully detected. Set to true to enable the beep sound, or false to disable it.

isCameraToggleButtonVisible?: boolean

Specifies whether the camera toggle button is displayed. This button lets users switch between available cameras (e.g., front and rear).

isCloseButtonVisible?: boolean

Determines whether the close button is visible on the scanner UI. This button allows users to exit the scanning interface.

isScanLaserVisible?: boolean

Determines if a scanning laser overlay is shown on the scanning screen. This visual aid (scan laser) helps indicate the scanning line during barcode detection.

isTorchButtonVisible?: boolean

Determines whether the torch (flashlight) button is visible in the scanning UI. Set to true to display the torch button, enabling users to turn the flashlight on/off.

license?: string

The license key required to initialize the barcode reader.

maxConsecutiveStableFramesToExit?: number

Specifies the maximum number of consecutive stable frames to process before exiting scanning. A "stable frame" is one where no new barcode is detected; the default value is typically 10.

scanningMode?: EnumScanningMode

Sets the scanning mode for the barcode reader. The mode is defined by the EnumScanningMode and affects the scanning behavior.

scanRegion?: DSRect

Defines the scanning area as a DSRect object where barcodes will be detected. Only the barcodes located within this defined region will be processed.

DSRect

templateFile?: string

Specifies the template configuration for the barcode scanner. This can be either a file path or a JSON string that defines various scanning parameters.

templateNodeRequire?: NodeRequire

Provides a Node.js 'require' function to load the template file when running in a Node environment. This facilitates importing external template configuration files.