Closed rogadev closed 6 months ago
My apologies! You have it there, already.
const emit = defineEmits(['detect', 'camera-on', 'camera-off', 'error'])
I throw a handler for the @cameraOn
event and I've got what I need. You rock! :)
FYI: if you haven't seen it, there is also a demo: https://vue-qrcode-reader.netlify.app/demos/LoadingIndicator.html
In my testing of this package, it takes the camera about half a second to load up on most computers/devices that I tested. I would love to display a loading spinner, skeleton shadow, or other form of loading indicator to display the loading state of the camera. The best idea I could come up with off the top of my head is a 500ms timeout, but surely there is a better way. Maybe another method for
onLoaded
that I can use to toggle state to conditionally render a loading spinner?Awesome package, though. Fast, effective, accurate, and so simple to setup and use - thank you for your hard work. 🙏