CustomUI in swift project

I successfully impletemented Zoom SDK in my project. I can start and join meetings.

I want to use my own custom UI for my project. So I followed the documentation, meeting starts but I can’t see the custom ui, the delegate function onInitMeetingView are not called.

  1. In my MainViewController:
class MainViewController: MobileRTCCustomizedUIMeetingDelegate {

     func startMeeting() {
        //enable customUI as document stated
        guard let ms = MobileRTC.shared()?.getMeetingSettings() else {return}
        ms.enableCustomMeeting = true
        // My api call function to start the meeting, this is working with the default UI
        startMyMeeting()
     }

    // delegate functions:
     func onInitMeetingView() {
            let storyboard = UIStoryboard(name: "Zoom", bundle: Bundle.main)
            let vc = storyboard.instantiateInitialViewController()! as! CustomInstantMeetingViewController
            self.customMeetingVC = vc
            addChild(self.customMeetingVC!)
            customMeetingVC!.view.frame = self.view.bounds
            view.addSubview(customMeetingVC!.view)
            customMeetingVC!.didMove(toParent: self)
        }
        
        func onDestroyMeetingView() {
            self.customMeetingVC?.willMove(toParent: nil)
            self.customMeetingVC?.view.removeFromSuperview()
            self.customMeetingVC?.removeFromParent()
            self.customMeetingVC = nil
        }
}

Hi ssaylanc,

Thanks for using Zoom SDK. Are you getting any errors? Or everything is working fine (the meeting has started), but just the UI does not show up? May I inquire which SDK version are you using?

Thanks!

Hi Carson,

Version : v4.4.55130.0712

I don’t get any errors, meeting has started but Custom UI did not displayed.
I set tracepoints to onInitMeetingView and onDestroyMeetingView, they are not getting called.

Edit: I managed to launch my customUI with assigning:

guard let ms = MobileRTC.shared()?.getMeetingService() else {return}
ms.delegate = self

I have the host and the participant, but I can’t get the videoView display the participant and the host.

@IBOutlet weak var participantView: MobileRTCVideoView!

func onSinkMeetingActiveVideo(_ userID: UInt) {
        showAttendeeVideo(videoView: participantView, withUserId: userID)
}

func showAttendeeVideo(videoView: MobileRTCVideoView, withUserId userID: UInt) {
       
        videoView.showAttendeeVideo(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)
    }

Hi Carson,

I did manage to get the attendee’s videoView visible. Bu I couldn’t find how to activate local preview. For Android SDK there is `addPreviewVideoUnit. How can I activate local preview for iOS?

Edit1: It seems that there is bug, when a meeting started with using ZAK video muted by default.

Edit2: I tried setting videoView to class MobileRTCPreviewVideoView. But no video displayed on the video.

Hi ssaylanc,

Thanks for the reply. For showing the active video view, you may refer to the implementation here:

The video muted by default is a known issue and we will fix that in the next release, which is coming very soon.

Hope this helps. Thanks!

Hi,
I am working on zoom iOS swift. I need help with zoom custom meeting swift code. We have already integrated start ans join meeting. Now we want custom meeting ui and share screen functionality.

can anyone help with that?

@ssaylanc

Hi,
I am working on zoom iOS swift. I need help with zoom custom meeting swift code. We have already integrated start ans join meeting. Now we want custom meeting ui and share screen functionality.
can anyone help with that?

thanks

Hi @eldhose.m,

Thanks for the reply. Please see my reply in Zoom Custom UI ans screen sharing IOS swift and I will provide further assistance over there.

Thanks!