modern-react-qr-reader icon indicating copy to clipboard operation
modern-react-qr-reader copied to clipboard

Stop stream even when then component is unloaded before preview is shown

Open AlexDanault opened this issue 3 years ago • 0 comments

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 !

AlexDanault avatar Aug 09 '21 18:08 AlexDanault