@scanlatch/sdk
v0.1.4
Published
Browser image decoding with a local worker and grayscale retail scanline decoding
Readme
@scanlatch/sdk
Barcode scanning that runs entirely in the browser. Decode still images and live camera streams, or read grayscale scanlines directly — no pixel ever leaves the device.
Install
npm i @scanlatch/sdkQuick start
import { createBrowserSdk } from '@scanlatch/sdk';
const sdk = createBrowserSdk({ key: accountKey });
await sdk.initialize();
// still images
const decoder = await sdk.createDecoder();
const results = await decoder.decode(file, { symbologies: ['qr', 'ean13'] });
// live camera
const scanner = sdk.createCameraScanner(video, { onDetections: show });
await scanner.start();
sdk.destroy();Licensing
Scanning requires a Scanlatch account key. Create an account at scanlatch.com to start a free two-week trial — no card required — and register the origins your app is served from.
Formats
EAN-13, EAN-8, UPC-A, UPC-E, DataBar, DataBar Expanded, Code 39, Code 93, Code 128, Interleaved 2 of 5, Codabar, QR, Aztec, Data Matrix and PDF417.
Documentation
License
Commercial — see LICENSE. Third-party notices are included in the package.
