-
Notifications
You must be signed in to change notification settings - Fork 15
How to use BarcodeDetectorZXing? #1
Comments
|
Nevermind, i tried building it inside webpack encore that didnt work. Now i cloned your repo, modified the BarcodeDetector.ts to use the ZXing version and used microbundle to build it. Then it worked like a charm. |
Maybe… but the main reason is, if we don’t use a web worker, the expensive scanning operations run on the UI thread. So if that becomes too much, especially on low end devices, the UI could become less responsive. Animations have lower frame rate, clicks and other events are processed with perceivable lag, … stuff like this. |
Hi, I am trying to build this with BarcodeDetectorZXing. I cannot build it even before making modifications though. It fails with the following error: (rpt2 plugin) Error: /Users/mark/Desktop/barcode-detector-polyfill/src/BarcodeDetectorJsqr.ts(6,30): semantic error TS2307: Cannot find module './worker/inline-worker' or its corresponding type declarations. |
It's a bit awkward at the moment. You have to build the web worker as separate file first. With a separate command:
However for BarcodeDetectorZXing that shouldn't be necessary because it doesn't use a worker. |
Hey,
this lib seems great to use the modern barcode detection api. For me qrcode and code_128 is really interesting.
In the readme it states, BarcodeDetectorZXing is not exposed at the moment. I tried building and using it locally but it fails with lots of errors. Is there any way to use the ZXing Detector Polyfill yet?
Thanks!
The text was updated successfully, but these errors were encountered: