# Breakout Room handling

**URL:** <https://devforum.zoom.us/t/breakout-room-handling/41545>\
**Category:** macOS\
**Created:** [January 25, 2021, 11:10pm UTC](https://devforum.zoom.us/t/breakout-room-handling/41545 "2021-01-25T23:10:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![j\_a\_z\_z](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@j\_a\_z\_z](https://devforum.zoom.us/u/j_a_z_z)\
**Post date:** [January 25, 2021, 11:10pm UTC](https://devforum.zoom.us/t/breakout-room-handling/41545/1 "2021-01-25T23:10:08Z")

</div>

**Description**  
Hello,

I am using `ZoomSDKNewBreakoutRoomController` to enable the breakout rooms in my app.  
So far, I am not able to understand the correct flow for breakout rooms, Can you please provide me a sample code to join and leave breakout room, also if there is a function to perform `join` or `later` action for join breakout room dialogue.

**Code:**  
I am assigning the delegate to `ZoomSDKNewBreakoutRoomController` after the meting status is `inMeeting`

```auto
sdk.getMeetingService()?.getNewBreakoutRoomController()?.delegate = self

```

When host added the user to breakout room, I get below callback. I am using this callback to show my custom popup UI to join the breakout room.

```auto
func onHasAttendeePermission( **_** attendeeObject: ZoomSDKBOMeetingAttendee) 

```

To join the breakout room, I call below method, and it work fines.

```auto
sdkBreakoutController?.getBOMeetingAttendee().joinBO()

```

To reject the breakout room request I am using below method.

```auto
sdkBreakoutController?.getBOMeetingAttendee().leaveBO()

```

**Problems:**  
I am having problems with `onHasAttendeePermission` function, it gets called multiple times during the join/leave meeting flow.

1. When host adds me to breakout room and opens the break out room, I get the correct callback for `onHasAttendeePermission`
2. Then before joining the BO room, I get `onLostAttendeePermission` callback
3. After i joined the BO room, I get `onHasAttendeePermission` callback again.
4. Then when I am calling `getBOMeetingAttendee().leaveBO()` to leave room, I get callback for `onLostAttendeePermission`
5. After that when I am in the main meeting, I again get the `onHasAttendeePermission` callback. This is not expected, as this will again ask the user to join BO room, even when he just joined and left it.

Earlier, we were using `ZoomSDKBreakoutRoomsController` which is deprecated now but it has simpler interfaces for BO rooms. Can you please provide me the sample code for using `ZoomSDKNewBreakoutRoomController` as it is not very clear from the documentation.

**Which version?**  
5.4.54528.1230

**To Reproduce(If applicable)**  
mentioned above

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 26, 2021, 6:37pm UTC](https://devforum.zoom.us/t/breakout-room-handling/41545/2 "2021-01-26T18:37:32Z")

</div>

Hi @j_a_z_z, thanks for the post.

Sorry to hear you are having difficulties when implementing breakout rooms. We understand that this is a complex feature to implement and have already made note of the need to create documentation for it. Unfortunately we don’t have any sample code available for this feature just yet, so we will need to provide information on an as-needed basis.

It seems like the main problem here is that you believe there is some unexpected behavior around the callbacks within `ZoomSDKNewBreakoutRoomControllerDelegate`. Based on what I know about breakout rooms, the sequence of callbacks you are seeing is correct. See below for an explanation on why each callback is received.

1. You are gaining access to a specific breakout room.
2. You are being recreated as a breakout room user
3. After joining the room, you now have access to the other users in your breakout room.
4. You are being recreated as a meeting user.
5. This one is what seems a little strange, but could be expected behavior. I will have to double-check on this, but my assumption is that at this point you are available for another breakout room.

Please let me know if the explanations make sense. As far as I can tell, #5 is the only potential outlier in this sequence, which I will have to get back to you on after investigating.

Thanks!

---

<div class="post-metadata">

**Author:** ![j\_a\_z\_z](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@j\_a\_z\_z](https://devforum.zoom.us/u/j_a_z_z)\
**Post date:** [January 26, 2021, 10:58pm UTC](https://devforum.zoom.us/t/breakout-room-handling/41545/3 "2021-01-26T22:58:24Z")

</div>

Thanks for your response @jon.zoom  
Now I am thinking, if I am even using the correct interfaces.

**My use case is:**

1. I want to listen to SDK callback when other user invited me to a breakout room. (with BO room name)
2. I want the SDK function to tap on `Join Breakout room` and `later` button.  
 ![Screenshot 2021-01-26 at 23.50.15](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/8/d84ee9f87b6248bf7c8a1acc83292dcac8c43c00.png)
3. A SDK function to leave current BO room.

Can you please provide the interfaces for this use case.

---

<div class="post-metadata">

**Author:** ![j\_a\_z\_z](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@j\_a\_z\_z](https://devforum.zoom.us/u/j_a_z_z)\
**Post date:** [January 26, 2021, 11:04pm UTC](https://devforum.zoom.us/t/breakout-room-handling/41545/4 "2021-01-26T23:04:39Z")

</div>

So, far I was able to hack it using the callbacks I mentioned in my first post.  
I am ignoring the later callbacks to `onHasAttendeePermission` once the user meeting status is `joinBreakoutRoom`. But as I mentioned above in point 5, I am getting another `onHasAttendeePermission` callback after the user meeting status is `leaveBreakoutRoom`.  
That results in showing my custom alert view again just after user left the breakout room.

Is there any other callback when SDK shows below UI?  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/1/5/154c9d0a2e6e04904351b29bad0bc822714c5501.png)

In other words, I want to listen to this alert view visible callback and perform join or later button actions.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 27, 2021, 8:47pm UTC](https://devforum.zoom.us/t/breakout-room-handling/41545/5 "2021-01-27T20:47:40Z")

</div>

Hi @j_a_z_z,

I believe this is the correct callback for what you are trying to achieve. You can query the `ZoomSDKBOMeetingAttendee` object upon receiving this callback for the [name](https://marketplacefront.zoom.us/sdk/meeting/macos/interface_zoom_s_d_k_b_o_meeting_attendee.html#a399a36698f50f871606436840aeb68c1) of the breakout room to verify that you have been added to one. That same object can be used to [join](https://marketplacefront.zoom.us/sdk/meeting/macos/interface_zoom_s_d_k_b_o_meeting_attendee.html#a12cbf1f7c81ce4ce998031f58ca0cf5d) the breakout room.

Please let me know if I am misunderstanding and there is something more specific you are looking for which this callback does not accomplish.

Thanks!

---

<div class="post-metadata">

**Author:** ![j\_a\_z\_z](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@j\_a\_z\_z](https://devforum.zoom.us/u/j_a_z_z)\
**Post date:** [January 27, 2021, 9:42pm UTC](https://devforum.zoom.us/t/breakout-room-handling/41545/6 "2021-01-27T21:42:55Z")

</div>

Hey @jon.zoom

Thanks for your confirmation, Can you please clarify me number 5, if we are able to avoid this callback, It will work fine for me.

> 1. After that when I am in the main meeting, I again get the `onHasAttendeePermission` callback. This is not expected, as this will again ask the user to join BO room, even when he just joined and left it.

As I asked earlier, Can you please take a feature request to provide APIs to interact with this message box, including the callback when you present it.  
IMO, this will simplify the BO room permissions flow and provide clear APIs.

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/1/5/154c9d0a2e6e04904351b29bad0bc822714c5501.png)

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 27, 2021, 11:56pm UTC](https://devforum.zoom.us/t/breakout-room-handling/41545/7 "2021-01-27T23:56:05Z")

</div>

Hi @j_a_z_z,

> Can you please clarify me number 5, if we are able to avoid this callback, It will work fine for me.

As mentioned in my earlier post, this one seems like it could be expected behavior or could be a bug. We are investigating this and will have to let you know once we determine what the correct behavior is.

> As I asked earlier, Can you please take a feature request to provide APIs to interact with this message box

It is not possible to interact with this window programmatically. The `ZoomSDKBOMeetingAttendee` object referenced in my previous response provides all of the functionality in this window.

Thanks!

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [January 28, 2021, 6:27am UTC](https://devforum.zoom.us/t/breakout-room-handling/41545/8 "2021-01-28T06:27:49Z")

</div>

@jon.zoom if this is expected behavior then can you please explain the sense of it?

Regarding the second second point @j_a_z_z mentioned. We know there is not way to interact with the box. That’s why we’re asking for a feature request @TimZoom

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 28, 2021, 6:03pm UTC](https://devforum.zoom.us/t/breakout-room-handling/41545/9 "2021-01-28T18:03:51Z")

</div>

Hi @tmiskiew,

> if this is expected behavior then can you please explain the sense of it?

I’m not yet certain that #5 was expected behavior. We are still investigating this and will let you know as soon as more definitive information is available.

> We know there is not way to interact with the box. That’s why we’re asking for a feature request

I can absolutely submit a feature request for this. However, due to the complexity of the breakout rooms feature please note that this may take longer to provide in comparison to other feature requests.

Thanks!

---

<div class="post-metadata">

**Author:** ![j\_a\_z\_z](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@j\_a\_z\_z](https://devforum.zoom.us/u/j_a_z_z)\
**Post date:** [January 28, 2021, 6:37pm UTC](https://devforum.zoom.us/t/breakout-room-handling/41545/10 "2021-01-28T18:37:47Z")

</div>

Hey @jon.zoom  
I understand the complexities around the feature request.  
But I think if you provide this feature, it will even simplify the BO room permission flow. So please continue with the feature request.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 28, 2021, 9:14pm UTC](https://devforum.zoom.us/t/breakout-room-handling/41545/11 "2021-01-28T21:14:51Z")

</div>

Hi @j_a_z_z,

The feature request was already submitted at the time of my previous reply. 🙂

I will be sure to update you as soon as we have more information regarding that feature request or the callback in scenario #5.

Thanks!

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [February 3, 2021, 6:57pm UTC](https://devforum.zoom.us/t/breakout-room-handling/41545/12 "2021-02-03T18:57:13Z")

</div>

Hi @j_a_z_z and @tmiskiew,

I have a couple of updates regarding the issue originally reported and the feature request.

First, the callback in #5 has been confirmed as functioning properly. You are receiving this callback after leaving the breakout room because that user still has access to the room. If the host ends the breakout room via [`stopBO`](https://marketplacefront.zoom.us/sdk/meeting/macos/interface_zoom_s_d_k_b_o_meeting_admin.html#a7c446151c5f96a9da603012827b0ae02) or removes the user from it, you should receive an `onLostAttendeePermission` callback.

For the feature request, unfortunately we will not be able to add support for interacting with the BO window programmatically at this time. The alternative mentioned in my [previous reply](https://devforum.zoom.us/t/breakout-room-handling/41545/5) is going to be the best approach for this. 🙂

Thanks!
