Turn off flashlight (device.flash_off)
Declaration
ok = device.flash_off()
Returns
- ok
Boolean. true if device can open camera and has flashlight hardware; otherwise false
Notes
iPad Pro flashlight cannot be turned on
If the flashlight is on, this function turns it off; otherwise does nothing
Example
if device.flash_off() then
-- device has flashlight
else
-- device has no flashlight
end