Closed NerdySouth closed 1 month ago
Hello,
enableLantern method should be called after start stream, record or preview. If you do it before that, that method is ignored: https://github.com/pedroSG94/RootEncoder/blob/master/encoder/src/main/java/com/pedro/encoder/input/sources/video/Camera2Source.kt#L121
Remember that you need android flash permissions:
<uses-permission android:name="android.permission.FLASHLIGHT" />
This worked well, thank you!
Hi, I have an app that uses your library, and would like to be able to blink/toggle the flash of my device whenever i start recording. Currently, the app uses a StreamBase to initiate an RTMP stream using a Camera2Source object. I have tried calling
enableLantern()
on the Camera2Source before passing it to prepareVideo(), but after that what more should i do? This does not seem to activate the flash LED. I have confirmed i can control the flash LED when the camera is not in use by RootEncoder, but i need to be able to access it while the stream is happening via RootEncoder. Any ideas? Would be happy to add the necessary code if i have to.