{"id":4323,"date":"2021-11-16T20:59:11","date_gmt":"2021-11-16T12:59:11","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4323"},"modified":"2025-04-10T20:31:57","modified_gmt":"2025-04-10T12:31:57","slug":"pin-user","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/android-toolkit\/pin-user\/","title":{"rendered":"Pin User: Android SDK &#8211; Video API"},"content":{"rendered":"\n<p>The <code>EnxRoom.pinUsers()<\/code> method allows the Moderator to pin a user(s) to the <a href=\"..\/active-talkers\/\">Active Talker List<\/a> irrespective of the user&#8217;s activity level. A pinned user&#8217;s Stream is always published in the Room even if they are not talking. The inactive pinned users are placed in the Active Talker List after the actively talking users in a descending order based on the activity level with the most active talker on top. The total number of pinned users in a Room is restricted to (<code>max_active_talkers<\/code> &#8211; 1) based on the <a rel=\"noreferrer noopener\" href=\"\/developer\/video-api\/server-api\/rooms-route\/#create-room\" target=\"_blank\">Room configuration<\/a>. <\/p>\n\n\n\n<p>On joining a Room, the user is notified via <code>onRoomConnected<\/code> event with <a href=\"\/developer\/video-api\/client-api\/appendix\/#room-meta\">Room Meta Information<\/a>, which contains the list of pinned users as <code>\"pinnedUsers\": [ \/*client-ids*\/ ]<\/code>.<\/p>\n\n\n\n<p>The <code>EnxRoom.unpinUsers()<\/code> method is used to unpin the user(s).<\/p>\n\n\n\n<p><strong>Class:<\/strong> <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Methods:<\/strong><\/p>\n\n\n\n<ul><li><code>public void pinUsers(List&lt;String&gt; clientIds<\/code>)<\/li><li><code>public void unpinUsers(List&lt;String&gt; clientIds)<\/code><\/li><\/ul>\n\n\n\n<p><strong>Parameters: <\/strong><\/p>\n\n\n\n<ul><li><code>clientIds<\/code> &#8211; Array of Client IDs of users whose streams need to be pinned or unpinned.<\/li><\/ul>\n\n\n\n<p><strong>Callbacks:<\/strong><\/p>\n\n\n\n<ul><li><code>onAckPinUsers<\/code>&nbsp;\u2013 Acknowledgment to the Moderator when the users are pinned.<\/li><li><code>onAckUnpinUser<\/code>s&nbsp;\u2013 Acknowledgment to the Moderator when the users are unpinned.<\/li><li>o<code>nPinnedUsers<\/code> &#8211;&nbsp;Notification to everyone in the Room with an updated list of pinned users.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">List&lt;String&gt; clientIds = new ArrayList&lt;&gt;(); \nclientIds.add(\"clientId1\");\nclientIds.add(\"clientId2\");\n \nenxRoom.pinUsers(clientIds);\t\/\/ To pin\nenxRoom.unpinUsers(clientIds);\t\/\/ To unpin\n\n\/\/ Moderator is acknowledged for pinning user\npublic void onAckPinUsers(JSONObject jsonObject){ \n\n}\n\n\/\/ Moderator is acknowledged for unpinning user\npublic void onAckUnpinUsers(JSONObject jsonObject){ \n\n}\n\n\/\/ Everyone is notified wtih updated pinned list\npublic void onPinnedUsers(JSONObject jsonObject){ \n\n}<\/pre>\n\n\n\n<p><strong>Error Codes &amp; Exceptions:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Code<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>5003<\/td><td>Unauthorized Access. When a user with <code>participant<\/code> role invokes <code>pinUser()<\/code> or <code>unpinUser()<\/code>.<\/td><\/tr><tr><td>5126<\/td><td>Invalid client IDs passed.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<p>\u2190 <a href=\"..\/participant-role-switch\/\">Change Participant Role<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-center\"><a href=\"..\/\">Index<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-right\"><a href=\"..\/spotlight-user\/\"><\/a><a href=\"..\/spotlight-user\/\">Spotlight<\/a> \u2192<a href=\"\/developer\/how-to-use\/\"><\/a><\/p>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The EnxRoom.pinUsers() method allows the Moderator to pin a user(s) to the Active Talker List irrespective of the user&#8217;s activity level. A pinned user&#8217;s Stream is always published in the Room even if they are not talking. The inactive pinned users are placed in the Active Talker List after the actively talking users in a descending order based on the activity level with the most active talker on top. The&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3740,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ub_ctt_via":""},"featured_image_src":null,"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"featured":false,"featured-large":false},"uagb_author_info":{"display_name":"vcxdevwpadmin","author_link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/author\/vcxdevwpadmin\/"},"uagb_comment_info":0,"uagb_excerpt":"The EnxRoom.pinUsers() method allows the Moderator to pin a user(s) to the Active Talker List irrespective of the user&#8217;s activity level. A pinned user&#8217;s Stream is always published in the Room even if they are not talking. The inactive pinned users are placed in the Active Talker List after the actively talking users in a&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4323"}],"collection":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/comments?post=4323"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4323\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3740"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}