Interface AnylineJSParams

interface AnylineJSParams {
    anylinePath?: string;
    config?: PluginConfig;
    correlationId?: string;
    coverVideo?: boolean;
    debugAnyline?: string | boolean;
    element: HTMLElement;
    estimateMainCamera?: boolean;
    flashOnResult?: boolean;
    hapticFeedback?: boolean;
    initialFlashOn?: boolean;
    landscapeOrientation?: LockOrientation;
    license: string;
    loadingScreen?: string;
    lockPortraitOrientation?: LockOrientation;
    mediaConstraints?: MediaStreamConstraints;
    mirrorOnDesktop?: boolean;
    preload?: boolean;
    preloadCallback?: (() => void);
    preset?: string;
    retryCameraAccess?: boolean;
    scaleDown?: boolean;
    slowMessageTimeout?: number;
    throttleImagePass?: number;
    useFullUrlBundleId?: boolean;
    videoSrc?: string;
    viewConfig?: ViewConfig;
    wasmPath?: string;
}

Properties

anylinePath?: string

anylinePath - Path to anylineJS data assets (defaults to cdn hosted assets)

config?: PluginConfig

config - AnylineJS configuration object

correlationId?: string

correlationId - UUIDv4 string to define user Correlation ID

coverVideo?: boolean

coverVideo - [default: true] Reverts a letterbox fix (not recommended to set to false)

debugAnyline?: string | boolean

debugAnyline - Flag to output more verbose logs | pass 'screen' to additionally render logging overlay (beta)

element: HTMLElement

element - HTMLElement where anylineJS should be mounted into

estimateMainCamera?: boolean

estimateMainCamera - [default: true] Flag to disable camera estimation (not recommended)

flashOnResult?: boolean

Activate flash feedback on mobile devices.

hapticFeedback?: boolean

Activate haptic feedback on mobile devices.

initialFlashOn?: boolean

initialFlashOn - [default: false] starts scanning with camera flash state (only Android Chrome support)

landscapeOrientation?: LockOrientation

lockOrientation - If set locks the screen orientation to landscape and overrides 'lockPortraitOrientation'. (Android)

license: string

license - AnylineJS license string

loadingScreen?: string

loadingScreen - HTML string to replace the default loader (<div>loading...</div>)

lockPortraitOrientation?: LockOrientation

lockOrientation - If set locks the screen orientation to portrait. (Android)

mediaConstraints?: MediaStreamConstraints

mediaConstraints - overwrite mediaConstraints of the camera feed (i.E to use a certain resolution or a specific camera)

mirrorOnDesktop?: boolean

mirrorOnDesktop - (default: true) disable mirroring on desktop browsers (i.E if you are using a back-facing camera on desktop)

preload?: boolean

preload - preloads the assets by a given preset (eg. 'barcode')

preloadCallback?: (() => void)

preloadCallback - set a callback to execute custom code after all assets were loaded. Callback will override the default behavior.

preset?: string

preset - Module preset

retryCameraAccess?: boolean

retryCameraAccess - Flag if the system should retry camera access with fallback default media constraints

scaleDown?: boolean

scaleDown - [default: false] Scales down the processed image for potential performance boost in a few use cases (barcode)

slowMessageTimeout?: number

slowMessageTimeout - [default: 14000] Sets a timeout to start scanning

throttleImagePass?: number

throttleImagePass - throttle the time between processing images (in ms)

useFullUrlBundleId?: boolean

useFullUrlBundleId - Flag to consider the whole url path as the bundleId (i.E example.com/apps/scanner vs. example.com)

videoSrc?: string

videoSrc - Https url pointing to a video stream to exchange the camera feed (for debugging, testing purposes)

viewConfig?: ViewConfig

viewConfig - Appearance configuration of the cutout

wasmPath?: string

Path to the web assembly binary.