# How to Pin video to Host only ?

**URL:** <https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327>\
**Category:** Android\
**Created:** [August 9, 2017, 7:31am UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327 "2017-08-09T07:31:20Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![L11](https://avatars.discourse-cdn.com/v4/letter/l/c68b51/32.png) [@L11](https://devforum.zoom.us/u/L11)\
**Post date:** [August 9, 2017, 7:31am UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327/1 "2017-08-09T07:31:20Z")

</div>

Hi Team,

Is there any way we can pin video to Host ?

So that no matter who speaks, the screen only shows host video to all participants.

Thanks

---

<div class="post-metadata">

**Author:** ![Zoom\_Developer](https://avatars.discourse-cdn.com/v4/letter/z/eb8c5e/32.png) [@Zoom\_Developer](https://devforum.zoom.us/u/Zoom_Developer)\
**Post date:** [August 9, 2017, 4:59pm UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327/2 "2017-08-09T16:59:08Z")

</div>

Hi,

On Android SDK, you can take a look at:“boolean&nbsp;spotLightVideo(boolean&nbsp;on, long&nbsp;userId)”

Best

&nbsp;

---

<div class="post-metadata">

**Author:** ![L11](https://avatars.discourse-cdn.com/v4/letter/l/c68b51/32.png) [@L11](https://devforum.zoom.us/u/L11)\
**Post date:** [August 10, 2017, 5:46am UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327/3 "2017-08-10T05:46:53Z")

</div>

Thanks Wei,  
but how to get host id from code ?

---

<div class="post-metadata">

**Author:** ![Wei\_Guo1](https://avatars.discourse-cdn.com/v4/letter/w/ec9cab/32.png) [@Wei\_Guo1](https://devforum.zoom.us/u/Wei_Guo1)\
**Post date:** [August 11, 2017, 5:00am UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327/4 "2017-08-11T05:00:16Z")

</div>

Hi,&nbsp;

we don’t have an API to get user id directly, but you can do in this approach:

InMeetingUserList userList = mInMeetingService.getInMeetingUserList();

int count = userList.getUserCount();

for(int i=0; i\<count; i++) {

&nbsp; &nbsp; &nbsp;InMeetingUserInfo userInfo = userList.getUserInfoByIndex(i));

&nbsp; &nbsp; &nbsp;if(userInfo.isHost()) {

&nbsp; &nbsp; &nbsp; &nbsp; return userInfo.getUserId()

&nbsp; }

}

and then pass this id to spotLightVideo API.

Best

&nbsp;

---

<div class="post-metadata">

**Author:** ![sadhik](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sadhik](https://devforum.zoom.us/u/sadhik)\
**Post date:** [July 25, 2020, 5:00am UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327/5 "2020-07-25T05:00:51Z")

</div>

@Zoom_Developer where can i implement this “boolean spotLightVideo(boolean on, long userId)” method.note: i am using sample project in android sdk

---

<div class="post-metadata">

**Author:** ![sadhik](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sadhik](https://devforum.zoom.us/u/sadhik)\
**Post date:** [July 25, 2020, 5:02am UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327/6 "2020-07-25T05:02:34Z")

</div>

@Wei_Guo1 in where to implement this?

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [July 29, 2020, 11:11am UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327/7 "2020-07-29T11:11:51Z")

</div>

Hi @sadhik,

If you would like to spotlight a user, you could call the `spotLightVideo` interface when the meetingStatus returns from the callback `onMeetingStatusChanged` becomes `MeetingStatus.MEETING_STATUS_INMEETING`.

Thanks!

---

<div class="post-metadata">

**Author:** ![hodove9](https://avatars.discourse-cdn.com/v4/letter/h/3da27b/32.png) [@hodove9](https://devforum.zoom.us/u/hodove9)\
**Post date:** [September 24, 2021, 6:46am UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327/8 "2021-09-24T06:46:11Z")

</div>

Hello the userinfo.ishost is not working

---

<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 24, 2021, 3:56pm UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327/9 "2021-09-24T15:56:57Z")

</div>

Hi @hodove9, thanks for using the dev forum.

Can you please elaborate on what exactly is not working? Also, which version of the SDK are you using?

Thanks!

---

<div class="post-metadata">

**Author:** ![hodove9](https://avatars.discourse-cdn.com/v4/letter/h/3da27b/32.png) [@hodove9](https://devforum.zoom.us/u/hodove9)\
**Post date:** [October 6, 2021, 1:36pm UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327/10 "2021-10-06T13:36:11Z")

</div>

Hello, @jon.zoom I want to pin the host so that the video of host doesn’t change if other participants speak. I have used this [https://marketplace.zoom.us/docs/api-reference/zoom-api/users/user](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/user) API too to get user\_id but it is in string and pinvideo or spotlight needs long data type . How can I resolve this.

---

<div class="post-metadata">

**Author:** ![hodove9](https://avatars.discourse-cdn.com/v4/letter/h/3da27b/32.png) [@hodove9](https://devforum.zoom.us/u/hodove9)\
**Post date:** [October 6, 2021, 2:03pm UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327/11 "2021-10-06T14:03:31Z")

</div>

I am using this v5.5.1.1319 sdk version

---

<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:** [October 6, 2021, 6:26pm UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327/12 "2021-10-06T18:26:22Z")

</div>

Hi @hodove9,

The ID you should be using with the SDK is the one obtained from [`getUserID`](https://marketplacefront.zoom.us/sdk/meeting/macos/interface_zoom_s_d_k_user_info.html#a37c322176f5a144f670e7e429ffb6f0d). Please let me know if you are running into any issues with the value returned from this method and I’ll be more than happy to help.

Thanks!

---

<div class="post-metadata">

**Author:** ![hodove9](https://avatars.discourse-cdn.com/v4/letter/h/3da27b/32.png) [@hodove9](https://devforum.zoom.us/u/hodove9)\
**Post date:** [October 7, 2021, 7:05am UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327/13 "2021-10-07T07:05:18Z")

</div>

Hello,  
Where should I put the code to getUserID?  
Also isHost function is removed from InMeetingUserInfo

---

<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:** [October 7, 2021, 5:46pm UTC](https://devforum.zoom.us/t/how-to-pin-video-to-host-only/327/14 "2021-10-07T17:46:25Z")

</div>

Hi @hodove9,

You can call the above method from wherever you need to access the user ID, as long as you are already in a meeting when the code is run.

> Also isHost function is removed from InMeetingUserInfo

You can determine whether or not a user is the host of a meeting by calling [`isHostUser`](https://marketplacefront.zoom.us/sdk/meeting/android/us/zoom/sdk/InMeetingService.html#isHostUser-long-) with the userId of the user you would like to check.

Thanks!
