Open craigjb123 opened 3 years ago
I ran into this issue. Its specifically due to the fact that Safari will not autoplay video without some sort of user input, in your case, its the user flipping the camera. What I did was dynamically draw the div
and created the video tag within it and ran the play function on the video tag.
Ideally for user input API we should show a dialog or something for the user to click (like a dumb message) so we have interaction thus freedom to play with those APIs. It may vary from browser to browser and OS to OS, so it's very tricky to try to track all scenarios, but once you got user input in your application it's easier to work on.
Hi, on android pwa, it is blank. there is no question dialog show us to allow use camera, which is ok on pc
Hi, Is there any way to solve this problem? I am also facing the same situation when opening the camera on PWA app, the camera does not work but when exiting and re-entering the app, it still works normally.
Stale issue message
Andriod appears to work just fine.
On iPhone when I activate the camera it prompts me for permission, then once I allow reveals a black rectangle. If I switch away from the app then back, the camera works and the barcode scans properly.
I'm mimicking the code from here: https://zxing-js.github.io/library/examples/barcode-camera/ (which appears to work just fine)
Any ideas? Thanks!