BarcodeDetectorService

Wraps the Barcode Detection API (Shape Detection API) for scanning barcodes and QR codes from images, video frames, or canvas elements.

TypeScriptexample.ts
import { BarcodeDetectorService } from '@angular-helpers/browser-web-apis/experimental'

# Methods

MethodSignatureReturnsDescription
isSupportedisSupported(): booleanbooleanPublic method isSupported.
getSupportedFormatsgetSupportedFormats(): Promise<BarcodeFormat[]>Promise<BarcodeFormat[]>Public method getSupportedFormats.
detectdetect(source: ImageBitmapSource, formats?: BarcodeFormat[]): Promise<DetectedBarcode[]>Promise<DetectedBarcode[]>Public method detect.
detectStreamdetectStream(video: HTMLVideoElement, options: { formats?: BarcodeFormat[]; interval?: number }): Observable<DetectedBarcode[]>Observable<DetectedBarcode[]>Public method detectStream.
LCP N/A
CLS N/A
INP N/A