How join meeting with default pin to host?

I build app for school, so i want student must watching teacher only (not auto change video when some else begin talk).

Hi @shpy2001, thanks for using our SDK.

This is possible on all platforms, but would require implementing a custom UI since it is not supported behavior using the SDK’s default UI. You would need to obtain the user ID of the host and assign their video to an instance of MobileRTCVideoView.

The specifics of the implementation would vary based on which platform you’re using, so be sure to check out our SDK docs to get an idea of how to get started with a custom UI for your platform. Feel free to reach out with any specific questions regarding your custom UI implementation!

Thanks!

So, how to obtain user ID of the host?

Hi @janTatang,

You can determine whether or not a user is the host by calling getInMeetingUserRole. Whenever the host of a meeting changes, the onMeetingHostChanged callback will be triggered with the ID of the new host.

Thanks!

is there any documentation getInMeetingUserRole for ios?

is getInMeetingUserRole work by checking a user ID? If that so is there any other ways to get it directly? Because it will take a long time if there’s a lot of attenders on the room and should checking every user ID

Hi @janTatang,

For iOS you would use the isHost property. You can check a userId on iOS via the isHostUser method.

Thanks!

So, I should check all user id from MobileRTC.shared().getMeetingService()?.getInMeetingUserList() using isHost or isHostUser? because when I debug the process callback onMeetingHostChanged not called when user first time enter the meeting room

Hi @janTatang,

Either of the approaches mentioned would work. The onMeetingHostChanged callback is only triggered when the host changes, so I would not expect it to happen when joining a meeting.

Thanks!

1 Like

ok, thank you for your information/explanation

You are very welcome, glad I could help!