A uiview with my video

Hi. In my previous questions you helped me a lot! Thanks! Now i have fully custom UIView in meeting. But i have another one simple question. I read forum a lot, but unfortunately I couldn’t find answer. how can I show the user himself? (small view in top right corner). Here is code how i show custom uiview

Hey @hortondima

I am super happy to hear :slight_smile: It is good to see you again!

Your code looks good except that you are using a MobileRTCActiveVideoView. The ActiveVideoView is the video view that would be the current “active” speaker in the meeting. For example, this would be the user who gets put into the front of your meeting when you are using the Zoom app. To render your own camera, try using a MobileRTCVideoView instead.

Then you should also be able to use MobileRTC.shared().getMeetingService()?.myselfUserID() when passing the userID in, so that you do not have to hardcode the ID.

Something similar to this:

if let localUserID = MobileRTC.shared().getMeetingService()?.myselfUserID() {
let videoView = MobileRTCVideoView(frame: self.view.bounds)
videoView.showAttendeeVideo(withUserID: localUserID)
view.addSubview(videoView)
}

The code above is not constrained to the corner but should render the users video.

Let me know if that works!
Thanks!
Michael

1 Like
  1. Preview, it works, but it dissapear about few seconds(it’s logical))
  2. VideoView (which i need) doesn’t work and i have no idea why.
  3. Active. It works too, but i don’t need it either

withUserId i will pass in future, it isn’t a problem. the problem is in VideoView and how to show user in front camera. i hope you’ll help. thanks a lot for all your answers

Hey @hortondima

I see! Thank you for providing the screenshots, these are very helpful.

Sometimes a race condition can exist between showing your custom meeting ui, joining a meeting, and rendering the stream. If showAttendeeVideo is called before the Zoom backend has recognized the joining of the meeting, or if showAttendeeVideo is called before the custom meeting ui is fully loaded, the view will not render properly.

onInitMeetingView is called before the current user has actually entered the meeting. Try and call your code from within onMeetingError to test if this is the case.

Lemme know if anything changes.
Thanks!
Michael

you are the best! thanks a lot!

1 Like

@hortondima

Awesome! I am so glad to hear it is working!

Let us know if you have any other questions.

Thanks!
Michael

1 Like

Hi @hortondima ,

I am in a process of implementing the custom UI. I am unable to get participant’s videos. If possible can you share the sample code of your implementation for customUI? so that it would be helpful.

Thanks,
Srikanth.

Hey @hortondima,

It is nice to see you again :slight_smile:

We do not yet have a public demo of customUI in swift but there is a thread here that you might find useful: I want to add a custom button in the meeting option toolbar in my zoom app in ios. I see there are provisions to hide or show the toolbar or even specific buttons. But is there any way to add a custom button in the toolbar under more in IOS? - #9 by Michael_Condon

Thanks!
Michael