breakoutRoomUpdated

Handles breakout room updates based on the received data and parameters.

Parameters:

  • options (BreakoutRoomUpdatedOptions): Contains:

  • data: Breakout room update data with information like room status and participants.

  • parameters: Provides access to state and update functions, including:

    • breakOutRoomStarted, breakOutRoomEnded: Track breakout room states.

    • islevel: Indicates the user's permission level (e.g., host, participant).

    • participantsAll, participants: Lists of all and active participants in the room.

    • Update functions to change room states, participants, and meeting display type.

Workflow:

  1. Host Room Update:

    • If the data is for the host (data.forHost), it updates the host's room and triggers a screen update.

  2. Participant Updates for Level 2 (Host/Moderator):

    • Updates the participant list if the user has a level 2 role and data for members is available.

  3. Room Status Change:

    • If the room status is "started":

      • Sets breakOutRoomStarted to true and updates display to show all participants.

      • Triggers a port restart for level 2 users.

    • If the room status is "ended":

      • Sets breakOutRoomEnded to true and restores the previous meeting display type.

Example Usage:

val data = BreakoutRoomUpdatedData(
forHost = true,
newRoom = 1,
status = "started",
breakoutRooms = emptyList(),
members = listOf(
Participant(name = "John", audioID = "a1", videoID = "v1", isBanned = false)
)
)

val parameters = object : BreakoutRoomUpdatedParameters {
override val breakOutRoomStarted: Boolean = false
override val breakOutRoomEnded: Boolean = false
override val meetingDisplayType: String = "individual"
// Additional required updates and properties...
}

val options = BreakoutRoomUpdatedOptions(data = data, parameters = parameters)

breakoutRoomUpdated(options)

Error Handling:

  • If an error occurs during the update process, it prints the error message in debug mode.