-
Notifications
You must be signed in to change notification settings - Fork 334
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: only install polyfill if there is no native support (#447) #449
Conversation
|
2bd4763
to
3765b94
Compare
Deploying vue-qrcode-reader with Cloudflare Pages
|
3765b94
to
5cdc631
Compare
@pastc it appears that https://53815a69.vue-qrcode-reader.pages.dev/demos/DragDrop.html So this breaks |
@gruhn I tested the demo on the link that you gave me on a macbook air on chrome and it worked fine. all QrcodeDropZone, QrcodeCapture, and QrcodeStream. |
Hmm, that's odd. I just checked on my Mac I have at work (which both has a camera and native
Either way, its probably ok to always use the polyfill for |
I don't know why it isn't working on your macbook. |
Still using polyfill for `QrcodeDropZone` and `QrcodeCapture` even on platforms with native `BarcodeDetector` is available, because on some of them `BarcodeDetector.detect` does not support `Blob` / `File` inputs. See: #447
5cdc631
to
a5a0a2a
Compare
🎉 This PR is included in version 5.5.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@gruhn I think we need to check if the I'm running into a problem where some of the application's built-in browser, they have |
Ok, that’s annoying. I think we should probably revert this change then. I mean we could detect this particular situation and take that into account when applying the polyfill, but who knows which other device/OS/browser combos are problematic. |
Happened to notice this issue, it's probably better to provide a |
I think providing a prop for the user to choose from is a good idea. Maybe we could also compare the |
I'm worried that this has a hidden cost. There might be a ton of random device/OS/browser combos where the native API is not quite working as expected. If a if (edgeCase1) {
setNativeProp(true)
} else if (edgeCase2) {
setNativeProp(false)
} else {
...
} But then users are less likely to open an issue here and share that knowledge. Thus, everyone is left to re-discover these issues by themselves. On the other hand, if users open an issue, we can at least try to find a solution, that fixes the problem for everyone.
I'd prefer this approach then. |
feat: only install polyfill if there is no native support
Modified gitignore to ignore vitepress cache and dist