CamerAwesome
CamerAwesome copied to clipboard
Flash doesn't work on Android
Steps to Reproduce
I am using the AwesomeFlashButton
in order to let the user before starting a video recording. When the user selects FlashMode.on
or FlashMode.auto
and starts the video recording, the flash it's never turned off. The only thing that works it's FlashMode.always
.
Expected results
The flash should be turned on while video recording and FlashMode is FlashMode.on
. Or the flash should be turned on while video recording and FlashMode is FlashMode.auto
and the room light is low.
Actual results
When FlashMode.on
or FlashMode.auto
, the Flashlight won't turn on.
About your device
Brand | Model | OS |
---|---|---|
Pixel 4a (5G) | 13 | |
Apple | 12 | iOS 16.3.1 |
Your flutter version
Flutter 3.7.12 • channel stable • https://github.com/flutter/flutter.git Framework • revision 4d9e56e694 (3 weeks ago) • 2023-04-17 21:47:46 -0400 Engine • revision 1a65d409c7 Tools • Dart 2.19.6 • DevTools 2.20.1
We are relying on CameraX for the Android part and unfortunately there is no flash mode for video recordings. The only thing we can do is enable or not the flash in torch mode, which explains your behaviour.
@istornz It it the same behaviour on iOS?
Thanks a lot for the fast reply. I just tried it on an iPhone 12 with iOS 16.3.1 and I'm facing the same issue.
I suspect it's the default behaviour for video recording: either you set torch mode or you don't. That's at least the behaviour on the default camera app of my Android phone (Xiaomi Mi 9T, running MIUI with Android 11).
So may be would be better to write torch icon on AwesomeFlashButton in video mode and have only two states on/off?..