Try researching and incorporating Html5-QRCode.js into Anvil using something like Meredydd does here:
Html5-QRCode.js