Interface PopupConfiguration

Popup scanner configuration

interface PopupConfiguration {
    detectionHandler?: ((detections) => boolean);
    feedback?: FeedbackConfiguration;
    labels?: {
        cancel?: string;
        title?: string;
    };
    resolution?: "hd" | "full-hd";
    style?: {
        cancelButtonBackgroundColor?: string;
        cancelButtonColor?: string;
        titleBackgroundColor?: string;
        titleColor?: string;
    };
    symbologies: (SymbologyName | SymbologySpec)[];
}

Properties

detectionHandler?: ((detections) => boolean)

An optional handler for detections.

Receives barcode detections and must return true if scanning should stop, or false if scanning should continue. Any truthy value will be interpreted as true.

Type declaration

    • (detections): boolean
    • An optional handler for detections.

      Receives barcode detections and must return true if scanning should stop, or false if scanning should continue. Any truthy value will be interpreted as true.

      Parameters

      Returns boolean

Optional configuration for audible and haptic feedback.

labels?: {
    cancel?: string;
    title?: string;
}

Optional overrides for textual content.

Type declaration

  • Optional cancel?: string

    The text to display on the cancel button in the dialog bottom area.

    Remarks

    If no value is supplied, a locale-dependent default text will be used.

  • Optional title?: string

    The text to display in the dialog header area.

    Remarks

    If no value is supplied, a locale-dependent default text will be used.

resolution?: "hd" | "full-hd"

The camera resolution to use.

Default Value

full-hd
style?: {
    cancelButtonBackgroundColor?: string;
    cancelButtonColor?: string;
    titleBackgroundColor?: string;
    titleColor?: string;
}

Optional overrides for title area and cancel button.

Type declaration

  • Optional cancelButtonBackgroundColor?: string

    Background color to use for cancel button. Must be specified in rgb() or rgba() notation.

    Default Value

    transparent
    
  • Optional cancelButtonColor?: string

    Color to use for cancel button outline and text. Must be specified in rgb() or rgba() notation.

    Default Value

    rgba(15,42,66,0.9)
    
  • Optional titleBackgroundColor?: string

    Background color to use for title. Must be specified in rgb() or rgba() notation.

    Default Value

    rgba(15,42,66,0.9)
    
  • Optional titleColor?: string

    Background color to use for title text. Must be specified in rgb() notation.

    Default Value

    rgb(236,237,237)
    
symbologies: (SymbologyName | SymbologySpec)[]

The barcode symbologies that should be detected.

See EngineConfiguration#symbologies for details.

Generated using TypeDoc