Torch Switch Control
Defined under the namespace Scandit.Datacapture.Core.Ui
- TorchSwitchControl
class TorchSwitchControl : Control
Added in version 6.13.0
Control that allows to toggle the torch on and off. The torch switch control hides itself automatically in case the active frame source doesn’t have a torch.
You can add this control to a view by calling DataCaptureView.addControl().
The availability of torch can be checked programmatically with Camera.isTorchAvailable().
Note
From 8.1 the initial value of the getter properties (torchOnImage, torchOnPressedImage, torchOffImage, torchOffPressedImage) now returns an empty string as initial value instead of the old base64-encoded image. Setting these properties to an image URL or a base64-encoded image will still set the custom image as before.
- torchOffImage
torchOffImage: string | null
Added in version 6.13.0
Sets the image encoded as a base64 string to use for the control button when the torch is off.
- torchOffPressedImage
torchOffPressedImage: string | null
Added in version 6.13.0
Sets the image encoded as a base64 string to use for the control button when the torch is off and the button is pressed.