You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.2 KiB
1.2 KiB
🚧 WIP: BarcodeDetector Polyfill 🚧
Spec compliant polyfill of the Barcode Detection API.
It can be used for barcode/QR-code recognition in images from various kinds of
sources including <canvas>, <img>, <image> (inside SVGs), <video>, File, Blob, ImageData, ImageBitmap, OffscreenCanvas.
[TODO: live demos]
Installation
npm install barcode-detector
import BarcodeDetector from "barcode-detector"
// polyfill unless already supported
if (!("BarcodeDetector" in window)) {
window.BarcodeDetector = BarcodeDetector
}
Usage
For in-depth documentation checkout the corresponding MDN page.
Supported Formats
- ✔️
aztec - ✔️
code_128 - ✔️
code_39 - ❌
code_93 - ❌
codabar - ✔️
data_matrix - ✔️
ean_13 - ✔️
ean_8 - ✔️
itf - ✔️
pdf417 - ✔️
qr_code - ❌
upc_a - ❌
upc_e