-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(barcode-scanning): support the Web platform #20
Comments
@robingenz I can have a look at this if you want :) As you mentioned in our discussion you already have a standalone component relying on My idea would be to use https://github.com/undecaf/barcode-detector-polyfill, I was already in contact with the guys over there to allow bundling of |
@thegnuu That sounds like a great idea. What about the license? As far as I can see https://github.com/mchehab/zbar is licensed under |
@robingenz I am not entirely sure, to be honest. There was an issue over there undecaf/barcode-detector-polyfill#2 and I think we should be able to use the plugin and bundle it according to this, but I am by far no license expert ;) |
@thegnuu Unfortunately, I am not an expert either. As far as I understand it, it gets complicated as soon as the LGPL source code is linked statically (see https://stackoverflow.com/a/10179181/6731412), which should be the case since the library is compiled into the app as part of the build process. For example, another plugin author recently switched to the MPL license as there were concerns (see Cap-go/capacitor-updater#7 (comment)). |
@thegnuu I just read about the MPL license and see problems there as well:
|
I see, I see. Another idea would be to just implement It's a more generic approach of course and might not work out of the box on each browser, but it would get us around the "license struggles" and add more flexibility for the devs. Adding a polyfill depending on |
Yes, i think this is the best solution atm. Any PR is welcome. Otherwise, I would put it on my todo list next month. |
My feature request was initially about adding just native Barcode Detection API for web platform (even with support only on Chromium browsers). |
I think this makes sense yes, unfortunately I have a really busy week, but maybe I will find some time to start the implementation. |
Perhaps this code could be useful? It handles Datamatrix https://github.com/rxing-core/rxing-wasm/tree/main |
Hi, I’ve just published my PR for this: #211 It also works well with the https://www.npmjs.com/package/barcode-detector polyfill which I choose for it’s easy usage event with offline capability. |
Is your feature request related to a problem? Please describe:
N/A
Describe the solution you'd like:
As in description.
Documentation: mdn > Barcode Detection API
Demo: https://whatpwacando.today/barcode
Describe alternatives you've considered:
N/A
Additional context:
N/A
The text was updated successfully, but these errors were encountered: