expo: Flashmode doesn't turn on for recordasync(), but works fine for takesnapshotasync()
π Bug Report
Environment
Expo CLI 3.2.3 environment info: System: OS: macOS 10.14.6 Shell: 3.2.57 - /bin/bash Binaries: Node: 8.16.2 - /usr/local/bin/node Yarn: 1.19.1 - /usr/local/bin/yarn npm: 3.10.10 - /usr/local/bin/npm IDEs: Android Studio: 3.5 AI-191.8026.42.35.5791312 Xcode: 11.2/11B52 - /usr/bin/xcodebuild npmGlobalPackages: expo-cli: 3.2.3
Steps to Reproduce
-
Set
flashModeto on: <Camera ref={ref => { this.camera = ref; }} flashMode={Camera.Constants.FlashMode.on}> -
call
recordAsync()
Behavior
Flash should be turned on while video is recording. Flash works for takesnapshotasync(), but on recordAsync()
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (4 by maintainers)
Looks like setting
flashMode={Camera.Constants.FlashMode.torch}now works in SDK 36, but recording withflashMode={Camera.Constants.FlashMode.on}doesnβt turn on the flash, thanks for reporting againIm working in a bare react native project and i have updated expo-camera to version
11.2.1and the issue does not occur anymore. I think it has been solved in some update, because actually in iOS i can record videos with flash without any flicks or bugs. I suggest to update the package or the sdk in an expo managed project, in order to get this issue fixeddidnβt realize it worked for torch π My work around right now is this before calling
recordAsync()this.setState({ isRecording: true, flashType: this.state.flashType === Camera.Constants.FlashMode.on ? Camera.Constants.FlashMode.torch: {} });