Calling .switchToNextCamera() freezes participants video preview window

Description
Whenever I call .switchToNextCamera() in our custom UI code the participants video window freezes and no longer shows whats happening on the feed unless I tap on the video preview to expand it to full view, then it refreshes and resumes the feed. Is there a command I’m missing that I need to call afterwards?

switchCameraBtn = findViewById(R.id.zoom_switch_camera_btn);
    switchCameraBtn?.apply {
        // set onClick
        this.setOnClickListener {
            videoController.switchToNextCamera()
        }
    }

Which version?
I have tested on all and the issue exists:
• Versions tried:
□ v4.4.55968.0904
□ v4.4.56624.1028
□ v4.4.56656.1030
□ v4.4.57218.1211

Screenshots

Smartphone (please complete the following information):

  • Device: Acer A30/A40 Tablet, Google Pixel 3a, Samsung S7, Samsung SMT38 Tablet
  • OS: Android 7, 8, 9, 10
1 Like

Hi moe.hamoud.cdx,

Thanks for using Zoom SDK. Could you have a try with our demo app and see this issue occurs? Could you check whether the interface switchToNextCamera returns true? If you are able to reproduce this with our demo app, could you provide the steps to reproduce it?

Thanks!

Hey Carson, thanks for the quick reply and suggestions. The interface switchToNextCamera does in fact return true.

I’ll check the demo out in a bit and report back with my results.

Hey @Carson_Chen I tried the sample and calling switchToNextCamera does not freeze. What gives? All I’m calling in my click listener is switchToNextCamera() with no extra functionality, except I’m experiencing a freeze in my app whereas the sample app does not. Am I missing a specific setting somewhere that I’ve overlooked?

Hi moe.hamoud.cdx,

Thanks for the reply. If the switchToNextCamera returns true it means the action is successful. The code snippet you have provided in the original post seems good to me, based on the information provided, I could not tell why you are facing the freeze issue. I would suggest cross-reference with our demo app and see if there is anything that is misconfigured in your app and causing this issue.

Hope this helps. Thanks!

That’s what we’ll do, i’ll report back if I find anything that stands out that was misconfigured on our end in case someone finds that information useful.

Thanks for the support

Hey @Carson_Chen, is there any way to hide the Zoom Meeting UIs (bottom_toolbar and top toolbar) on command? For instance, our use case is to go into PiP mode (OS level) and hide UI in order to show the participants or the hosts window only?

Thanks for your continued support.

Hi moe.hamoud.cdx,

Thanks for the reply and pardon the late response. I see you are using the Custom UI, you have the full control of your UI components(When to show, when to hide). If you are looking for the option in Zoom default UI, you may set the no_titlebar and no_bottom_toolbar in https://zoom.github.io/zoom-sdk-android/us/zoom/sdk/MeetingOptions.html to be true to hide them. However, these settings need to be configured before start/join a meeting, it is not supported to show/hide them dynamically.

Hope this helps. Thanks!

I am experiment the same issue switching the camera.
Did you find the cause of the freeze?
How did you fix it?

@criva No unfortunately we did not find a solution or reason as to why this was happening. The solution for us was to move away from our custom UI implementation and return to using the Zoom UI which doesn’t freeze the camera when you tap the “switch” camera btn, and then we turned off the components we didn’t want active using the various configuration flags the SDK offers.

I hope the SDK team can find the time to investigate and see if they can replicate the issue.

Unfortunately customization of the Zoom UI is not enough for my needs. I have to use full customized UI.
I’ve just tried using the latest SDK (v5.0.24433.0616) and the issue is still present.

@Carson_Chen
I do not see any evident differences between Zoom sdk usage of my application and Sample app with Customized UI. The only difference is that my custom meeting activity is not hosting directly the MobileRTCVideoView component but it contains an androidx.viewpager2.widget.ViewPager2 that loads specific fragments hosting the MobileRTCVideoView components.
All is working fine except the switching camera in preview video unit.
Can I provide you some logs that could be useful for understand what is happening?