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

  1. Set flashMode to on: <Camera ref={ref => { this.camera = ref; }} flashMode={Camera.Constants.FlashMode.on}>

  2. 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)

Commits related to this issue

Most upvoted comments

Looks like setting flashMode={Camera.Constants.FlashMode.torch} now works in SDK 36, but recording with flashMode={Camera.Constants.FlashMode.on} doesn’t turn on the flash, thanks for reporting again

Im working in a bare react native project and i have updated expo-camera to version 11.2.1 and 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 fixed

didn’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: {} });