# Customize the UI waiting room callback sequence

**URL:** <https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864>\
**Category:** iOS\
**Created:** [July 31, 2020, 3:43pm UTC](https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864 "2020-07-31T15:43:29Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![15604510000](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/15604510000/32/12797_2.png) [@15604510000](https://devforum.zoom.us/u/15604510000)\
**Post date:** [July 31, 2020, 3:43pm UTC](https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864/1 "2020-07-31T15:43:29Z")

</div>

Use a custom UI when a meeting has a waiting room. Callback order 1. DestructionZoomMeetingVC 2. OnInitMeetingView.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 1, 2020, 4:45am UTC](https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864/2 "2020-08-01T04:45:14Z")

</div>

Hi @15604510000,

Thanks for the post. Could you elaborate on the issue you are facing? Could you provide the following information?

**Description**  
A clear and concise description of what the question is.

**Which version?**  
Knowing the version can help us to identify your issue faster.

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Go to ‘…’
2. Click on ‘…’
3. Scroll down to ‘…’
4. See error

**Screenshots**  
If applicable, add screenshots to help explain your problem.

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Version [e.g. 22]

**Additional context**  
Add any other context about the problem here.

Thanks!

---

<div class="post-metadata">

**Author:** ![15604510000](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/15604510000/32/12797_2.png) [@15604510000](https://devforum.zoom.us/u/15604510000)\
**Post date:** [August 3, 2020, 7:49am UTC](https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864/3 "2020-08-03T07:49:40Z")

</div>

Waiting room callback sequence problem  
The first is a custom UI that shows the waiting room interface when you join a meeting with a waiting room. Upon the moderator’s agreement, DestructionZoomMeetingVC will receive a callback that will lead me to believe that the meeting is closed. How can I do agree to join the meeting not to go DestructionZoomMeetingVC but to directly inform me of the status of the waiting room to send changes. I handle the UI myself.  
Current version 4.6.21666.0428.  
IPhoneX, iOS13.0

---

<div class="post-metadata">

**Author:** ![nitin1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nitin1/32/1333_2.png) [@nitin1](https://devforum.zoom.us/u/nitin1)\
**Post date:** [January 27, 2021, 7:49am UTC](https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864/4 "2021-01-27T07:49:54Z")

</div>

I am having the same issue.  
I am using v5.4.54520.1229

When the waiting room is enabled, the sequence of events is.  
Connecting  
Reconnecting  
Meeting Ended  
Connecting  
WaitingFor Host  
Connecting  
InWaitingRoom  
Connecting  
Reconnecting  
InMeeting

This clearly seems like a bug because when our business logic sees Meeting Ended we simply cleanup the UI but zoom is still trying to connect in the background

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [January 27, 2021, 5:50pm UTC](https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864/5 "2021-01-27T17:50:02Z")

</div>

Hey @nitin1,

Thanks for using the dev forum!

This order of events also confused me, and I thought it was a bug as well. However, this is actually intended behavior. Under the hood, the waiting room is treated as a special type of meeting. So when the user is admitted to the waiting room a meeting technically ends (the waiting room), so that the user can join the actual meeting.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![nitin1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nitin1/32/1333_2.png) [@nitin1](https://devforum.zoom.us/u/nitin1)\
**Post date:** [January 27, 2021, 7:14pm UTC](https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864/6 "2021-01-27T19:14:33Z")

</div>

Hi Michael,

Thanks for you reply.

I understand it is the intended behavior however, the behavior is creating problems for us to maintain a consistent state in the application layer. I will try to explain with the help of example

- When the user is allowed to enter the meeting (with waiting room enabled)

**onMeetingStateChange:1**  
**onMeetingStateChange:1**  
**onMeetingStateChange:1**  
\*\*onMeetingStateChange:11 [\*\*MobileRTCMeetingState\_InWaitingRoom] - In waiting room callback - true  
\*\*onMeetingStateChange:11 [\*\*MobileRTCMeetingState\_InWaitingRoom]  
\*\*onMeetingStateChange:11 [\*\*MobileRTCMeetingState\_InWaitingRoom]  
**onMeetingStateChange:1 [MobileRTCMeetingState\_Connecting]** - In waiting room callback - false  
**onMeetingStateChange:5 [MobileRTCMeetingState\_Reconnecting]**  
**onMeetingStateChange:7 [MobileRTCMeetingState\_Ended]**  **\<— Was I kicked out allowed in ??**  
**onMeetingStateChange:1**  
**onMeetingStateChange:1**  
**onMeetingStateChange:3**  
**onMeetingStateChange:4**  
**onMeetingStateChange:1**  
**onMeetingStateChange:7**

- when the user is not allowed to join the meeting is

**onMeetingStateChange:1**  
**onMeetingStateChange:1**  
**onMeetingStateChange:1**  
**onMeetingStateChange:11** \*\*[\*\*MobileRTCMeetingState\_InWaitingRoom] - In waiting room callback - true  
**onMeetingStateChange:11** \*\*[\*\*MobileRTCMeetingState\_InWaitingRoom]  
**onMeetingStateChange:11** \*\*[\*\*MobileRTCMeetingState\_InWaitingRoom]  
**onMeetingStateChange:4 [MobileRTCMeetingState\_Disconnecting]** - In waiting room callback - false  
**onMeetingStateChange:1 [MobileRTCMeetingState\_Connecting]**  
**onMeetingStateChange:7 [MobileRTCMeetingState\_Ended] \<— Was I kicked out allowed in ??**

So when MobileRTCMeetingState\_Ended comes, unless I track all the sequence of states the system has gone through, I won’t know if the meeting ended because I will rejoin or meeting ended because the user was not allowed to join. Also, I have seen scenarios where we do get re-connecting when the user is waiting in the room for 2-3 minutes.

As you can see this is making things unduly complicated. I have a solution if you tell me the sequence is correct and will be the same in this case no matter what the scenario. I have created a state machine for Zoom teams review, to make sure I am not missing anything.

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/7/8/784b54982c279be0d1c1a46975120b5427ec67c4.png)

Your help is much appreciated

Regards  
Nitin

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [January 28, 2021, 8:47pm UTC](https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864/7 "2021-01-28T20:47:18Z")

</div>

Hey @nitin1,

I understand that this can start a strange loop of state handling. To help with this scenario there are callbacks specifically related to entering or leaving the waiting room:  
onWaitingRoomStatusChange: ← For handling when the user has entered a waiting room or left a waiting room  
onJBHWaitingWithCmd: ← For handling the waiting room in the situation where the user joined before the host  
There is also the callback  
onMeetingEndedReason: ← Provides the reason the meeting was ended.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![nitin1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nitin1/32/1333_2.png) [@nitin1](https://devforum.zoom.us/u/nitin1)\
**Post date:** [January 28, 2021, 10:40pm UTC](https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864/8 "2021-01-28T22:40:27Z")

</div>

Thanks Michael,

I could not find documentation for MobileRTCMeetingEndReason

Also, does this callback comes before or after the meeting has ended?

Best

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [January 29, 2021, 8:09pm UTC](https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864/9 "2021-01-29T20:09:50Z")

</div>

Hey @nitin1,

It will come very shortly after. So if the host pressed “End meeting” the callback will be triggered right after for all the participants.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![nitin1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nitin1/32/1333_2.png) [@nitin1](https://devforum.zoom.us/u/nitin1)\
**Post date:** [January 29, 2021, 9:09pm UTC](https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864/10 "2021-01-29T21:09:58Z")

</div>

So basically, the flow I created is the only way it works for now. Just making sure. This was working for us earlier. After the latest SDK update it appears the sequence has changed a bit more than what it used t be in the past.

Thanks

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [February 1, 2021, 8:37pm UTC](https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864/11 "2021-02-01T20:37:44Z")

</div>

Hey @nitin1,

What was the behavior you experienced prior to this version? I don’t think there were intentional changes around this area of the SDK, but I can follow up.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![nitin1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nitin1/32/1333_2.png) [@nitin1](https://devforum.zoom.us/u/nitin1)\
**Post date:** [March 8, 2021, 11:07pm UTC](https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864/12 "2021-03-08T23:07:02Z")

</div>

So, I had been doing some research at my end and clearly this part of the SDK needs to be more resilient and developer friendly. The diagram I shared earlier is what i am following to ensure that the users who have been approved can move into the meeting but it is too complicated. Given the only difference between checking if you were approved or not was getting a reconnecting event. The reason it becomes so messy is that I also got reconnecting when I switched between wifi and cellular. So there are definitely scenarios where the diagram I made above is not fool proof.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [March 9, 2021, 11:02pm UTC](https://devforum.zoom.us/t/customize-the-ui-waiting-room-callback-sequence/25864/13 "2021-03-09T23:02:05Z")

</div>

Hey @nitin1,

Did you end up implementing the onWaitingRoomStatusChange delegate call?

Michael
