{"id":4326,"date":"2021-11-16T21:05:31","date_gmt":"2021-11-16T13:05:31","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4326"},"modified":"2025-04-04T21:29:25","modified_gmt":"2025-04-04T13:29:25","slug":"spotlight-user","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/android-toolkit\/spotlight-user\/","title":{"rendered":"Spotlight User: Android SDK &#8211; Video API"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>The <code>EnxRoom.addSpotlightUsers()<\/code> method allows the Moderator to spotlight a user which pushes the user&#8217;s Stream to the top of <a href=\"\/developer\/video-api\/client-api\/android-toolkit\/active-talkers\/\">Active Talker List<\/a> irrespective of the user&#8217;s activity level. Spotlighting publishes the chosen user&#8217;s Stream in the Room even if they are not talking. The Moderator can spotlight as many users as  <code>max_active_talkers<\/code>\u00a0defined in the <a rel=\"noreferrer noopener\" href=\"https:\/\/www.enablex.io\/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 rel=\"noreferrer noopener\" href=\"https:\/\/www.enablex.io\/developer\/video-api\/client-api\/appendix\/#room-meta\" target=\"_blank\">Room Meta Information<\/a>, which contains the list of <code>spotlightUsers<\/code>.<\/p>\n\n\n\n<p>Further active talkers list JSON received with <code>onActiveTalkersUpdated<\/code> callback has &#8220;spotlight&#8221; key with boolean value. Spotlighted users have <code>spotlight: true<\/code> in the list. <\/p>\n\n\n\n<p>The <code>EnxRoom.removeSpotlightUsers()<\/code> method is used to remove the spotlight from user(s) Streams.<\/p>\n\n\n\n<p><strong>Class:<\/strong> EnxRoom<\/p>\n\n\n\n<p><strong>Methods:<\/strong><\/p>\n\n\n\n<ul><li><code>public void addSpotlightUsers(List clientIds)<\/code>&nbsp;<\/li><li><code>public void removeSpotlightUsers(List clientIds)<\/code>&nbsp;<\/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 are spotlighted or removed from the spotlight.<\/li><\/ul>\n\n\n\n<p><strong>Callbacks<\/strong>:<\/p>\n\n\n\n<ul><li><code>onAckAddSpotlightUsers <\/code>&#8211; Acknowledgment to the Moderator when spotlight request is received with the following JSON <code>{ \"result\": 0,  clients: [] }: <\/code><ul><li><code>result: <\/code>0 for success.<\/li><li><code>clients<\/code>: Array of Client IDs being added.<\/li><\/ul><\/li><li><code>onAckRemoveSpotlightUsers <\/code>&#8211; Acknowledgment to the Moderator when spotlight removal request is received with the following JSON <code>{ \"result\": 0, clients: [] }<\/code>:<ul><li><code>result: <\/code>0 for success.<\/li><li><code>clients: <\/code>Array of Client IDs being added.<\/li><\/ul><\/li><li><code>onUpdateSpotlightUsers<\/code>&#8211;&nbsp;Notification to everyone in the Room when the spotlighted user list update is received with the following JSON <code>{ \"moderator_id\": String, clients: [] }<\/code>:<ul><li><code>moderator_id<\/code>: Moderator&#8217;s Id who updates the spotlight user list.<\/li><li><code>clients<\/code>: Array of Client IDs of users who are spotlighted.<\/li><\/ul><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">List<string> clientIds = new ArrayList&lt;&gt;(); \nclientIds.add(\"clientId1\");\nclientIds.add(\"clientId2\");\n \nenxRoom.addSpotlightUsers(clientIds);\t\/\/ To spotlight\nenxRoom.removeSpotlightUsers(clientIds);\/\/ To remove from spotlight\n\n\/\/ Moderator who spotlights users is acknowledged \npublic void onAckAddSpotlightUsers (JSONObject jsonObject){ \n\t\/\/ JSON { \"result\": 0,  clients: [] }\n}\n\n\/\/ Moderator who removes users from Spotlight is acknowledged \npublic void onAckRemoveSpotlightUsers (JSONObject jsonObject){ \n\t\/\/ JSON { \"result\": 0,  clients: [] }\n}\n\n\/\/ Everyone is notified with updated Spotlight list\npublic void onUpdateSpotlightUsers(JSONObject jsonObject){ \n\t\/\/ JSON { \"moderator_id\": \"String\",  clients: [] }\n}<\/string><\/pre>\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=\"..\/pin-user\/\">Pin User<\/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=\"..\/room-mode-switch\/\">Room Mode Switch<\/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.addSpotlightUsers() method allows the Moderator to spotlight a user which pushes the user&#8217;s Stream to the top of Active Talker List irrespective of the user&#8217;s activity level. Spotlighting publishes the chosen user&#8217;s Stream in the Room even if they are not talking. The Moderator can spotlight as many users as max_active_talkers\u00a0defined in the Room Configuration. On joining a Room, the user is notified via onRoomConnected event with Room Meta&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.addSpotlightUsers() method allows the Moderator to spotlight a user which pushes the user&#8217;s Stream to the top of Active Talker List irrespective of the user&#8217;s activity level. Spotlighting publishes the chosen user&#8217;s Stream in the Room even if they are not talking. The Moderator can spotlight as many users as max_active_talkers\u00a0defined in the Room&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4326"}],"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=4326"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4326\/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=4326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}