Comments (5)
Thanks 😀
Could you split this issue so we can handle your suggestions separately. Just open another issue and rename this one.
from vue-qrcode-reader.
🎉 This issue has been resolved in version 1.2.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
from vue-qrcode-reader.
You should know: At the moment, there isn't really a canvas element. The camera stream is displayed via a video element. When you pause the component, we simply call pause()
on the video. The camera is still streaming in the background and that's why Chrome displays the notification. When you call stopCamera
the stream is closed and I guess video elements need the stream to be active to display anything. As a result the last captured frame is lost.
We could continuously paint the streams frames to an actual canvas. This should look exactly like a video element but when the stream is closed the last painted frame will persist. I assume you had something like this in mind too, right?
I'd like to keep this components API as simple as possible, so I always hesitate to expose new events, props and so on. However, I think your suggestion is totally valid. It makes sense to release the camera when it seems to be not in use. I'm thinking about making this the default when pause
is set to false
. Un-pausing might cause perceivably more delay though, because the stream has to be loaded again.
Those are my thoughts so far. What do you think?
PS: don't forget to open the drag-and-drop related issue. I like that idea too 😉
from vue-qrcode-reader.
Maybe handle it transparent for the user of your component. The https://caniuse.com/#feat=pagevisibility API should work on all devices which support camera streams. if (document.visibilityState == "visible")
do a soft pause otherwise disconnect the stream.
Another turn down beside the notificaton that a stream is open is that the stream is open :-)
Which means it uses battery. My Phone (Galaxy S7) heats up quite fast with the connected stream running in background
from vue-qrcode-reader.
I finally started to work on this one too. I think I found a nice solution but performance might have suffered. On desktop it's fine but my old-ass phone has a hard time. If you want, you can checkout the demo page – especially validation (hard) demo – and tell me how it performs on your device.
from vue-qrcode-reader.
Related Issues (20)
- structured-clone is not defined HOT 3
- Disable capture property on QRCodeCapture HOT 2
- How to avoid wide-angle cameras HOT 2
- The automated release is failing 🚨
- CDN download link returns file does not exist HOT 2
- Serious bug(严重的bug) HOT 1
- 版本3.1.9,方法onCameraOn无效,是否含有这个方法?
- 版本3.1.9是否支持formats?如果不支持我应该如何实现? HOT 13
- Scan small DataMatrix HOT 2
- Detect and tracking don't work anymore if choose a camera with constraints HOT 9
- corresponding type declarations HOT 2
- use paused introduce around 1s to 2s of freeze HOT 4
- Feature Request: PDF-Support for Dropzone HOT 4
- reading 'enumerateDevices' is undefined HOT 2
- Are formats available in vue 2? HOT 1
- Unable to read PDF417 Barcodes HOT 1
- Error on installation on Nuxt 3 HOT 1
- Incorrect file extension in "exports" (package.json) HOT 2
- Custom `wasm` file not loading correctly in Nuxt apps HOT 5
- Coponent types missing HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-qrcode-reader.