Display display = ((WindowManager) context.getSystemService(Service.WINDOW_SERVICE)).getDefaultDisplay();
int displayRotation = display.getRotation();
mInMeetingVideoController.rotateMyVideo(displayRotation);
This is working perfectly when the app is in the foreground. But when the user goes to the background and starts rotating the device then this method is not working even though we forcefully call that from some timer task or senior manager for getting events.
Is there any possibility to use checkVideoRotation to set the camera orientation when the app is in the background?
Smartphone :
Devices used for testing are OnePlus6, Pixel 2
OS: Android 10,11
Additional context
The orientation of the camera when the app is in the background while using Custom UI
Yeah sure.
While the app is in the foreground and if the user rotates his device his camera preview will be in the correct orientation on the other user’s screen because we are using checkVideoRotation which rotates the camera preview accordingly.
But when the zoom integrated app is going to the background state while the user is using some other app and then if he rotates the device to landscape then the video view of that user is getting tilted ( means the camera preview will be in the wrong orientation on the other person’s device).
Procedure to be Observed:
We need two devices to test this scenario. And on both devices join the same meeting and keep their video on. On-device one stay on the app and on the second device follow the below step after a few mins of the call starts
Steps to Reproduce:
On Device two press the home button so the app goes to the background state.
Make sure your device orientation is not fixed. Make sure auto-rotate is enabled
As you are on the home screen open any app like Youtube or Play store and rotate your device to Landscape mode
Now observe your view on device one it will be shown in an opposite or tilted direction
If we are in the foreground state and call checkVideoRotation which will rotate the preview and the view on the first device will look perfectly. But in the case of the above situation when the app is in background state the video is looking titled even we call checkVideoRotation
Will checkVideoRotation will work when the app is backgrounded?
We were able to consistently reproduce the behavior you are describing and will investigate this further. As soon as I have an update I will let you know.
Hi @jon.zoom@carson.zoom Any update on this, it is still causing an issue.
When the app is in the background the orientation of the video view changes for the other side of the user