Update rotation during stream and keep it consistent with preview
See original GitHub issueHi @pedroSG94. First of all, thank you for the cool library.
Is it possible to change stream rotation during the stream? I can pass a rotation parameter to prepareVideo() method and it works fine, however, I don’t know how to change it during the stream.
I’d like to have the same behavior as in Streamlabs app - when I live stream to YouTube using this app and rotate the phone, the stream updates its rotation.
I also struggle with keeping the same rotation on preview and stream.
I use OpenGlView, have my Activity orientation set to portrait. When I call prepareVideo(roatation) I pass rotation param based on sensor rotation. The stream rotation and preview rotation is fine when I start streaming in portait calling prepareVideo(rotation = 90), but when I start streaming in landscape calling prepareVideo(rotation = 0), then stream rotation is fine but preview rotation is wrong.
I’ve tried playing with OpenGlView.setRotation() but it affects both stream and preview in a way I can’t understand.
Please guide me a bit or maybe update the sample app if you’d have some time. Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:57 (44 by maintainers)

Top Related StackOverflow Question
Screen orientation must be locked after call startStream or startRecord:
I will do it. Currently it is possible without modify library code. I will create a example soon.