Closed luoliang222 closed 1 year ago
Torch support is already implemented, you can use the following functions:
enableTorch(): Promise<void>;
disableTorch(): Promise<void>;
toggleTorch(): Promise<void>;
getTorchState(): Promise<TorchStateResult>;
You will need to build your own interface the allow the users to enable/disable the torch.
@thegnuu How to keep the torch going while scanning? .enableTorch isn't doing it alone torch is flashing for 1 sec and as soon as camera starts it turns off.
@jonasphp the torch can currently only be used reliably while using the continuous scan method. If you start the scan, the camera settings will be reset depending on the device and it will disable the torch again. If you start the scan in continuous mode and toggle the torch after this you should be able to use it. Unfortunately this is as far as I know not an easy fix since it would require a lot of changes.
Is your feature request related to a problem? Please describe. i need open light when scan at night, but the flashlight control is can't open when i open scan.