Breakout Rooms

Breakout rooms allow participants to have focused side discussions outside the main video session. Users in a breakout room are treated as "paused" in the parent room until they return.

Creating Breakout Rooms

Create a Breakout Room

Call createBreakOutRoom: on your EnxRoom instance to create one or more breakout rooms. The creator receives an acknowledgment with the created room details; all moderators in the parent room are notified.

Detail Value
Class EnxRoom
Method -(void)createBreakOutRoom:(NSDictionary *)RoomDefinition

RoomDefinition Parameters

Key Type Description
RoomDefinition.participants Numeric Required. Total participants (min 2, max = parent max_active_talkers - 1).
RoomDefinition.audio Boolean Required. true to enable audio.
RoomDefinition.video Boolean Required. true to enable video (currently not supported).
RoomDefinition.canvas Boolean Required. true to enable canvas streaming.
RoomDefinition.share Boolean Required. true to enable screen sharing.
RoomDefinition.max_rooms Numeric Required. Number of breakout rooms to create.

Delegate Methods

Delegate Description
-room:didAckCreateBreakOutRoom Acknowledgment to the creator with created room info.
-room:didBreakoutRoomCreated Notification to all moderators in the parent room.
NSDictionary *roomDef = @{
    @"participants": @2,
    @"audio": @YES,
    @"video": @NO,
    @"canvas": @NO,
    @"share": @NO,
    @"max_rooms": @1
};

[EnxRoom createBreakOutRoom:roomDef];

- (void)room:(EnxRoom *)room didAckCreateBreakOutRoom:(NSArray *)data {
    // Creator: breakout room created
}

- (void)room:(EnxRoom *)room didBreakoutRoomCreated:(NSArray *)data {
    // All moderators notified
}

Error Codes

Code Meaning
5067 Breakout rooms are not supported in Lecture Mode.

Create and Auto-Invite

createAndInviteBreakoutRoom: creates one or more breakout rooms and randomly assigns participants from the parent room — no separate invite step is required. The creator receives a single acknowledgment when rooms are created and users have been distributed.

Detail Value
Class EnxRoom
Method -(void)createAndInviteBreakoutRoom:(NSDictionary *)RoomDefinition

Accepts the same RoomDefinition parameters as createBreakOutRoom:.

Delegate Methods

Delegate Description
-room:didAckCreateAndInviteBreakOutRoom Acknowledgment to the creator when rooms are created and users auto-assigned.
[EnxRoom createAndInviteBreakoutRoom:roomDef];

- (void)room:(EnxRoom *)room didAckCreateAndInviteBreakOutRoom:(NSArray *)data {
    // Rooms created and users auto-assigned
}

Error Codes

Code Meaning
5067 Breakout rooms are not supported in Lecture Mode.
Inviting Users

Invite Users to a Breakout Room

Parent room only: This method must be invoked from the parent room. Calling it from within a breakout room has no effect.

Call inviteToBreakOutRoom: to send one or more participants an invitation to join a specific breakout room. When force_join is true, the invitee is automatically connected without needing to accept the invitation (requires iOS SDK 2.0.1+).

Detail Value
Class EnxRoom
Method -(void)inviteToBreakOutRoom:(NSDictionary *)Invitee

Invitee Parameters

Key Type Description
Invitee.clients Array Array of Client IDs to invite.
Invitee.room_id String Room ID of the breakout room.
Invitee.force_join Boolean If true, the invitee is auto-joined without accepting (iOS SDK 2.0.1+).

Delegate Methods

Delegate Description
-room:didAckInviteBreakOutRoom Acknowledgment to the creator when the invitation is sent.
-room:didInvitationForBreakoutRoom Notification to the invited users.
-room:didBreakoutRoomInvited Notification to all moderators.
-room:didBreakoutroomjoining Notification to the invited participant when connected to the breakout room.
NSDictionary *invitee = @{
    @"clients": @[@"clientId1", @"clientId2"],
    @"room_id": @"BREAKOUT_ROOM_ID"
};

[EnxRoom inviteToBreakOutRoom:invitee];

- (void)room:(EnxRoom *)room didAckInviteBreakOutRoom:(NSArray *)data {
    // Invitation sent
}

- (void)room:(EnxRoom *)room didInvitationForBreakoutRoom:(NSArray *)data {
    // Invited users notified
}

- (void)room:(EnxRoom *)room didBreakoutRoomInvited:(NSArray *)data {
    // Moderators notified
}

- (void)room:(EnxRoom *)room didBreakoutroomjoining:(NSArray *)data {
    // Invited participant connected to breakout room
}
Joining and Rejecting

Join a Breakout Room

A user can only join a breakout room from the parent room, and can only be in one breakout room at a time. Call joinBreakOutRoom:withStreamInfo: to connect. The streamInfo dictionary specifies the media capabilities to join with.

Detail Value
Class EnxRoom
Method -(void)joinBreakOutRoom:(NSDictionary *)Joinee withStreamInfo:(NSDictionary *)streamInfo

Parameters

Key Type Description
Joinee.role String "participant" or "moderator".
Joinee.room_id String Room ID of the breakout room.
streamInfo.audio Boolean true to join with audio.
streamInfo.video Boolean true to join with video (not currently supported).

Delegate Methods

Delegate Description
-room:didConnectedBreakoutRoom Acknowledgment to the joiner when connected to the breakout room.
-room:didFailedJoinBreakOutRoom Notification to the joiner when the connection fails.
-room:didUserJoinedBreakoutRoom Notification to everyone in the breakout room when a new participant joins.
NSDictionary *joinee = @{
    @"role": @"participant",
    @"room_id": @"BREAKOUT_ROOM_ID"
};

NSDictionary *streamInfo = @{
    @"audio": @YES,
    @"video": @NO
};

[EnxRoom joinBreakOutRoom:joinee withStreamInfo:streamInfo];

- (void)room:(EnxRoom *)room didConnectedBreakoutRoom:(NSDictionary *)roomMetadata {
    // Joined the breakout room
}

- (void)room:(EnxRoom *)room didFailedJoinBreakOutRoom:(NSArray *)data {
    // Join failed
}

- (void)room:(EnxRoom *)room didUserJoinedBreakoutRoom:(NSArray *)data {
    // New participant joined breakout room
}

Reject a Breakout Room Invitation

Call rejectBreakOutRoom: with the breakout room ID to decline an invitation. The rejection is acknowledged to the user and all moderators are notified.

Detail Value
Class EnxRoom
Method -(void)rejectBreakOutRoom:(NSString *)roomId

Delegate Methods

Delegate Description
-room:didAckRejectBreakoutRoom Acknowledgment to the user when the rejection is processed.
didBreakoutRoomInviteRejected Notification to all moderators that the invitation was rejected.
[EnxRoom rejectBreakOutRoom:@"BREAKOUT_ROOM_ID"];

- (void)room:(EnxRoom *)room didAckRejectBreakoutRoom:(NSArray *)data {
    // Rejection acknowledged
}

- (void)room:(EnxRoom *)room didBreakoutRoomInviteRejected:(NSArray *)data {
    // Moderators notified
}
Parent Room Control

While a breakout session is active, moderators can pause, resume, mute, or unmute the parent room to manage its state independently of the breakout rooms.

Pause the Parent Room

Call pause to pause the parent room while participants are in breakout rooms. The moderator receives an acknowledgment when the room is muted.

Detail Value
Class EnxRoom
Method - (void)pause

Delegate Methods

Delegate Description
-room:didAckPause Acknowledgment to the caller when the parent room is paused.
[EnxRoom pause];

- (void)room:(EnxRoom *)room didAckPause:(NSArray *)data {
    // Parent room paused
    // { "msg": "Room muted", "result": 0 }
}

Resume the Parent Room

Call resume to resume the parent room after it has been paused.

Detail Value
Class EnxRoom
Method - (void)resume

Delegate Methods

Delegate Description
-room:didAckResume Acknowledgment to the caller when the parent room is resumed.
[EnxRoom resume];

- (void)room:(EnxRoom *)room didAckResume:(NSArray *)data {
    // Parent room resumed
}

Mute the Parent Room

Call muteRoom: to mute audio, video, or both in the parent room while breakout sessions are running.

Detail Value
Class EnxRoom
Method -(void)muteRoom:(NSDictionary *)muteInfo

muteInfo Parameters

Key Type Description
audio Boolean true to mute audio in the parent room.
video Boolean true to mute video in the parent room.

Delegate Methods

Delegate Description
-room:didAckMuteRoom Acknowledgment to the caller when the parent room is muted.
NSDictionary *muteInfo = @{ @"audio": @YES, @"video": @YES };
[EnxRoom muteRoom:muteInfo];

- (void)room:(EnxRoom *)room didAckMuteRoom:(NSArray *)data {
    // Parent room muted
}

Unmute the Parent Room

Call unmuteRoom: to restore audio, video, or both in the parent room.

Detail Value
Class EnxRoom
Method -(void)unmuteRoom:(NSDictionary *)unmuteInfo

Delegate Methods

Delegate Description
-room:didAckUnmuteRoom Acknowledgment to the caller when the parent room is unmuted.
NSDictionary *unmuteInfo = @{ @"audio": @YES, @"video": @YES };
[EnxRoom unmuteRoom:unmuteInfo];

- (void)room:(EnxRoom *)room didAckUnmuteRoom:(NSArray *)data {
    // Parent room unmuted
}
Disconnect and Destroy

Disconnect from a Breakout Room

Call disconnect on the breakout room instance to leave the breakout session. The user is automatically returned to the parent room on disconnect.

Detail Value
Class EnxRoom
Method - (void)disconnect

Delegate Methods

Delegate Description
-room:didDisconnectedBreakoutRoom Acknowledgment to the user when disconnected from the breakout room.
-room:didUserDisconnectedFromBreakoutRoom Notification to everyone remaining in the breakout room.
[EnxRoom disconnect];

- (void)room:(EnxRoom *)room didDisconnectedBreakoutRoom:(NSArray *)data {
    // { "moderatorId": "", "msg": "Breakout Room disconnected", "result": 0 }
}

- (void)room:(EnxRoom *)room didUserDisconnectedFromBreakoutRoom:(NSArray *)data {
    // { "clientId": "String", "name": "String", "room": "..." }
}

Clear All Breakout Rooms

Minimum SDK version: Available in iOS SDK 2.0.1 and later.

EnxRoom.clearAllBreakOutSession() disconnects all participants from every active breakout room and returns them to the parent room. The breakout room sessions are cleared but not permanently destroyed.

Delegate Methods

Delegate Description
didDisconnectedBreakoutRoom Fires on each participant when they are disconnected from the breakout room.
- (void)room:(EnxRoom *)room didDisconnectededBreakoutRoom:(NSArray *)data {
    // { "room_id": "String" }
}

Destroy All Breakout Rooms

Minimum SDK version: Available in iOS SDK 2.0.1 and later.

EnxRoom.destroyAllBreakOutSession() lets the moderator permanently destroy all active breakout rooms. All participants are disconnected from their breakout rooms and returned to the parent room. The parent room is automatically resumed and unmuted after destruction.

Delegate Methods

Delegate Description
didDisconnectedBreakoutRoom Fires on each participant when their breakout room is destroyed and they are returned to the parent room.
- (void)room:(EnxRoom *)room didDisconnectedBreakoutRoom:(NSArray *)data {
    // { "room_id": "String" }
}