cozmo / jsQR

A pure javascript QR code reading library. This library takes in raw images and will locate, extract and parse any QR code found within.
https://cozmo.github.io/jsQR/
Apache License 2.0
3.69k stars 607 forks source link

Function to stop using camera #175

Closed ro78 closed 4 years ago

ro78 commented 4 years ago

Hello,

I use jsQR inside a Bootstrap's modal window opened through a button. When I close the modal, the camera is still in use. There is no "video" object so I can't use video.pause() or similar.

Any idea?

Best regards, Romain

cozmo commented 4 years ago

I found this issue (https://github.com/cozmo/jsQR/issues/17), which seems to have an idea, but like I said there, nothing about jsQR makes any assumptions about where image data is coming from, so I can't be of much help here, since stopping the camera is completely dependent on how you're consuming the camera.