Skip to main content

Barcode Detection API Polyfill

github.com

一个用TypeScript编写的polyfill,通过调用ZXing或Dynamsoft Barcode Reader作为解码引擎,使主流浏览器都能支持Barcode Detection API。支持生成CJS、ESM和UMD格式的库。

Developer Tools & APIsOpen source#barcode-detection#api#typescript
Visit website
Barcode Detection API Polyfill preview

之前的周刊介绍了Barcode Detection API,但支持的浏览器有限,基本只有mac和安卓版Chrome支持。我专门用TypeScript写了一个polyfill,如果浏览器不支持这个API,就调用ZXing或者Dynamsoft Barcode Reader作为解码引擎,让主流浏览器都能使用这个API。打包器用的microbundle,可以生成CJS、ESM和UMD格式的库。项目地址:https://github.com/xulihang/barcode-detector-polyfillDemo:https://extraordinary-taiyaki-4769a5.netlify.app/

More in Developer Tools & APIs

SolveHub

API for CAPTCHA and anti-bot tasks in authorized testing

Dev Tools ·

liarjs.dev

Scanner that cross-checks browser JavaScript fingerprint against network layer

Dev Tools ·

AntiBrow

Antidetect browser for managing multiple browser identities with real-device

Dev Tools ·

HostlessWP

Open source CLI to move WordPress to Cloudflare Workers

Dev Tools ·

deed.page

Permanent web hosting with an API for AI agents

Dev Tools ·

Rowflare

Open-source Airtable alternative running on your Cloudflare account

Dev Tools ·