Manage breakout rooms
The code on this page works with either the default UI or the custom UI.
Manage breakout room related functionality in the Meeting SDK for macOS. There are five distinct breakout room roles, each with its own associated interface and ability to perform certain pieces of breakout room functionality. These roles are assigned according to a combination of in-client meeting roles and the user's platform.
To know when you can have a user perform a given task, listen for role changes on the ZoomSDKNewBreakoutRoomControllerDelegate.
Listen for role changes
To know when the current user's role has changed, extend your class with the `ZoomSDKNewBreakoutRoomControllerDelegate``.
if let meetingService = ZoomSDK.shared().getMeetingService() {
meetingService.getNewBreakoutRoomController().delegate = self
}
extension ViewController: ZoomSDKNewBreakoutRoomControllerDelegate {
}
ViewController.h
//Import the Zoom SDK library
#import <ZoomSDK/ZoomSDK.h>
// Change the interface declaration to conform to the Meeting Breakout Room Delegate
@interface ViewController : NSViewController <ZoomSDKNewBreakoutRoomControllerDelegate> {
ZoomSDKMeetingService* meetingService;
}
ViewController.m
meetingService = [[ZoomSDK sharedSDK] getMeetingService];
meetingService.getNewBreakoutRoomController.delegate = self;
This delegate has two callbacks associated with each role. One callback indicates that the current user has been assigned that role, and the other that the user has been unassigned from the role. For example, Zoom calls onHasCreatorPermission when the meeting host has the ability to create breakout rooms. When they no longer have this ability, Zoom invokes onLostCreatorPermission.
When a role is assigned to a user, the related callback includes a parameter for the interface that exposes the role's functionality. Store a reference to this interface when you receive the callback up until you receive a callback indicating that this role is no longer available.
The roles
These five roles let users perform the various breakout room functions. Any given user can be assigned to multiple breakout room roles at a time.
- Data (
ZoomSDKBOMeetingDataHelp) - Access users' data in breakout rooms, including which users are assigned to various breakout rooms, users' names, and breakout rooms' names. - Admin (
ZoomSDKBOMeetingAdmin) - Manages existing breakout rooms and receives help requests from users in breakout rooms. - Creator (
ZoomSDKBOMeetingCreator) - Directly creates and modifies breakout rooms. The creator and admin roles are usually assigned to the same user. - Assistant (
ZoomSDKBOMeetingAssistant) - The assistant role is a minor role, similar to an attendee. Assistant role holders can join any breakout room directly without being assigned to it. - Attendee (
ZoomSDKBOMeetingAttendee) - A regular user who can join breakout rooms.
The data role
When a user receives the onHasDataHelperPermission callback, that user can access role-related functionality through ZoomSDKBOMeetingDataHelp.
func onHasDataHelperPermission(_ dataHelpObject: ZoomSDKBOMeetingDataHelp?) {
yourDataHelper = dataHelpObject
}
- (void)onHasDataHelperPermission:(ZoomSDKBOMeetingDataHelp *)dataHelpObject {
yourDataHelper = dataHelpObject;
}
Rely on the callbacks to determine when ZoomSDKBOMeetingDataHelp is accessible. You can also get an instance directly.
if let dataHelper = ZoomSDK.shared().getMeetingService()?.getNewBreakoutRoomController().getBOMeetingDataHelp() {
yourDataHelper = dataHelper
}
ZoomSDKBOMeetingDataHelp *dataHelper = [[[[ZoomSDK sharedSDK] getMeetingService] getNewBreakoutRoomController] getBOMeetingDataHelp];
if (dataHelper) {
yourDataHelper = dataHelper;
}
The breakout data role receives notifications when data is updated through ZoomSDKNewBreakoutRoomControllerDelegate.
func onBOMeetingInfoUpdated(_ boID: String) {
}
func onBOListInfoUpdated() {
}
func onUnAssignedUserUpdated() {
}
- (void)onBOMeetingInfoUpdated:(NSString *)boID {
}
- (void)onBOListInfoUpdated {
}
- (void)onUnAssignedUserUpdated {
}
Data-role tasks
Get information on breakout rooms, get user information
The admin role
When a user receives the onHasAdminPermission callback, that user can access role-related functionality through ZoomSDKBOMeetingAdmin.
func onHasAdminPermission(_ adminObject: ZoomSDKBOMeetingAdmin?) {
yourAdminHelper = adminObject
}
- (void)onHasAdminPermission:(ZoomSDKBOMeetingAdmin *)adminObject {
yourAdminHelper = adminObject;
}
Rely on the callbacks to determine when ZoomSDKBOMeetingAdmin is accessible. You can also get an instance directly.
if let adminHelper = ZoomSDK.shared().getMeetingService()?.getNewBreakoutRoomController().getBOMeetingAdmin() {
yourAdminHelper = adminHelper
}
ZoomSDKBOMeetingAdmin *adminHelper = [[[[ZoomSDK sharedSDK] getMeetingService] getNewBreakoutRoomController] getBOMeetingAdmin];
if (adminHelper) {
yourAdminHelper = adminHelper;
}
The breakout admin can receive notifications when other users send a help request through ZoomSDKBOMeetingAdminDelegate.
func onHelpRequestReceived(_ userID: String) {
}
func onStartBOError(_ errCode: ZoomSDKBOControllerError) {
}
func onBOEndTimerUpdated(_ remaining: UInt32, isTimesUpNotice: Bool) {
}
- (void)onHelpRequestReceived:(NSString *)userID {
}
- (void)onStartBOError:(ZoomSDKBOControllerError)errCode {
}
- (void)onBOEndTimerUpdated:(unsigned int)remaining isTimesUpNotice:(BOOL)isTimesUpNotice {
}
Admin-role tasks
Receive users' help requests, assign users to existing breakout rooms, broadcast messages into breakout rooms, invite users back into the main room, respond to help requests from breakout rooms, start or stop breakout rooms
The creator role
When a user receives the onHasCreatorPermission callback, that user can access role-related functionality through ZoomSDKBOMeetingCreator.
func onHasCreatorPermission(_ creatorObject: ZoomSDKBOMeetingCreator?) {
yourCreatorHelper = creatorObject
}
- (void)onHasCreatorPermission:(ZoomSDKBOMeetingCreator *)creatorObject {
yourCreatorHelper = creatorObject;
}
Rely on the callbacks to know when ZoomSDKBOMeetingCreator is accessible. You can also get an instance directly.
if let creatorHelper = ZoomSDK.shared().getMeetingService()?.getNewBreakoutRoomController().getBOMeetingCreator() {
yourCreatorHelper = creatorHelper
}
ZoomSDKBOMeetingCreator *creatorHelper = [[[[ZoomSDK sharedSDK] getMeetingService] getNewBreakoutRoomController] getBOMeetingCreator];
if (creatorHelper) {
yourCreatorHelper = creatorHelper;
}
The creator receives notifications related to breakout room creation through ZoomSDKBOMeetingCreatorDelegate.
func onCreateBOResponse(_ bSuccess: Bool, boID: String) {
}
func onWebPreAssignBODataDownloadStatusChanged(_ status: ZoomSDKPreAssignBODataStatus) {
}
- (void)onCreateBOResponse:(BOOL)bSuccess boID:(NSString *)boID {
}
- (void)onWebPreAssignBODataDownloadStatusChanged:(ZoomSDKPreAssignBODataStatus)status {
}
Creator-role tasks
Create a breakout room, manage a breakout room, preassign users to breakout rooms, configure breakout rooms
The assistant role
The assistant role is a minor role similar to an attendee. Assistant role holders can join any breakout room directly without being assigned to it. Use the boID, available through ZoomSDKBOMeetingDataHelp, to join a specific room.
if let assistantHelper = ZoomSDK.shared().getMeetingService()?.getNewBreakoutRoomController().getBOMeetingAssistant() {
assistantHelper.joinBO(BoID)
assistantHelper.leaveBO()
}
ZoomSDKBOMeetingAssistant *assistantHelper = [[[[ZoomSDK sharedSDK] getMeetingService] getNewBreakoutRoomController] getBOMeetingAssistant];
if (assistantHelper) {
[assistantHelper joinBO:boID];
[assistantHelper leaveBO];
}
The attendee role
When a user receives the onHasAssistantPermission callback, that user can access role-related functionality through ZoomSDKBOMeetingAssistant.
func onHasAttendeePermission(_ attendeeObject: ZoomSDKBOMeetingAttendee?) {
yourAttendeeHelper = attendeeObject;
}
- (void)onHasAttendeePermission:(ZoomSDKBOMeetingAttendee *)attendeeObject {
yourAttendeeHelper = attendeeObject;
}
Rely on the callbacks to know when ZoomSDKBOMeetingAttendee is accessible. You can also get an instance directly.
if let attendeeHelper = ZoomSDK.shared().getMeetingService()?.getNewBreakoutRoomController().getBOMeetingAttendee() {
yourAttendeeHelper = attendeeHelper
}
ZoomSDKBOMeetingAttendee *attendeeHelper = [[[[ZoomSDK sharedSDK] getMeetingService] getNewBreakoutRoomController] getBOMeetingAttendee];
if (attendeeHelper) {
yourAttendeeHelper = attendeeHelper;
}
Breakout attendees receive notifications related to the host's actions through ZoomSDKBOMeetingAttendeeDelegate.
func onHelpRequestHandleResultReceived(_ result: ZoomSDKRequest4HelpResult) {
}
func onHostJoinedThisBOMeeting() {
}
func onHostLeaveThisBOMeeting() {
}
- (void)onHelpRequestHandleResultReceived:(ZoomSDKRequest4HelpResult)result {
}
- (void)onHostJoinedThisBOMeeting {
}
- (void)onHostLeaveThisBOMeeting {
}
Attendee-role tasks
Join or leave breakout rooms as an attendee, ask for admin help
Get information about breakout rooms
Users with the data role can perform this task.
Each breakout room is associated with an ZoomSDKBOMeetingInfo object and breakout ID. Once you have listened for the role change and received the onHasDataHelperPermission callback, access a list of breakout rooms at any time and get information about each room.
guard let meetingIDList = dataHelper.getBOMeetingIDList() as? [String] else { return }
for meetingID in meetingIDList {
if let currentMeetingInfo = dataHelper.getBOMeetingInfo(withBOID: meetingID) {
currentMeetingInfo.getBOName()
currentMeetingInfo.getBOID()
currentMeetingInfo.getBOUserlist()
currentMeetingInfo.getBOUserStatus(withUserID: boUserID)
}
}
NSArray<NSString *> *meetingIDList = [dataHelper getBOMeetingIDList];
if (meetingIDList) {
for (NSString *meetingID in meetingIDList) {
ZoomSDKBOMeetingInfo *currentMeetingInfo = [dataHelper getBOMeetingInfoWithBOID:meetingID];
if (currentMeetingInfo) {
[currentMeetingInfo getBOName];
[currentMeetingInfo getBOID];
[currentMeetingInfo getBOUserlist];
[currentMeetingInfo getBOUserStatusWithUserID:boUserID];
}
}
}
Get user information
Users with the data role can perform this task.
Once you have listened for the role change and received the onHasDataHelperRightsNotification callback, get a list of unassigned users by using unassignedUserList to provide a list of IDs. These user IDs are specific to breakout rooms, and can be used to uniquely identify each user. Use this ID to assign that user to a breakout room or to get more data about that user.
guard let unassignedUserList = dataHelper.getUnassignedUserList() as? [String] else { return }
for userBOID in unassignedUserList {
dataHelper.getBOUserName(withUserID: userBOID)
dataHelper.isMyself(inBo: userBOID)
}
NSArray<NSString *> *unassignedUserList = [dataHelper getUnassignedUserList];
if (unassignedUserList) {
for (NSString *userBOID in unassignedUserList) {
[dataHelper getBOUserNameWithUserID:userBOID];
[dataHelper isMyselfInBo:userBOID];
}
}
To get the name of the current user's assigned breakout room, use currentBoName.
dataHelper.getCurrentBoName()
[dataHelper getCurrentBoName];
You can also get the user's name based on their breakout user ID.
dataHelper.getBOUserName(withUserID: userBOID)
[dataHelper getBOUserNameWithUserID:userBOID];
To see your currently assigned breakout room's name, use boName.
attendeeHelper.getBOName()
[attendeeHelper getBOName];
Receive users' help requests
Users with the admin role can perform this task.
Once you have listened for the role change and received the onHasAdminPermission callback, admins receive notifications through ZoomSDKBOMeetingAdmin when other users send a help request.
func onHelpRequestReceived(_ userID: String) {
}
func onStartBOError(_ errCode: ZoomSDKBOControllerError) {
}
func onBOEndTimerUpdated(_ remaining: UInt32, isTimesUpNotice: Bool) {
}
- (void)onHelpRequestReceived:(NSString *)userID {
}
- (void)onStartBOError:(ZoomSDKBOControllerError)errCode {
}
- (void)onBOEndTimerUpdated:(unsigned int)remaining isTimesUpNotice:(BOOL)isTimesUpNotice {
}
Assign users to existing breakout rooms
Users with the admin role can perform this task.
To assign users to breakout rooms that haven't been started yet, see the creator-role task Preassign users to breakout rooms.
Once you have listened for the role change and received the onHasAdminPermission callback, assign a user to an existing breakout room by using assignNewUserToRunningBO. The userID and boID are available through ZoomSDKBOMeetingDataHelp.
adminHelper.assignNewUser(toRunningBO: boUserID, boid: boID)
[adminHelper assignNewUserToRunningBO:boUserID BOID:boID];
To switch an already-assigned user to a different breakout room, use switchAssignedUserToRunningBO.
The userID and boID are available through ZoomSDKBOMeetingDataHelp.
adminHelper.switchAssignedUser(toRunningBO: boUserID, boid: boID)
[adminHelper switchAssignedUserToRunningBO:boUserID BOID:boID];
Broadcast messages into breakout rooms
Users with the admin role can perform this task.
Once you have listened for the role change and received the onHasAdminPermission callback, broadcast a message to all breakout rooms using broadcastMessage.
adminHelper.broadcastMessage(message)
[adminHelper broadcastMessage:message];
Invite users back into the main room
Users with the admin role can perform this task.
Once you have listened for the role change and received the onHasAdminPermission callback, invite a specific user back into the main meeting by using inviteBOUserReturnToMainSession. The userId is available through ZoomSDKBOMeetingDataHelp.
adminHelper.inviteBOUserReturn(toMainSession: boUserID)
[adminHelper inviteBOUserReturnToMainSession:boUserID];
Respond to help requests from breakout rooms
Users with the admin role can perform this task.
Once you have listened for the role change and received the onHasAdminPermission callback callback, and after receiving the onHelpRequestReceived callback, either accept the request and join that user's breakout room, or ignore it and stay in the current meeting.
func onHelpRequestReceived(_ userID: String) {
adminHelper.joinBO(byUserRequest: userID)
adminHelper.ignoreUserHelpRequest(userID)
}
- (void)onHelpRequestReceived:(NSString *)userID {
[adminHelper joinBOByUserRequest:userID];
[adminHelper ignoreUserHelpRequest:userID];
}
Start or stop breakout rooms
Users with the admin role can perform this task.
Once you have listened for the role change and received the onHasAdminPermission callback, admins can start or stop breakout rooms for the whole meeting.
if ([adminHelper canStartBO]) {
[adminHelper startBO];
}
[adminHelper stopBO];
if adminHelper.canStartBO() {
adminHelper.startBO()
}
adminHelper.stopBO()
Create a breakout room
Users with the creator role can perform this task.
Once you have listened for the role change and received the onHasCreatorPermission callback, create a single breakout room by choosing a name for the room and passing it to createBreakoutRoom. To batch create breakout rooms, pass a list of names into createBO(withBONameList: array of string).
creatorHelper.createBreakoutRoom(boName)
creatorHelper.createBO(withBONameList: boNameList)
[creatorHelper createBreakoutRoom:boName];
[creatorHelper createBOWithBONameList:boNameList];
Once a breakout room is created, you'll receive the onCreateBOResponse callback.
After receiving this callback, the creator can now assign and remove users, remove a breakout room, or update the name of an existing room. The userID and boID used in these methods are available through ZoomSDKBOMeetingDataHelp.
Receive breakout room creation notices
Users with the creator role can perform this task.
Once you have listened for the role change and received the onHasCreatorPermission callback, the creator receives breakout room creation notifications through ZoomSDKBOMeetingCreatorDelegate.
func onCreateBOResponse(_ bSuccess: Bool, boID: String) {
}
func onWebPreAssignBODataDownloadStatusChanged(_ status: ZoomSDKPreAssignBODataStatus) {
}
- (void)onCreateBOResponse:(BOOL)bSuccess boID:(NSString *)boID {
}
- (void)onWebPreAssignBODataDownloadStatusChanged:(ZoomSDKPreAssignBODataStatus)status {
}
Manage breakout rooms
Users with the creator role can perform these tasks.
Perform any of these tasks once you have listened for the role change and received the onHasCreatorPermission callback.
Assign users to breakout rooms that haven't yet started
creatorHelper.assignUser(toBO: boUserID, boid: boID)
creatorHelper.removeUser(fromBO: boUserID, boid: boID)
[creatorHelper assignUserToBO:boUserID BOID:boID];
[creatorHelper removeUserFromBO:boUserID BOID:boID];
Remove a breakout room from the list of available rooms
Once breakout rooms are created, you can remove them from the list of available breakout rooms. The room itself is only ever deleted by Zoom's back end. Developers can't delete breakout rooms.
creatorHelper.removeBO(boID)
[creatorHelper removeBO:boID];
Change a breakout room's name
creatorHelper.updateBOName(newBOName, boid: boID)
[creatorHelper updateBOName:newBOName BOID:boID];
Preassign users to breakout rooms
Users with the creator role can perform this task.
This task lets you assign users to breakout rooms that haven't been started. To assign users to breakout rooms that are already started, see the admin-role task Assign users to existing breakout rooms.
Once you have listened for the role change and received the onHasCreatorPermission callback, if the meeting allows you to preassign breakout rooms, apply those preassignments through requestAndUseWebPreAssignBOList.
if creatorHelper.isWebPreAssignBOEnabled() {
creatorHelper.requestAndUseWebPreAssignBOList()
}
if ([creatorHelper isWebPreAssignBOEnabled]) {
[creatorHelper requestAndUseWebPreAssignBOList];
}
To get updates on the creation, assignment, or preassignment of breakout rooms, use the onWebPreAssignBODataDownloadStatusChanged callback.
func onWebPreAssignBODataDownloadStatusChanged(_ status: ZoomSDKPreAssignBODataStatus) {
}
- (void)onWebPreAssignBODataDownloadStatusChanged:(ZoomSDKPreAssignBODataStatus)status {
}
Configure breakout rooms
Users with the creator role can perform this task.
Once you have listened for the role change and received the onHasCreatorPermission callback, configure breakout rooms by setting the various options through a ZoomSDKBOOption object.
countDown- The number of seconds until breakout rooms automatically close for all users.isAttendeeCanChooseBO- Whether attendees in a webinar can select their own breakout rooms.isAttendeeContained- Whether webinar attendees are allowed to join webinar breakout rooms.isAutoMoveAllAssignedParticipantsEnabled- Whether all assigned participants are automatically moved into their respective breakout room.isBOTimerEnabled- Whether setting a timer for breakout rooms is enabled.isPanelistCanChooseBO- Whether panelists in a webinar can select their own breakout rooms.isParticipantCanChooseBO- Whether participants in a meeting can select their own breakout rooms.isParticipantCanReturnToMainSessionAtAnyTime- Whether participants in a meeting can return to the main session before the admin has ended breakout rooms.isTimerAutoStopBOEnabled- Whether stopping breakout rooms automatically after a set time is supported.isUserConfigMaxRoomUserLimitsEnabled- Whether setting a maximum number of users per breakout room is supported.nUserConfigMaxRoomUserLimits- The maximum number of users that can join a breakout room, if enabled.nTimerDuration- The amount of time before breakout rooms automatically end, if enabled.
After setting any of these options on the ZoomSDKBOOption object, update the settings by passing the option setting into the ZoomSDKBOMeetingCreator instance.
let breakoutOption = ZoomSDKBOOption()
breakoutOption.countDown = ZoomSDKBOStopCountDown_Seconds_60
let error = creatorHelper.setBOOption(breakoutOption)
if error != ZoomSDKError_Success {
// An error occurred during setBOOption. Please refer to the `enum ZoomSDKError` for details.
}
ZoomSDKBOOption *breakoutOption = [[ZoomSDKBOOption alloc] init];
breakoutOption.countDown = ZoomSDKBOStopCountDown_Seconds_60;
ZoomSDKError* error = [creatorHelper setBOOption:breakoutOption];
if (error != ZoomSDKError_Success) {
// An error occurred during setBOOption. Please refer to the `enum ZoomSDKError` for details.
}
Access the current breakout configuration through the same interface.
if let currentBOOption = creatorHelper.getBOOption(), currentBOOption.isBOTimerEnabled {
// Timer is enabled and can be set by the creator role
}
if ([creatorHelper getBOOption]) {
ZoomSDKBOOption *currentBOOption = [creatorHelper getBOOption];
if (currentBOOption.isBOTimerEnabled) {
// Timer is enabled and can be set by the creator role
}
}
Join or leave breakout rooms as an attendee
Users with the attendee role can perform these task.
Once you have listened for the role change and received the onHasAttendeePermission callback, join a breakout room by using joinBO.
attendeeHelper.joinBO()
[attendeeHelper joinBO];
To leave the current breakout room and return to the main meeting, use leaveBO.
attendeeHelper.leaveBO()
[attendeeHelper leaveBO];
Ask for admin help
Users with the attendee role can perform this task.
Once you have listened for the role change and received the onHasAssistantPermission callback, request help from the breakout room admin by using requestForHelp. If the admin is already in the same breakout room as you, you don't need to send a help request.
if !attendeeHelper.isHostInThisBO() {
attendeeHelper.requestForHelp()
}
if (!attendeeHelper.isHostInThisBO) {
[attendeeHelper requestForHelp];
}