ludo / react-native-torch

Torch (flashlight) plugin for React Native (Android/iOS)
MIT License
78 stars 27 forks source link

it dont work when camera is turned on #20

Open zhllucky opened 5 years ago

zhllucky commented 5 years ago

When the camera is turned on. it does not work on android ,but can work on ios. can you help me?

TeruyaHaroldo commented 5 years ago

I have same issue

AKACC commented 5 years ago

@TeruyaHaroldo @zhllucky Here is my solution for now:

 this.state.isCameraOn?RNCamera.Constants.FlashMode.torch : RNCamera.Constants.FlashMode.off

I use it when camera is on, using react native torch when is off.

Cchumi commented 5 years ago

Hi same issue here but I don’t use rncamera library and don’t want to use it just for enabling torch. Someone got a solution ?

erick94isc commented 3 years ago

Hi same issue here but I don’t use rncamera library and don’t want to use it just for enabling torch. Someone got a solution ?

Did you find any solution for that?

AKACC commented 3 years ago

Hi same issue here but I don’t use rncamera library and don’t want to use it just for enabling torch. Someone got a solution ?

Did you find any solution for that?

expo-camera works as well, similar syntax: flashMode={ this.state.isLightOn ? Camera.Constants.FlashMode.torch : Camera.Constants.FlashMode.off}