react-native-agora icon indicating copy to clipboard operation
react-native-agora copied to clipboard

FixedPortrait mode is not working perfectly

Open anisurrahman072 opened this issue 2 years ago • 1 comments

In broadcasting part i did bellow things:

  1. I used setVideoEncoderConfiguration with FixedPortrait orientation mode.
  2. I set setVideoEncoderConfiguration before enableVideo()

Output i noticed in android:

  1. 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.

  2. 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 !!!!!! Screenshot 2022-09-12 at 8 37 21 AM

LichKing-2234 Urgently fix this issue please. We need to have a production build of our App urgently.

anisurrahman072 avatar Sep 11 '22 08:09 anisurrahman072

Sorry for the late reply, I think you should call setVideoEncoderConfiguration after enableVideo

LichKing-2234 avatar Oct 13 '22 03:10 LichKing-2234

Hi @anisurrahman072 have you find any solution yet. because I'm also facing this same issue

rajat-mobileCoder avatar Dec 23 '22 09:12 rajat-mobileCoder

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:

image

Hope it will help you 🎉🎉

anisurrahman072 avatar Dec 23 '22 19:12 anisurrahman072

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 Screenshot 2022-12-27 at 6 04 24 PM

rajat-mobileCoder avatar Dec 27 '22 12:12 rajat-mobileCoder

Hi @LichKing-2234 I tried setVideoEncoderConfiguration after enable the video but it also not worked

rajat-mobileCoder avatar Dec 27 '22 12:12 rajat-mobileCoder

Did you tried with On & off this bellow option in your Android device or Emulator @rajat-mobileCoder ?

image

anisurrahman072 avatar Dec 27 '22 13:12 anisurrahman072

@anisurrahman072 I tried on Android device with both auto-rotation on and off

rajat-mobileCoder avatar Dec 27 '22 13:12 rajat-mobileCoder

I searched almost everywhere but nothing worked @anisurrahman072 @LichKing-2234

rajat-mobileCoder avatar Dec 27 '22 13:12 rajat-mobileCoder

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)

Screenshot 2022-12-27 at 7 24 09 PM

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

Screenshot 2022-12-27 at 7 24 35 PM

✅ ✅ Scenario 2: Now I am showing you both my Input & Output Video when Android device Auto-rotation ON

👉 Input in my Android Device (Horizontal):

Screenshot 2022-12-27 at 7 25 42 PM

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

Screenshot 2022-12-27 at 7 26 08 PM

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.

anisurrahman072 avatar Dec 27 '22 13:12 anisurrahman072

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.

stale[bot] avatar Mar 14 '23 10:03 stale[bot]