Sec-ant/zxing-wasm

Add a live preview/working demo of it on the website

phtdacosta opened this issue · 4 comments

Just found this package and I am already all for it, we have barely any reliable alternatives out there. Thanks for the work, Mr Wu!

I see the package was published this week so of course you have a lot to work on but something I missed was a simple working implementation on the website itself, very useful to test with multiple camera-powered devices out-of-the-box.

I have a HUGE project and I am willing to give this library the shot on it, is it "safe for production" already? I will likely be around here more often than not! Hahahahahah

Hi Pedro,

Glad to hear you like it :)

something I missed was a simple working implementation on the website itself

I too noticed a lack of demos may hinder immediate testing and not straightforward for everyone to see the package in action, so I'm already working on one.

very useful to test with multiple camera-powered devices out-of-the-box.

I wasn't planning to add camera/video streams demos because there're many quirks with setting up cameras or capturing frames across different devices. A dedicated UI component package is something in my mind and I might explore in the future. But feel free to share your thoughts on what kind of demo you're expecting.

is it "safe for production" already?

This package was originally published as @sec-ant/zxing-wasm (which is deprecated now) and refactored and renamed to zxing-wasm just two weeks ago. Some of the newly added options because of the refactoring haven't been thoroughly tested due to a lack of samples, use cases, feedbacks and my knowledge on implementing tests. That's why I also think a working demo is a good start.

However, for basic core functions, this package is already used in barcode-detector which aims to serve as a Barcode Detection API polyfill with dedicated APIs for web browsers. And barcode-detector is utilized in vue-qrcode-reader (check out its demos: https://vue-qrcode-reader.netlify.app/), which provides a set of Vue.js components for detecting barcodes in the browser. I believe this package has already powered many websites and apps in production environments but still comprehensive tests are advised.

Right now the version of this package is in release-candidate stage because the upstream library zxing-cpp is undergoing some API refactoring changes just before its next release. So the API of this package might also change a bit in v1.0.0.

And welcome for all kinds of feedbacks. It's good to know that you're willing to bring this package into your project.

Some update. Here is a screen record of the working demo I'm working on:

barcode.mp4

I'm adding a results display and fixing some glitches before it goes online.

The demo is online: https://zxing-wasm-demo.netlify.app/

I think we can close this issue now.

Other library using it is react-qr-scanner