Orientation Issue

Description && Steps to Reproduce
I currently have all my activities set as portrait, so there is no landscape mode at all. The issue with my own camera preview. If hold the phone up as portrait view and I join a meeting, my camera will have the correct orientation. However, if I hold my phone in landscape mode (the activity is still portrait mode) and I join the meeting, my camera preview will be in the wrong orientation. Is this a bug with the SDK or there is some settings I am missing?

Which version?
v4.6.21666.0427

Smartphone (please complete the following information):

  • Device: Tested this on Pixel 4 XL and Nexus 5
  • OS: Android 10 for Pixel 4 XL and Android 6.0.1 for Nexus 5
1 Like

Hi royaltigerrk,

Thanks for using Zoom SDK. Are you using Zoom default UI or Custom UI? If you are using Custom UI, you could call rotateMyVideo interfaces in onResume listener

Hope this helps. Thanks!

I am using the Custom UI.

So I have to check to see what the video’s current orientation is and then rotateMyVideo to the correct orientation? But why is it that my Activity is set as portrait as default, but the camera is still in landscape mode?

Hi royaltigerrk,

Thanks for the reply. You may refer to the implementation in our demo app to configure the orientation(https://github.com/zoom/zoom-sdk-android/blob/master/mobilertc-android-studio/sample/src/main/java/us/zoom/sdksample/inmeetingfunction/customizedmeetingui/video/MeetingVideoHelper.java#L47)

        Display display = ((WindowManager) context.getSystemService(Service.WINDOW_SERVICE)).getDefaultDisplay();
        int displayRotation = display.getRotation();
        mInMeetingVideoController.rotateMyVideo(displayRotation);

And the corresponding part that calls this method in our demo app is here: https://github.com/zoom/zoom-sdk-android/blob/master/mobilertc-android-studio/sample/src/main/java/us/zoom/sdksample/inmeetingfunction/customizedmeetingui/MyMeetingActivity.java#L616

Hope this helps. Thanks!

I am using Default Ui its not working for me. Any solutions ??

Hi @premium,

Thanks for the reply. Could you elaborate the issue you are facing? What is the SDK version you are using? How to reproduce this with our demo app?

Thanks!

Yes you can produce this from your demo app. It will open in potrait although you have specified in landscape in manifest. Waiting for your reply soon

Hi @premium,

Thanks for the reply. Yes, if you are using the default UI, the meeting UI cannot be fixed. It will rotate based on the device’s orientation.

Thanks!

I have created an android app, all goes fine except orientation,
if mobile is locked the screen rotation then as video get started, my predefined landscape orientation still get turned to portrait.
Please help

Hi @nilefire501,

Thanks for using Zoom SDK. The meeting UI cannot be fixed so it will rotate based on the device’s orientation.

Thanks!