-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Live Video in ionic/angular working erratically #489
Comments
Thank you for filing an issue! Please be patient. :-) |
Hmm. We could probably add an option to init that if enabled would cause a stop/start when going background/foreground. Am I understanding that calling stop() when your web app is backgrounded and notified via the Page Visibility API and then start() when it is foreground again, seems to solve the problem?
something like that? |
That would certainly help, but it doesn't fix the main problem, which seems to be the initial crash I mentioned after switching the other app using the camera, I would do more debugging on that regard but since the Quagga portion of the source code is minified I can't really debug more properly. |
Frankly, I just assume on Android that trying to switch between two apps that have the camera open will break both of them, so I've never tried it :-D Can you share any specific details about the environment? what version of Android, what other app you're going into? just so i can try to repro similar things .. although i'd guess it probably repros with anything.. probably can just launch the regular Android camera app, use swipe gesture to switch between and see... |
I'm running these tests on Android 12, and yes, the regular camera app reproduces the error. |
FWIW, I just got an Android 13 device. I tried to switch back and forth between having the stock Camera app on, and my webapp using Quagga2. It was successfully switching back and forth, even with a second copy of my webapp open in a Chrome tab. There was a visible pause sometimes, as Android was clearly switching the camera between apps, with the "camera in use" light flickering as it went. My other Android device is Android 11, I'll have to try there, if I can get it to charge. It took a pretty nasty fall and hasn't worked right since. |
I have a couple of apps using this library to read barcodes and QR codes from the camera's live video feed. Last year, we were testing one of these apps before deploying a new update. Some of our testing devices seemed to present a weird issue with the video feed, it would not update unless there was a screen touch or some other event that would lead to Angular's change detection cycle. The devices had varying major versions of the Android OS, and sometimes on a fresh install the camera would work just fine. We ended leaving it as is, seeing that none of our userbase had reported any issues at the time.
More recently though, we have gotten reports that this same issue is occurring on our users' devices.
Since this has been happening in a wildly inconsistent manner, we haven't really found any hint of what may be causing this issue.
After the recent reports, I even made a new blank ionic project to test if this would happen on a clean new project, and I can attest that it does. But again, even after the issue occurring on a specific device, sometimes after a clean new install it goes away. This is the repo I used to test that on the device.
The text was updated successfully, but these errors were encountered: