Closed rattkin closed 1 year ago
I think we have the same problem with an ionic app on android. In the backend the webapp is rendered in a chrome using the webView API of android. All of our packages that use the mediaDevices API seem to have the issue. I will search the chrome forum, maybe the problem is known.
I also tried our app in chrome and there is no issue, seems to be another issue.
The problem was not react-webcam. It was caused by server headers
When I run the app during development (
react-scripts start
), it all works fine.However when I commit the code and deploy it to production, the webcam does not ask for permission when using Chrome and the element is empty
<video autoplay="" playsinline=""></video>
.The error returned from
onUserMediaError
is{}
- can I do something to debug it? We tried Mac, Windows, Linux, Android operating systems. Always chrome has problem and other browsers work.It works in Firefox and Safari, I guess it can be a chrome bug?.
if I enumerate video devices
navigator.mediaDevices.enumerateDevices()
I get onevideoinput
device, but with no data: