Customize ui video integeration

hi
thanks for reading this question. I want to use custom UI in meeting feature so I implemented a controller in my project and on onInitMeetingView I perform a segue to show that controller. I found out for showing video of myself or another user there is a class named MobileRTCActiveVideoView so I put a view on the storyboard and change the class to MobileRTCActiveVideoView but the problem is I did not found anything to show video or connect it to the SDK. also, there is a delegate named MobileRTCVideoServiceDelegate but again I can’t understand how to work with it. I also recommend completing the documentation of this part because it’s a little confusing. for more information I use swift and I read all of objective c project sample
best regards

1 Like

Hi amirbt,
Thanks for the post. Pardon the inconvenience caused by the insufficient information provided in the doc. We are improving our doc and please feel free to provide any feedbacks or suggestions on how we can make our doc better.

Regarding your questions, just would like to confirm:
Q1: You are developing with Custom UI and you would like to know how to show active video with MobileRTCActiveVideoView?
Q2: What is MobileRTCVideoServiceDelegate and how does it work?

I will work with the engineer and get back to you with answers. Thanks!

hi
thanks for replaying
yes they are my questions and we are using zoom as a main service and its very important for me to get answers as soon as possible
thank you so much for your help

I have the same issue. Can someone from zoom provide clear steps on how to accomplish this and if it is a bug in zoom then fix it quickly because we need this feature and it is delaying us. Thank you

Hi,
Thanks for the reply. I have consulted our engineer regarding your questions:

Q1: You are developing with Custom UI and you would like to know how to show active video with MobileRTCActiveVideoView?

First of all, we would like to suggest using code to implement the UI instead of using the storyboard, it might lead to some issues when using storyboards for custom UI. Please refer to our demo code for the sample of how to implement each UI component in Custom UI.

The active video view must be called and shown after the meeting started. And regarding the usage and implementation of the Active Video View, the following code snippet in our demo would be helpful:

First, implement the viewDidLoad

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self.view addSubview:self.videoView];
}

Then implement the videoView:

- (MobileRTCActiveVideoView*)videoView
{
    if (!_videoView)
    {
        _videoView = [[MobileRTCActiveVideoView alloc] initWithFrame:self.view.bounds];
        [_videoView setVideoAspect:MobileRTCVideoAspect_PanAndScan];
    }
    return _videoView;
}

When you finish using the video view, set it to be nil:

- (void)dealloc
{
    self.videoView = nil;
    [super dealloc];
}

Regarding the callback of the active video view, you may find the following method useful:https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/CustomMeeting/CustomMeetingViewController%2BMeetingDelegate.m#L13

- (void)onSinkMeetingActiveVideo:(NSUInteger)userID
{
//    self.shrinkVC.activeVideoID = userID;
    [self updateVideoOrShare];
}

Q2: What is MobileRTCVideoServiceDelegate and how does it work?

The MobileRTCVideoServiceDelegate contains all callback that is related to the video. You may implement the callback to handle different cases/events based on your needs. The following link contains the methods that we have in MobileRTCVideoServiceDelegate: https://zoom.github.io/zoom-sdk-ios/_mobile_r_t_c_meeting_delegate_8h_source.html
And here is the implementation example: https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/SDKPresenters/how_to_use_inmeeting_function/meeting_callback/SDKStartJoinMeetingPresenter%2BVideoServiceDelegate.m

Since this topic is a broad topic thus the above info might not cover everything. Please feel free to let me know if you have any other questions. I have also requested the doc team to enhance the doc for Custom UI.

Thanks!