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 Windows. 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 IMeetingBOControllerEvent interface.
Listen for role changes
To know when the current user's role has changed, implement the IMeetingBOControllerEvent interface and pass an instance of it into the IMeetingBOController.
IMeetingBOControllerEventListener* breakoutListener = new IMeetingBOControllerEventListener();
meetingService->GetMeetingBOController()->SetEvent(breakoutListener);
.
.
.
void onHasAdminRightsNotification(IBOAdmin* pAdminObj){
boAdmin = pAdminObj;
}
This listener 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 onHasCreatorRightsNotification when the meeting host has the ability to create breakout rooms. When they no longer have this ability, Zoom invokes onLostCreatorRightsNotification.
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 (
IBOData) - Access users' data in breakout rooms, including which users are assigned to various breakout rooms, users' names, and breakout rooms' names. - Admin (
IBOAdmin) - Manages existing breakout rooms and receives help requests from users in breakout rooms. - Creator (
IBOCreator) - Directly creates and modifies breakout rooms. The creator and admin roles are usually assigned to the same user. - Assistant (
IBOAssistant) - 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 (
IBOAttendee) - A regular user who can join breakout rooms.
The data role
When a user receives the onHasDataHelperRightsNotification callback, that user can access role-related functionality through IBOData.
virtual void onHasDataHelperRightsNotification(IBOData* pDataHelperObj){
boData = pDataHelperObj;
}
Rely on the callbacks to determine when IBOData is accessible. You can also get an instance directly.
IBOData* boData = meetingService->GetMeetingBOController()->GetBODataHelper();
The breakout data role receives notifications when data is updated through IBODataEvent.
IBODataEvent dataEvent = new IBODataEvent() {
void onBOInfoUpdated(const zchar_t* strBOID) {
}
void OnBOListInfoUpdated(){
}
void onUnAssignedUserUpdated(){
}
};
iboData->SetEvent(dataEvent);
Data-role tasks
Get information on breakout rooms, get user information
The admin role
When a user receives the onHasAdminRightsNotification callback, that user can access role-related functionality through IBOAdmin.
void IMeetingBOControllerEventListener::onHasAdminRightsNotification(IBOAdmin* pAdminObj) {
boAdmin = pAdminObj
}
Rely on the callbacks to determine when IBOAdmin is accessible. You can also get an instance directly.
IBOAdmin* boAdmin = meetingService->GetMeetingBOController()->GetBOAdminHelper();
The breakout admin can receive notifications when other users send a help request through IBOAminEvent.
IBOAdminEvent adminEvent = new IBOAdminEvent() {
void onHelpRequestReceived(const zchar_t* strUserID) {}
void onStartBOError(BOControllerError errCode) {}
void onBOEndTimerUpdated(int remaining, bool isTimesUpNotice){}
};
boAdmin.setEvent(adminEvent);
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 onHasCreatorRightsNotification callback, that user can access role-related functionality through IBOCreator.
public void onHasCreatorRightsNotification(IBOCreator* pCreatorObj) {
boCreator = pCreatorObj;
}
Rely on the callbacks to know when IBOCreator is accessible. You can also get an instance directly.
IBOCreator* boCreator = meetingService->GetMeetingBOController()->GetBOCreatorHelper();
The creator receives notifications related to breakout room creation through IBOCreatorEvent.
IBOCreatorEvent creatorEvent = new IBOCreatorEvent() {
public void onCreateBOResponse(bool bSuccess, const zchar_t* strBOID) {}
public void OnWebPreAssignBODataDownloadStatusChanged(PreAssignBODataStatus status) {}
};
if (boCreator != nullptr) {
boCreator.setEvent(creatorEvent);
}
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 breakoutId, available through IBOData, to join a specific room.
IBOAssistant boAssistant = meetingService->GetMeetingBOController()->GetBOAssistantHelper;
if (boAssistant != nullptr) {
boAssistant.joinBO(breakoutId);
boAssistant.leaveBO();
}
The attendee role
When a user receives the onHasAttendeeRightsNotification callback, that user can access role-related functionality through IBOAttendee.
public void onHasAttendeeRightsNotification(IBOAttendee* pAttendeeObj) {
boAttendee = pAttendeeObj;
}
Rely on the callbacks to know when IBOAttendee is accessible. You can also get an instance directly.
boAttendee = meetingService->GetMeetingBOController()->GetBOAssistantHelper();
Breakout attendees receive notifications related to the host's actions through IBOAttendeeEvent.
IBOAttendeeEvent attendeeEvent = new IBOAttendeeEvent() {
public void onHelpRequestHandleResultReceived(ATTENDEE_REQUEST_FOR_HELP_RESULT eResult) {
}
public void onHostJoinedThisBOMeeting() {
}
public void onHostLeaveThisBOMeeting() {
}
};
if (boAttendee != nullptr) {
boAttendee.setEvent(attendeeEvent);
}
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 IBOMeeting object and breakout ID. Once you have listened for the role change and received the onHasDataHelperRightsNotification callback, access a list of breakout rooms at any time and get information about each room.
IBOData* boData = meetingService->GetMeetingBOController()->GetBODataHelper();
IList<const zchar_t*>* meetingIDList = boData->GetBOMeetingIDList();
if (meetingIDList != nullptr) {
for (int i = 0; i < meetingIDList->GetCount(); ++i) {
const zchar_t* id = meetingIDList->GetItem(i);
IBOMeeting* ibomeeting = boData->GetBOMeetingByID(id);
ibomeeting->GetBOID();
ibomeeting->GetBOName();
ibomeeting->GetBOUserList();
ibomeeting->GetBOUserStatus(id);
}
}
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.
IList<const zchar_t*>* userList = boData->GetUnassignedUserList();
for (String userId: userList) {
if (boData != nullptr) {
boData.getBOUserName(userId);
boData.isBOUserMyself(userId);
}
}
To get the name of the current user's assigned breakout room, use currentBoName.
if (boData != nullptr) {
boData.getCurrentBoName();
}
You can also get the user's name based on their breakout user ID.
if (boData != nullptr) {
boData.getBOUserName();
}
To see your currently assigned breakout room's name, use boName.
if (boAttendee != nullptr) {
boAttendee.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 onHasAdminRightsNotification callback, admins receive notifications through IBOAminEvent when other users send a help request.
IBOAdminEvent iboAdminEvent = new IBOAdminEvent() {
public void onHelpRequestReceived(const zchar_t* strUserID) {
}
public void onStartBOError(BOControllerError errCode) {
}
public void onBOEndTimerUpdated(int remaining, bool isTimesUpNotice){
}
};
if (boAdmin != nullptr) {
boAdmin.setEvent(iboAdminEvent);
}
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 onHasAdminRightsNotification callback, assign a user to an existing breakout room by using assignNewUserToRunningBO. The userId and breakoutId are available through IBOData.
if (boAdmin != nullptr) {
boAdmin->AssignNewUserToRunning(userId, breakoutId);
}
To switch an already-assigned user to a different breakout room, use switchAssignedUserToRunningBO. The userId and breakoutId are available through IBOData.
if (boAdmin != nullptr) {
boAdmin->SwitchAssignedUserToRunningBO(userId, breakoutId);
}
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 onHasAdminRightsNotification callback, broadcast a message to all breakout rooms using broadcastMessage.
if (boAdmin != nullptr) {
boAdmin.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 onHasAdminRightsNotification callback, invite a specific user back into the main meeting by using inviteBOUserReturnToMainSession. The userId is available through IBOData.
if (boAdmin != nullptr) {
boAdmin.inviteBOUserReturnToMainSession(userId);
}
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 onHasAdminRightsNotification 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.
public void onHelpRequestReceived(const zchar_t* strUserID) {
if (boAdmin != nullptr) {
boAdmin.joinBOByUserRequest(strUserID)
boAdmin.ignoreUserHelpRequest(strUserID)
}
}
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 onHasAdminRightsNotification callback, admins can start or stop breakout rooms for the whole meeting.
if (boAdmin != nullptr && boAdmin.canStartBO()) {
boAdmin.startBO()
}
if (boAdmin != nullptr) {
boAdmin.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 onHasCreatorRightsNotification 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 createGroupBO.
if (boCreator != nullptr) {
boCreator.createBreakoutRoom(breakoutName);
boCreator.createGroupBO(breakoutNameList);
}
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 breakoutId used in these methods are available through IBOData.
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 onHasCreatorRightsNotification callback, the creator receives breakout room creation notifications through IBOCreatorEvent.
creatorEvent = new IBOCreatorEvent() {
public void onCreateBOResponse(bool bSuccess, const zchar_t* strBOID) {
}
public void onWebPreAssignBODataDownloadStatusChanged(PreAssignBODataStatus status) {
}
};
if (boCreator != nullptr) {
boCreator.setEvent(creatorEvent);
}
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 onHasCreatorRightsNotification callback.
Assign users to breakout rooms that haven't yet started
if (boCreator != nullptr) {
boCreator.assignUserToBO(userId, breakoutId);
boCreator.removeUserFromBO(userId, breakoutId);
}
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.
if (boCreator != nullptr) {
boCreator.removeBO(breakoutId);
}
Change a breakout room's name
if (boCreator != nullptr) {
boCreator.updateBOName(breakoutId, breakoutName);
}
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](#assign-users-to-existing breakout-rooms).
Once you have listened for the role change and received the onHasCreatorRightsNotification callback, if the meeting allows you to preassign breakout rooms, apply those preassignments through requestAndUseWebPreAssignBOList.
if (boCreator != nullptr && boCreator.isWebPreAssignBOEnabled()) {
boCreator.requestAndUseWebPreAssignBOList();
}
To get updates on the creation, assignment, or preassignment of breakout rooms, use the onWebPreAssignBODataDownloadStatusChanged callback.
public void onWebPreAssignBODataDownloadStatusChanged(PreAssignBODataStatus status) {
switch (status) {
// Respond to specific statuses here
}
}
Configure breakout rooms
Users with the creator role can perform this task.
Once you have listened for the role change and received the onHasCreatorRightsNotification callback, configure breakout rooms by setting the various options through a BOOption 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.timerDuration- The amount of time before breakout rooms automatically end, if enabled.
After setting any of these options on the BOOption object, update the settings by passing the option setting into the IBOCreator instance.
BOOption option = new BOOption();
option.countdown = BOStopCountdown.COUNTDOWN_SECONDS_60;
if (boCreator != nullptr) {
SDKError err = boCreator.setBOOption(option);
if (err != SDKERR_SUCCESS)
{
//An error occurred during setBOOption.Please refer to the `enum SDKError` for details.
}
}
Access the current breakout configuration through the same interface.
BOOption currentOptions;
if (boCreator != nullptr) {
currentOptions = boCreator.getBOOption();
}
if (currentOptions.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 onHasAttendeeRightsNotification callback, join a breakout room by using joinBo.
if (boAttendee != nullptr) {
boAttendee.joinBo();
}
To leave the current breakout room and return to the main meeting, use leaveBo.
if (boAttendee != nullptr && boAttendee.isCanReturnMainSession()) {
boAttendee.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 onHasAttendeeRightsNotification 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 (boAttendee != nullptr && !boAttendee.isHostInThisBO()) {
boAttendee.requestForHelp();
}