Bans a participant from the session by removing them from the active and display names arrays, updating the participants list, and reordering the streams.
The options for banning a participant.
A promise that resolves when the participant has been banned and streams reordered.
Service to handle banning a participant from the session.
Name
BanParticipant
Description
This service provides a method to remove a participant from active lists and update the session's participant array, followed by reordering the streams.
Method
banParticipant
Async
Param: options
The options for banning a participant.
Param: options.name
The name of the participant to be banned.
Param: options.parameters
Parameters required for the banning operation.
Param: options.parameters.activeNames
Array of active participant names.
Param: options.parameters.dispActiveNames
Array of display participant names.
Param: options.parameters.participants
Array of current session participants.
Param: options.parameters.updateParticipants
Function to update the participants array.
Param: options.parameters.reorderStreams
Function to reorder the streams after removing the participant.
Returns
A promise that resolves when the participant has been banned and streams reordered.
Example