QR code

Anyone know how i can make something (could use js) to detect if a QR code is visible using the camera

https://cozmo.github.io/jsQR/

honestly this is really confusing when I looked at the code but I'm not that good with JS so maybe you would be able to figure it out