{"id":4965,"date":"2021-12-17T18:53:41","date_gmt":"2021-12-17T10:53:41","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4965"},"modified":"2022-04-08T19:24:27","modified_gmt":"2022-04-08T11:24:27","slug":"spotlight-user","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/flutter-toolkit\/spotlight-user\/","title":{"rendered":"Spotlight User: Flutter SDK &#8211; Video API"},"content":{"rendered":"\n<p>The <code>EnxRtc.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>EnxRtc.removeSpotlightUsers()<\/code> method is used to remove the spotlight from user(s) Streams.<\/p>\n\n\n\n<p><strong>Class:<\/strong> <code>EnxRtc<\/code><\/p>\n\n\n\n<p><strong>Methods:<\/strong><\/p>\n\n\n\n<ul><li><code>static Future&lt;void&gt; addSpotlightUsers(List&lt;dynamic&gt; clientIds)<\/code><\/li><li><code>static Future&lt;void&gt; removeSpotlightUsers(List&lt;dynamic&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 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\">EnxRtc.addSpotlightUsers(clientIds) \/\/ To spotlight\nEnxRtc.removeSpotlightUsers(clintIds) \/\/ To remove from spotlight\n\nEnxRtc.onAckAddSpotlightUsers=(Map&lt;dynamic,dynamic&gt; map){\n\n\/\/ Moderator who spotlights users is acknowledged\n\n};\nEnxRtc.onAckRemoveSpotlightUsers=(Map&lt;dynamic,dynamic&gt; map){\n\n\/\/ Moderator who removes users from Spotlight is acknowledged\n\n};\nEnxRtc.onUpdateSpotlightUsers=(Map&lt;dynamic,dynamic&gt; map){\n\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 EnxRtc.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":3755,"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 EnxRtc.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\/4965"}],"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=4965"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4965\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3755"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}