{"id":4513,"date":"2021-11-24T21:09:13","date_gmt":"2021-11-24T13:09:13","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4513"},"modified":"2025-04-11T13:36:36","modified_gmt":"2025-04-11T05:36:36","slug":"spotlight-user","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/ios-toolkit\/spotlight-user\/","title":{"rendered":"Spotlight User: iOS SDK &#8211; Video API"},"content":{"rendered":"\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=\"..\/active-talkers\/#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 href=\"\/developer\/video-api\/server-api\/rooms-route\/#create-room\" target=\"_blank\" rel=\"noreferrer noopener\">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\" target=\"_blank\" rel=\"noreferrer noopener\">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>didActiveTalkersUpdated<\/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>-(void)addSpotlightUsers:(NSArray *_Nonnull)clientIds<\/code>&nbsp;<\/li><li><code>-(void)removeSpotlightUsers:(NSArray *_Nonnull)clientIds<\/code>&nbsp;&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>Delegate Methods<\/strong>:<\/p>\n\n\n\n<ul><li><code>-room:didAckAddSpotlightUsers<\/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>-room:didAckRemoveSpotlightUsers <\/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>-room:didUpdatedSpotlightUsers<\/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\">[enxRoom addSpotlightUsers:[clientID1, clientID2]];\t\/\/ To add Spotlight\n[enxRoom removeSpotlightUsers:[clientID1, clientID2]];\t\/\/ To remove from Spotlight\n\n-(void)room:(EnxRoom *_Nullable)channel didAckAddSpotlightUsers:(NSArray *_Nullable)data {\n\t\/\/ Moderator who adds users to Spotlight is acknowledged\n\t\/\/ data { \"result\": 0,  clients: [] }\n}\n\n-(void)room:(EnxRoom *_Nullable)channel didAckRemoveSpotlightUsers:(NSArray *_Nullable)data {\n\t\/\/ Moderator who removes users from Spotlight is acknowledged \n\t\/\/ data { \"result\": 0,  clients: [] }\n}\n\n- (void)room:(EnxRoom *_Nullable)channel didUpdatedSpotlightUsers:(NSArray *_Nullable)data {\n\t\/\/ Everyone is notified wtih updated Spotlight list\n\t\/\/ data { \"moderator_id\": \"String\",  clients: [] }\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\/\">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":3732,"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\/4513"}],"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=4513"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4513\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3732"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}