Also when you disconnect/turn off the camera while the QR scanner is open, show a better error message instead of freezing the last frame.
There's still some stuff that could potentially go elsewhere but I think it's enough for now.