react-native-agora
react-native-agora copied to clipboard
FixedPortrait mode is not working perfectly
In broadcasting part i did bellow things:
- I used setVideoEncoderConfiguration with FixedPortrait orientation mode.
- I set setVideoEncoderConfiguration before enableVideo()
Output i noticed in android:
-
Broadcaster device in portrait mode: a. In Broadcasting part: Local video is in portrait mode. It is OK. b. In Receiving part: Remote video is in portrait mode. It is OK.
-
Broadcaster device in landscape mode: a. In Broadcasting part: Local video is in Landscape mode. It is OK. b. In Receiving part: Remote video is 90 degree rotated. Which is not expected. As per this theory ( https://docs.agora.io/en/Video/video_rotation_android?platform=Android ) of Agora, in FixedPortrait orientation mode the Remote video in receiving part should always be in Portrait mode. It shouldn't be rotated by 90 degree like bellow !!!!!!
LichKing-2234 Urgently fix this issue please. We need to have a production build of our App urgently.
Sorry for the late reply, I think you should call setVideoEncoderConfiguration
after enableVideo
Hi @anisurrahman072 have you find any solution yet. because I'm also facing this same issue
Hi @rajat-mobileCoder, Though i'm very busy but i want to help you by a short suggestion about this. I hope you maintained the documentation & wrote the code properly. If you did then just follow this bellow & see if it works or not!
So basically, we all know in Android/ IOS device there is a device-rotation button in the Device top navigation bar. Last time i saw that when I turned-off the device rotation mode, the agora-react-native orientation mode is not working. But when i turned on the device rotation mode then the agora-react-native orientation mode is working perfectly 🚀💯
My simple config for agora-react-native was just like bellow:

Hope it will help you 🎉🎉
Hi @anisurrahman072,
thanks for the response I tried your code same but its not working I used this code before and after enabling the video.
everything is working fine but orientationMode is not working after trying all solutions
Hi @LichKing-2234 I tried setVideoEncoderConfiguration after enable the video but it also not worked
Did you tried with On & off this bellow option in your Android device or Emulator @rajat-mobileCoder ?

@anisurrahman072 I tried on Android device with both auto-rotation on and off
I searched almost everywhere but nothing worked @anisurrahman072 @LichKing-2234
Ohhh, @rajat-mobileCoder brother I'm telling you the details once again. Umm hope it will help you to reach the behaviour of Orientation Mode 2. Bellow I am showing you 2 scenario. For Scenario 1 you will see the Output has rotated unexpectedly ❌ but for Scenario 2 the Output is correct in rotation 🚀🚀
✅ ✅ Scenario 1: Now I am showing you both my Input & Output Video when Android device Auto-rotation Off
👉 Input in my Android Device (Horizontal)

👉 Output of the above Input in Web (Used Web Agora SDK) ❌ ❌

✅ ✅ Scenario 2: Now I am showing you both my Input & Output Video when Android device Auto-rotation ON
👉 Input in my Android Device (Horizontal):

👉 Output of the above Input in Web (Used Web Agora SDK) 🚀 🚀

From these above 👆👆 2 scenarios, I hope you understand the behaviour of Agora Video Orientation Mode 2. Check your outputs with these above & let me know is it already OK for you or not.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.