# How join meeting with default pin to host?

**URL:** <https://devforum.zoom.us/t/how-join-meeting-with-default-pin-to-host/30795>\
**Category:** Meeting SDK\
**Created:** [September 20, 2020, 2:55pm UTC](https://devforum.zoom.us/t/how-join-meeting-with-default-pin-to-host/30795 "2020-09-20T14:55:57Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![shpy2001](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shpy2001/32/3536_2.png) [@shpy2001](https://devforum.zoom.us/u/shpy2001)\
**Post date:** [September 20, 2020, 2:55pm UTC](https://devforum.zoom.us/t/how-join-meeting-with-default-pin-to-host/30795/1 "2020-09-20T14:55:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [September 21, 2020, 3:59pm UTC](https://devforum.zoom.us/t/how-join-meeting-with-default-pin-to-host/30795/2 "2020-09-21T15:59:05Z")

</div>

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](https://marketplace.zoom.us/docs/sdk/native-sdks/introduction) 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!

---

<div class="post-metadata">

**Author:** ![janTatang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jantatang/32/33803_2.png) [@janTatang](https://devforum.zoom.us/u/janTatang)\
**Post date:** [November 15, 2021, 5:18am UTC](https://devforum.zoom.us/t/how-join-meeting-with-default-pin-to-host/30795/3 "2021-11-15T05:18:12Z")

</div>

So, how to obtain user ID of the host?

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [November 15, 2021, 7:11pm UTC](https://devforum.zoom.us/t/how-join-meeting-with-default-pin-to-host/30795/4 "2021-11-15T19:11:27Z")

</div>

Hi @janTatang,

You can determine whether or not a user is the host by calling [`getInMeetingUserRole`](https://marketplacefront.zoom.us/sdk/meeting/android/us/zoom/sdk/InMeetingUserInfo.html#getInMeetingUserRole--). Whenever the host of a meeting changes, the [`onMeetingHostChanged`](https://marketplacefront.zoom.us/sdk/meeting/android/us/zoom/sdk/InMeetingServiceListener.html#onMeetingHostChanged-long-) callback will be triggered with the ID of the new host.

Thanks!

---

<div class="post-metadata">

**Author:** ![janTatang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jantatang/32/33803_2.png) [@janTatang](https://devforum.zoom.us/u/janTatang)\
**Post date:** [November 16, 2021, 2:37am UTC](https://devforum.zoom.us/t/how-join-meeting-with-default-pin-to-host/30795/5 "2021-11-16T02:37:31Z")

</div>

> [@jon.zoom](#):
>
> getInMeetingUserRole

is there any documentation `getInMeetingUserRole` for ios?

---

<div class="post-metadata">

**Author:** ![janTatang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jantatang/32/33803_2.png) [@janTatang](https://devforum.zoom.us/u/janTatang)\
**Post date:** [November 16, 2021, 3:15am UTC](https://devforum.zoom.us/t/how-join-meeting-with-default-pin-to-host/30795/6 "2021-11-16T03:15:32Z")

</div>

> [@jon.zoom](#):
>
> `getInMeetingUserRole`

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

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [November 16, 2021, 7:22pm UTC](https://devforum.zoom.us/t/how-join-meeting-with-default-pin-to-host/30795/7 "2021-11-16T19:22:50Z")

</div>

Hi @janTatang,

For iOS you would use the [`isHost`](https://marketplacefront.zoom.us/sdk/meeting/ios/interface_mobile_r_t_c_meeting_user_info.html#ad3e3dc08fffd3a95cff632c9bc59da19) property. You can check a userId on iOS via the [`isHostUser`](https://marketplacefront.zoom.us/sdk/meeting/ios/category_mobile_r_t_c_meeting_service_07_user_08.html#ade217f5dfa2d14a9a8beb6e1c85b5cd9) method.

Thanks!

---

<div class="post-metadata">

**Author:** ![janTatang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jantatang/32/33803_2.png) [@janTatang](https://devforum.zoom.us/u/janTatang)\
**Post date:** [November 17, 2021, 2:56am UTC](https://devforum.zoom.us/t/how-join-meeting-with-default-pin-to-host/30795/8 "2021-11-17T02:56:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [November 17, 2021, 6:46pm UTC](https://devforum.zoom.us/t/how-join-meeting-with-default-pin-to-host/30795/9 "2021-11-17T18:46:13Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![janTatang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jantatang/32/33803_2.png) [@janTatang](https://devforum.zoom.us/u/janTatang)\
**Post date:** [November 26, 2021, 5:08pm UTC](https://devforum.zoom.us/t/how-join-meeting-with-default-pin-to-host/30795/10 "2021-11-26T17:08:00Z")

</div>

ok, thank you for your information/explanation

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [November 29, 2021, 6:08pm UTC](https://devforum.zoom.us/t/how-join-meeting-with-default-pin-to-host/30795/11 "2021-11-29T18:08:48Z")

</div>

You are very welcome, glad I could help!
