When I try to run the demo in my project, no video stream appears (without logging any error).
When I run the demo in my browser from codepen, everything works fine.
I realized that the issue was coming from requestUserMedia and that step by step debugging could lead to a working camera stream (?!?). Tested on firefox (94.0 (64-bit) Linux) and chrome (Version 94.0.4606.81 (Build officiel) Fedora Project (64 bits)).
Then, I noticed that unmounted / mounted were called several times in a row when the component is first mounted, but the unmounted property was only set to true and never to false (I don't know react enough to estimate if this should happen).
Please follow the general troubleshooting steps first:
Bug reports:
I realized that the issue was coming from
requestUserMedia
and that step by step debugging could lead to a working camera stream (?!?). Tested on firefox (94.0 (64-bit) Linux) and chrome (Version 94.0.4606.81 (Build officiel) Fedora Project (64 bits)).Then, I noticed that unmounted / mounted were called several times in a row when the component is first mounted, but the unmounted property was only set to
true
and never tofalse
(I don't know react enough to estimate if this should happen).Here are the dependencies of my project:
I guess this is caused by some new react way of handling stuff.
Features:
Solved doing this : https://github.com/mozmorris/react-webcam/pull/343