barcode-detection
Version:
Polyfill for the Barcode Detection API based on Dynamsoft Barcode Reader or ZXing.
18 lines (17 loc) • 805 B
TypeScript
import { BarcodeReader } from 'dynamsoft-javascript-barcode';
import { BarcodeDetectorOptions, BarcodeFormat, DetectedBarcode } from './Definitions';
export * from './BarcodeDetectorDBR';
export * from './BarcodeDetectorZXing';
export * from './Definitions';
export declare type Engine = "DBR" | "ZXing";
export default class BarcodeDetector {
static engine: Engine;
private reader;
constructor(barcodeDetectorOptions?: BarcodeDetectorOptions);
static getSupportedFormats(): Promise<BarcodeFormat[]>;
detect(image: ImageBitmapSource): Promise<DetectedBarcode[]>;
static setDBREngineResourcePath(path: string): void;
static setDBRLicense(license: string): void;
static getDBRLicense(license: string): string;
static initDBR(): Promise<BarcodeReader>;
}