MediaSFU React Native
    Preparing search index...

    Function banParticipant

    • Bans a participant from the session by removing them from the active and display names arrays, updating the participants list, and reordering the streams.

      Parameters

      Returns Promise<void>

      A promise that resolves when the participant has been banned and streams reordered.

      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,
      },
      });