{"id":4166,"date":"2021-11-09T19:56:32","date_gmt":"2021-11-09T11:56:32","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4166"},"modified":"2025-04-11T21:11:50","modified_gmt":"2025-04-11T13:11:50","slug":"spotlight-user","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/web-toolkit\/spotlight-user\/","title":{"rendered":"Spotlight User: Web SDK &#8211; Video API"},"content":{"rendered":"\n<p>The\u00a0<code>EnxRoom.addSpotlightUsers()<\/code>\u00a0method allows the Moderator to spotlight a user which pushes the user\u2019s Stream to the top of\u00a0<a href=\"..\/active-talkers\/\">Active Talker List<\/a>\u00a0irrespective of the user\u2019s activity level. Spotlighting publishes the chosen user\u2019s Stream in the Room even if they are not talking. The Moderator can spotlight as many users as\u00a0<code>max_active_talkers<\/code>\u00a0defined in the\u00a0<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\u00a0<code><code>room-connected<\/code><\/code>\u00a0event with\u00a0<a href=\"\/developer\/video-api\/client-api\/appendix\/#room-meta\" target=\"_blank\" rel=\"noreferrer noopener\">Room Meta Information<\/a>, which contains the list of\u00a0<code>spotlightUsers<\/code>.<\/p>\n\n\n\n<p>Further active talkers list JSON received with&nbsp;<code>active-talkers-updated<\/code>&nbsp;callback has \u201cspotlight\u201d key with boolean value. Spotlighted users have&nbsp;<code>spotlight: true<\/code>&nbsp;in the list.<\/p>\n\n\n\n<p>The&nbsp;<code>EnxRoom.removeSpotlightUsers()<\/code>&nbsp;method is used to remove the spotlight from user(s) Streams.<\/p>\n\n\n\n<p><strong>Methods:<\/strong><\/p>\n\n\n\n<ul><li><code>EnxRoom.addSpotlightUsers(clientIds[], callback)<\/code>&nbsp;<\/li><li><code>EnxRoom.removeSpotlightUsers(clientIds[], callback)<\/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><li><code>Callback<\/code> &#8211; Returns response information of the requests in the JSON format: <code>{ result : 0, clients: [] }<\/code><ul><li><code>result: <\/code>0 if success. Some other appropriate error-code if error encountered.<\/li><li><code>clientIds<\/code>: Array of each Client IDs passed to put into Spotlight or removed from Spotlight. <\/li><\/ul><\/li><\/ul>\n\n\n\n<p><strong>Event Notifications:<\/strong><\/p>\n\n\n\n<ul><li><code>spotlight-users<\/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, users: [] }<\/code><ul><li><code>moderator_id<\/code>: Moderator\u2019s Id who updates the spotlight user list.<\/li><li><code>users<\/code>: Array of Client IDs of users who are spotlighted.<\/li><\/ul><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ To add Spotlight users\nroom.addSpotlightUsers(clientIDs, function(resp) {\n\t\/\/ resp json { \"result\": Number, \"clients\": [] }\n})\n\n\/\/ To remove users from Spotlight\nroom.removeSpotlightUsers(clientIDs, function(resp) {\n\t\/\/ resp json { \"result\": Number, \"clientIds\": [] }\n})\n\n\/\/ Everyone is notified with updated Spotlight user list\nroom.addEventListener('spotlight-users', function(event) {\n\t \/\/ event json { \"moderator_id\": String, \"users\": [] }\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 <\/p>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The\u00a0EnxRoom.addSpotlightUsers()\u00a0method allows the Moderator to spotlight a user which pushes the user\u2019s Stream to the top of\u00a0Active Talker List\u00a0irrespective of the user\u2019s activity level. Spotlighting publishes the chosen user\u2019s Stream in the Room even if they are not talking. The Moderator can spotlight as many users as\u00a0max_active_talkers\u00a0defined in the\u00a0Room Configuration. On joining a Room, the user is notified via\u00a0room-connected\u00a0event with\u00a0Room Meta Information, which contains the list of\u00a0spotlightUsers. Further active talkers&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3724,"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\u00a0EnxRoom.addSpotlightUsers()\u00a0method allows the Moderator to spotlight a user which pushes the user\u2019s Stream to the top of\u00a0Active Talker List\u00a0irrespective of the user\u2019s activity level. Spotlighting publishes the chosen user\u2019s Stream in the Room even if they are not talking. The Moderator can spotlight as many users as\u00a0max_active_talkers\u00a0defined in the\u00a0Room Configuration. On joining a Room, the&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4166"}],"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=4166"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4166\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3724"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}