RtmpStream camera settings #1399
-
Hi, thanks for the great library, I'm using RtmpStream to allow me to change the orientation, everything works fine, but I'm having trouble figuring out how to change the camera from main camera to front camera, turn on the flash and set the zoom, can you tell me which direction to go in? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hello, You need do it using VideoSource like in this example: If you need extend functionality you can create you own VideoSource and add required methods. For example you can copy that class and add facial recognition method. |
Beta Was this translation helpful? Give feedback.
-
Closing as solved. You can open other or reopen it if needed |
Beta Was this translation helpful? Give feedback.
-
Hello, Using RtmpStream prepareVideo method parameters apply to preview, stream and record. You only need stop all (preview, stream and record) before call prepareVideo. You can do the same with prepareAudio |
Beta Was this translation helpful? Give feedback.
Hello,
You need do it using VideoSource like in this example:
https://github.com/pedroSG94/RootEncoder/blob/master/app/src/main/java/com/pedro/streamer/rotation/StreamService.kt#L138
Depend of the video source used (Camera2Source by default) you have different methods:
https://github.com/pedroSG94/RootEncoder/blob/master/library/src/main/java/com/pedro/library/util/sources/video/Camera2Source.kt
If you need extend functionality you can create you own VideoSource and add required methods. For example you can copy that class and add facial recognition method.