ngx-scanner
ngx-scanner copied to clipboard
Is there a way to pause scanning without stopping the camera preview on the UI
What is the expected behavior?
I know it is possible to stop the scanner by setting scanner.enable = false
, but doing this removes the camera preview entirely from the UI. I want to keep the camera preview on the UI intact and also pause the scanning somehow (And also I should be able to turn just the scanning on, when the user presses some button on the UI). #90
What is the use-case or motivation for changing an existing behavior?
I am certainly displaying the result of the scanned code on the same page where the scanning takes place. So even when the user is not scanning anything the scanner continues to scan, this indeed makes the device of the user very hot and drains the battery.
I will appreciate if this could be implemented or if there is some workaround that I don't know.
I think it's a good idea, I've been working to make this possible soon. As a workaround you can set a property pause
in your component and ignore the results if pause
is true
. Note this is not very performant and will consume battery as there's still a lot of JS going on.
@odahcam any news about this? thank youu in advance! ^^