iOS : Zoom custom UI cannot able to see the screen shared by the host

Description
I have built an application that uses custom UI, am using MobileRTCVideoView to show the participant video and the host video, but if the host shares his/her screen I cannot able to see it. I can able to see only the host video, I cannot see the shared screen.

Hey @vignesh,

Thanks for using the dev forum! It is good to see you again :slight_smile:

To render sharing content you must use a MobileRTCActiveShareView instead of a generic MobileRTCVideoView. The code to render the view is very similar to the MobileRTCVideoView, but instead of using showAttendeeVideoWithUserID you would use showActiveShareWithUserID.

Let me know if you run into any issues there.
Thanks!
Michael

Hello @Michael_Condon,
Thanks for your reply, I tried using what you have mentioned, but the screen is not rendering. Am adding the code snippet, please check it and let me know what am doing wrong.

/** Declaring the variables **/

var participantView : MobileRTCActiveShareView = MobileRTCActiveShareView()

/** Getting the user id from this built in function **/

func onSinkMeetingActiveVideo(_ userID: UInt) {

    showAttendeeActiveShareView(videoView: participantView, userID: (MobileRTC.shared().getMeetingService()?.activeShareUserID())!)

}

/** This function I use to render the video view **/

func showAttendeeActiveShareView(videoView : MobileRTCActiveShareView, userID : UInt) {

    videoView.showActiveShare(withUserID: userID)
      
           guard let ms = MobileRTC.shared().getMeetingService() else {return}
           
           let size: CGSize = (ms.getUserVideoSize(userID))
           
           if __CGSizeEqualToSize(size, .zero) {
               return
           }
           videoView.setVideoAspect(MobileRTCVideoAspect_PanAndScan)
    
}

Hey @vignesh,

Try showing the active share within the callback onSinkMeetingActiveShare. Then pass in the userID from that function.

Let me know what happens.
Thanks!
Michael

Hello @Michael_Condon,
Tried it, still only the host video is shown, cannot able to see the screen shared by him.