Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnylineJS

Hierarchy

  • AnylineJS

Index

Properties

camera: CameraAPI

Camera API

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

Type declaration

    • Callback called when some (not all) Errors occur

      deprecated

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

      params

      error - Error object containing errorCode (.code) and .message

      Parameters

      Returns void

onFrame: ((image: string, fullImage: string) => void)

Type declaration

    • (image: string, fullImage: string): void
    • Callback called before a new frame is being processed

      params

      image - current image

      params

      fullImage - current full image

      Parameters

      • image: string
      • fullImage: string

      Returns void

onLoad: ((video: HTMLVideoElement) => void)

Type declaration

    • (video: HTMLVideoElement): void
    • Callback called when scanning is started

      deprecated

      since version 31.0.0 (startScanning is now resolving a promise)

      params

      video - video Element

      Parameters

      • video: HTMLVideoElement

      Returns void

onPerformanceLog: ((perflog: any) => void)

Type declaration

    • (perflog: any): void
    • Callback called when a scan yielded in a performance log

      params

      perflog - object containing the performance log

      Parameters

      • perflog: any

      Returns void

onResult: ((result: AnylineJSResult) => void)

Type declaration

    • Callback called when a scan yielded in a result

      params

      result - object containing the scanned result and image

      Parameters

      Returns void

onScannedBarcodes: ((result: AnylineJSResult) => void)

Type declaration

    • Callback called when any Barcodes are detected.

      params

      result - object containing the scanned result and images

      Parameters

      Returns void

Methods

  • dispose(): void
  • getFaceAuthToken(): boolean | Promise<string>
  • handleImageRequest(): Promise<void>
  • pauseScanning(): void
  • preload(): void
  • setFocusDistance(focusDistance: number): void
  • startScanning(): Promise<null | HTMLVideoElement>
  • Starts the scan process

    throws

    PermissionError This exception is thrown if the camera access was denied

    throws

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

    throws

    DisposedError This exception is thrown if anylineJS is already disposed

    Returns Promise<null | HTMLVideoElement>

    A promise resolving the video element of the feed

  • stopScanning(): void

Generated using TypeDoc