{"id":5016,"date":"2021-12-21T19:04:19","date_gmt":"2021-12-21T11:04:19","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=5016"},"modified":"2022-04-12T18:32:01","modified_gmt":"2022-04-12T10:32:01","slug":"spotlight-user","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/react-native-toolkit\/spotlight-user\/","title":{"rendered":"Spotlight User: React Native SDK \u2013 Video API"},"content":{"rendered":"\n<p>The <code>Enx.addSpotlightUsers()<\/code> method allows the Moderator to spotlight a user which pushes the user&#8217;s Stream to the top of <a href=\"..\/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>&nbsp;defined 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>Enx.removeSpotlightUsers()<\/code> method is used to remove the spotlight from user(s) Streams.<\/p>\n\n\n\n<p><strong>Class:<\/strong> Enx<\/p>\n\n\n\n<p><strong>Methods:<\/strong><\/p>\n\n\n\n<ul><li><code>Enx.addSpotlightUsers(clientIds)<\/code><\/li><li><code>Enx.removeSpotlightUsers(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 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>ackAddSpotlightUsersackResume<\/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>ackRemoveSpotlightUsers<\/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>updateSpotlightUsers<\/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\">ackAddSpotlightUsers\nackRemoveSpotlightUsers\nupdateSpotlightUsers\n\nEnx.addSpotlightUsers(clientIds)    \/\/Add spotlight to user\nEnx.removeSpotlightUsers(clientIds) \/\/Remove spotlight to user\n\n\nackAddSpotlightUsers:event=&gt;{\n \/\/ Moderator who spotlights users is acknowledged\n\n              }\n\nackRemoveSpotlightUsers:event=&gt;{\n \/\/ Moderator who removes users from Spotlight is acknowledged \n\n              }\n\nupdateSpotlightUsers:event=&gt;{\n\/\/ Everyone is notified with updated Spotlight list\n \n              }<\/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\/\"><\/a><a href=\"..\/room-mode-switch\/\">Switch Room Mode<\/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 Enx.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&nbsp;defined 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":3747,"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 Enx.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&nbsp;defined in the Room&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/5016"}],"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=5016"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/5016\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3747"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=5016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}