The EnxRoom.addSpotlightUsers() method allows the Moderator to spotlight a user which pushes the user’s Stream to the top of Active Talker List irrespective of the user’s activity level. Spotlighting publishes the chosen user’s Stream in the Room even if they are not talking. The Moderator can spotlight as many users as max_active_talkers defined in the Room Configuration.

On joining a Room, the user is notified via onRoomConnected event with Room Meta Information, which contains the list of spotlightUsers.

Further active talkers list JSON received with didActiveTalkersUpdated callback has “spotlight” key with boolean value. Spotlighted users have spotlight: true in the list.

The EnxRoom.removeSpotlightUsers() method is used to remove the spotlight from user(s) Streams.

Class: EnxRoom

Methods:

  • -(void)addSpotlightUsers:(NSArray *_Nonnull)clientIds 
  • -(void)removeSpotlightUsers:(NSArray *_Nonnull)clientIds  

Parameters:

  • clientIds– Array of Client IDs of users whose streams are spotlighted or removed from the spotlight.

Delegate Methods:

  • -room:didAckAddSpotlightUsers – Acknowledgment to the Moderator when spotlight request is received with the following JSON { "result": 0, clients: [] }:
    • result: 0 for success.
    • clients: Array of Client IDs being added.
  • -room:didAckRemoveSpotlightUsers – Acknowledgment to the Moderator when spotlight removal request is received with the following JSON { "result": 0, clients: [] }:
    • result: 0 for success.
    • clients: Array of Client IDs being added.
  • -room:didUpdatedSpotlightUsers – Notification to everyone in the Room when the spotlighted user list update is received with the following JSON { "moderator_id": String, clients: [] }:
    • moderator_id: Moderator’s Id who updates the spotlight user list.
    • clients: Array of Client IDs of users who are spotlighted.
[enxRoom addSpotlightUsers:[clientID1, clientID2]];	// To add Spotlight
[enxRoom removeSpotlightUsers:[clientID1, clientID2]];	// To remove from Spotlight

-(void)room:(EnxRoom *_Nullable)channel didAckAddSpotlightUsers:(NSArray *_Nullable)data {
	// Moderator who adds users to Spotlight is acknowledged
	// data { "result": 0,  clients: [] }
}

-(void)room:(EnxRoom *_Nullable)channel didAckRemoveSpotlightUsers:(NSArray *_Nullable)data {
	// Moderator who removes users from Spotlight is acknowledged 
	// data { "result": 0,  clients: [] }
}

- (void)room:(EnxRoom *_Nullable)channel didUpdatedSpotlightUsers:(NSArray *_Nullable)data {
	// Everyone is notified wtih updated Spotlight list
	// data { "moderator_id": "String",  clients: [] }
}