Open jonasphp opened 1 year ago
This will not work, you need to use startScanning
and enable your torch after this call.
startScan
will reset the camera-view and therefore disable the torch, this is unfortunately not so easy to fix with the current implementation. Maybe it works if you call prepare
before your enableTorch
call, but unfortunately I cannot test it at the moment.
I'm trying this on a complete fresh install. I'm using iOS 16, Newest Android OS xCode 14 and capacitor v5, The qr scanner works only flash doesn't this is the current code:
On iOS the torch turns on and then off as soon as the camera view starts, on android it doesn't turn on at all.
` const startScan = async () => { document.body.style.opacity="0.2"; document.body.style.background = "transparent"; document.getElementById("pusher").style.display = "none";