Class BarcodeScannerViewConfiguration

Hierarchy

Constructors

Properties

backgroundColor?: string
captureDelay?: number

Capture delay in milliseconds after detecting barcodes. Defaults to 1000

container?: HTMLElement

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.

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.

desiredRecognitionResolution?: number

If set, limit the resolution of the image that is used for barcode recognition. A lower value will result in faster processing times but may reduce recognition quality.

detectionParameters?: Omit<DeepPartial<BarcodeScannerConfiguration>, "live">
finder?: {
    aspectRatio?: { readonly width?: number; readonly height?: number; _marker?: () => void; };
    overlayColor?: string;
    style?: ({ readonly _type?: "FinderCorneredStyle"; strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) | ({ readonly _type?: "FinderStrokedStyle"; strokeColor?: string; strokeWidth?: number; cornerRadius?: number; });
    visible?: boolean;
}

Type declaration

  • Optional aspectRatio?: { readonly width?: number; readonly height?: number; _marker?: () => void; }

    The viewfinder's aspect ratio.

    Default Value

    new AspectRatio({
    "width": 1.0,
    "height": 1.0
    });
  • Optional overlayColor?: string

    Color of the viewfinder overlay.

    Default Value

    "?sbColorSurfaceLow";
    
  • Optional style?: ({ readonly _type?: "FinderCorneredStyle"; strokeColor?: string; strokeWidth?: number; cornerRadius?: number; }) | ({ readonly _type?: "FinderStrokedStyle"; strokeColor?: string; strokeWidth?: number; cornerRadius?: number; })

    Visual appearance of the viewfinder.

    Default Value

    new FinderCorneredStyle({
    "strokeColor": "?sbColorSurface",
    "strokeWidth": 2.0,
    "cornerRadius": 10.0
    });
  • Optional visible?: boolean

    Whether the viewfinder is visible.

    Default Value

    true;
    
mirrored?: boolean
onBarcodesDetected?: ((e) => void)

Type declaration

onError?: ((e) => void)

Type declaration

    • (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. You should dispose the scanner and use ScanbotSDK.destroy and ScanbotSDK.initialize to re-initialize the SDK.

      Parameters

      • e: any

      Returns void

preferredCamera?: string

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

Special property to enable barcode count mode. This is a type of a ready-to-use user interface scanning and counting found barcodes. It can be configured via its 'style' (BarcodeCountStyleConfiguration) property. It returns results normally via 'onBarcodesDetected' callback. Please note that results are returned for each consecutive scan, not only after the last scan

spinnerColor?: string
userGuidance?: {
    background?: { strokeColor?: string; fillColor?: string; strokeWidth?: number; };
    title?: { visible?: boolean; text?: string; color?: string; useShadow?: boolean; };
    visible?: boolean;
}

Type declaration

  • Optional background?: { strokeColor?: string; fillColor?: string; strokeWidth?: number; }

    Background style used for the user guidance.

    Default Value

    new BackgroundStyle({
    "strokeColor": "#00000000",
    "fillColor": "?sbColorSurfaceLow"
    });
  • Optional title?: { visible?: boolean; text?: string; color?: string; useShadow?: boolean; }

    Title of the user guidance.

    Default Value

    new StyledText({
    "color": "?sbColorOnPrimary"
    });
  • Optional visible?: boolean

    Whether the user guidance is visible.

    Default Value

    true;
    
videoConstraints?: any

ScanbotCameraView video constraints

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.

DEFAULT_ACCEPTED_ANGLE_SCORE: number
DEFAULT_ACCEPTED_BRIGHTNESS_SCORE: number
DEFAULT_ACCEPTED_SIZE_SCORE: number
DEFAULT_VIDEO_RESOLUTION_4K: {
    height: number;
    width: number;
}

Type declaration

  • height: number
  • width: number
DEFAULT_VIDEO_RESOLUTION_HD: {
    height: number;
    width: number;
}

Type declaration

  • height: number
  • width: number

Methods

  • Parameters

    • source: any
    • destination: {
          [key: string]: any;
      }
      • [key: string]: any
    • Optional ignore: string[]

    Returns void

Generated using TypeDoc