anyline-js
    Preparing search index...

    Class AnylineJS

    Index

    Properties

    camera: CameraAPI

    Camera API

    isLoaded: boolean = false
    onError: (error: LegacyErrorObject) => void

    Callback called when some (not all) Errors occur

    Type Declaration

    since version 31.0.0 (Errors should be catched when calling the methods, which provides proper stack-trace)

    onLoad: (video: HTMLVideoElement) => void

    Callback called when scanning is started

    Type Declaration

      • (video: HTMLVideoElement): void
      • Parameters

        • video: HTMLVideoElement

          video Element

        Returns void

    since version 31.0.0 (startScanning is now resolving a promise)

    onPerformanceLog: (perflog: any) => void

    Callback called when a scan yielded in a performance log

    Type Declaration

      • (perflog: any): void
      • Parameters

        • perflog: any

          object containing the performance log

        Returns void

    onResult: (result: AnylineJSResult) => void

    Callback called when a scan yielded in a result

    Type Declaration

    onScannedBarcodes: (result: AnylineJSResult) => void

    Callback called when any Barcodes are detected.

    Type Declaration

    Methods

    • Starts the scan process

      Returns Promise<HTMLVideoElement | undefined>

      A promise resolving to:

      • HTMLVideoElement when called from INITIALIZED state (starts camera and scanning)
      • undefined when called from STOPPED or PAUSED states

      PermissionError This exception is thrown if the camera access was denied

      AnylineError This exception is thrown if something internally is wrong like licensing issues

      DisposedError This exception is thrown if anylineJS is already disposed