Barcode

interface Barcode extends HybridObject

Represents a single detected Barcode.

A Barcode is produced via the BarcodeScanner or the Barcode Scanner CameraOutput.

See BarcodeScanner.scanCodes(...) for information about converting Barcode coordinates to view coordinates.

Example

const barcode = ...
console.log(`Barcode value: ${barcode.rawValue}`)

Properties

boundingBox

readonly boundingBox: Rect

Get the Barcode's bounding box, relative to the input Frame's coordinates.


cornerPoints

readonly cornerPoints: Point[]

Get the Barcode's corder points, relative to the input Frame's coordinates.


displayValue

readonly displayValue: string | undefined

Get the Barcode's value in a user-friendly format.


format

readonly format: BarcodeFormat

Get the format of this Barcode.

See

BarcodeFormat


rawBytes

readonly rawBytes: 
  | ArrayBuffer
  | undefined

Get the Barcode's value in raw bytes.


rawValue

readonly rawValue: string | undefined

Get the Barcode's raw value as a string.


valueType

readonly valueType: BarcodeValueType

Get the Barcode's value's type.

See

BarcodeValueType