Bans a participant from the session by removing them from the active and display names arrays, updating the participants list, and reordering the streams.
await banParticipant({ name: "John Doe", parameters: { activeNames: ["Alice", "Bob", "John Doe"], dispActiveNames: ["Alice", "John Doe"], participants: [ { name: "Alice", isActive: true }, { name: "Bob", isActive: true }, { name: "John Doe", isActive: true } ], updateParticipants: (updated) => setParticipants(updated), reorderStreams: reorderStreamFunction, },}); Copy
await banParticipant({ name: "John Doe", parameters: { activeNames: ["Alice", "Bob", "John Doe"], dispActiveNames: ["Alice", "John Doe"], participants: [ { name: "Alice", isActive: true }, { name: "Bob", isActive: true }, { name: "John Doe", isActive: true } ], updateParticipants: (updated) => setParticipants(updated), reorderStreams: reorderStreamFunction, },});
The options for banning a participant.
A promise that resolves when the participant has been banned and streams reordered.
Bans a participant from the session by removing them from the active and display names arrays, updating the participants list, and reordering the streams.
Example