modern-react-qr-reader
modern-react-qr-reader copied to clipboard
Stop stream even when then component is unloaded before preview is shown
Clone of a PR that never made it to master on the parent repo ( https://github.com/JodusNodus/react-qr-reader/pull/113 )
There is a bug when you quickly load and unload the camera component, the camera will stay on even if the component got destroyed.
This fix was tested on desktop and Android.
The code change touching supported
was to make the package compilable under my version of node.
P.S. : You'll need to gulp
to compile my code as I didn't want to submit compiled code with this PR..
Thanks !