Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [AzureCommunicationCalling] Local video render seems stuck in portrait mode #1153

Open
tompi opened this issue Jul 8, 2022 · 7 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Communication - Calling Server customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team

Comments

@tompi
Copy link

tompi commented Jul 8, 2022

Describe the bug
On some android devices, the camera does not respect the orientation of the app(when in landscape), and just shows a stretched portrait image. This is SEMI consistent, I have at least one test phone, huawei, where this USUALLY happens, but NOT always...

To Reproduce
Steps to reproduce the behavior: start the app with the device oriented in landscape.
Goto a page with a LocalVideoStream, and check the preview.

Code Snippet
var camera = _deviceManager.Cameras.First(c => c.CameraFacing == _cameraFacing);
_localVideoStream = new LocalVideoStream(camera, MainActivity.Instance);
_localVideoRenderer = new VideoStreamRenderer(_localVideoStream, MainActivity.Instance);
var renderingOptions = new CreateViewOptions(ScalingMode.Fit);
var nativeView = _localVideoRenderer.CreateView(renderingOptions);

Expected behavior
Camera renderer should show regular landscape preview.

Screenshots
Working ok on an old samsung galaxy s7, android 8
IMG_1845

Not looking good on a samsung galaxy tablet s6, android 11. Image is stretched, so MIGHT be landscape just rotated?
IMG_1846

Setup (please complete the following information):

  • OS: Android 8 and 11, probably a lot more, have seen it on a lot of phones
  • IDE : Rider
  • Version of the Library used: 2.3.0-beta.1
@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 8, 2022
@vcolin7
Copy link
Member

vcolin7 commented Jul 12, 2022

Hi @tompi, thanks for reporting this, I will pass it along to the team.

//cc @jsaurezlee-msft @gaobob-msft

@vcolin7 vcolin7 added Communication - Calling Server Client This issue points to a problem in the data-plane of the library. labels Jul 12, 2022
@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Jul 12, 2022
@vcolin7 vcolin7 removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that needs-team-attention This issue needs attention from Azure service team or SDK team labels Jul 12, 2022
@ghost ghost added the needs-team-attention This issue needs attention from Azure service team or SDK team label Jul 12, 2022
@jsaurezlee-msft
Copy link
Member

jsaurezlee-msft commented Jul 19, 2022

Hi @tompi thanks for the report. When you have this scenario and you are in a call with other participants, those participants see the video sideways and stretched also? I'm trying to see if this is something that happens only in the preview video of the phone, or if it's also affecting the way other participants see your video.

Also, did you started experiencing this on 2.3.0-beta.1 or it's happening on other versions of the SDK?

@tompi
Copy link
Author

tompi commented Sep 23, 2022

@jsaurezlee-msft sorry about the late reply, this happens only in local preview. Just tested on galaxy s8, still happening.

Not sure if this applies to previous versions of sdk.

This is probably related to the way Im managing orientation, my start page is portrait only, when I go to the page with video, I flip orientation to landscape only, probably this that creates a problem on some phones/tablets. Do you need a minimal repro app maybe?

@gaobob-msft
Copy link
Member

@tompi can you please do a quick check and see if the following listener is being triggered when you from portrait only to landscape only? https://developer.android.com/reference/android/view/OrientationEventListener

@rbuiten
Copy link

rbuiten commented Jul 25, 2023

is there any update for this? I do have the same behaviour. When I have my phone on a table and check for the orientation (by context.resources.configuration.orientation) the phone will print portrait. But the view does look like it renders in landscape. After I move the orientation (I pick up the phone) the view is updated correctly for both landscape and portrait. So, the initial state is wrong.

By the way, it's just a preview issue. The other participant doesn't see the wrong state.

@gaobob-msft
Copy link
Member

@rbuiten what version of the SDK are you using? CC: @yassirbisteni

@rbuiten
Copy link

rbuiten commented Jul 25, 2023

currently we are on 2.2.2, but we will go to the latest stable within a few weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Communication - Calling Server customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team
Projects
None yet
Development

No branches or pull requests

5 participants