Skip to content

Commit acfb591

Browse files
Update breakoutrooms-web.md
1 parent 7e1f5cf commit acfb591

File tree

1 file changed

+31
-18
lines changed

1 file changed

+31
-18
lines changed

articles/communication-services/how-tos/calling-sdk/includes/breakoutrooms/breakoutrooms-web.md

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,23 @@ Event **breakoutRoomsUpdated** provides instance of one of the following classes
8787
data: Call | TeamsCall;
8888
}
8989
```
90+
5. Class `RejoinMainMeetingEvent` : This event is triggered when the participant is joining the main meeting when the breakout room is closed. This event can happen when the breakout room state is `closed` and the user is automatically moved to the main meeting. Property `data` contains the main meeting `call instance, that developers can use to listen to the breakout room events. This class has a property `type` equal to `"rejoinMainMeeting"`;
91+
```js
92+
/**
93+
* Name of event type for main meeting joined event
94+
*/
95+
export interface RejoinMainMeetingEvent {
96+
/**
97+
* Breakout room event type
98+
*/
99+
type: "rejoinMainMeeting";
100+
/**
101+
* Main meeting call object
102+
*/
103+
data: Call | TeamsCall;
104+
}
105+
```
106+
90107
The following code shows you valuable information received in the breakout room events:
91108
```js
92109
const breakoutRoomsUpdatedListener = (event) => {
@@ -115,6 +132,10 @@ The following code shows you valuable information received in the breakout room
115132
const breakoutRoomCall = event.data;
116133
console.log(`You have joined breakout room with call ID: ${breakoutRoomCall.id}`);
117134
break;
135+
case "rejoinMainMeeting":
136+
const mainMeetingCall = event.data;
137+
console.log(`You have joined the main meeting with call ID: ${mainMeetingCall.id}`);
138+
break;
118139
}
119140
}
120141
breakoutRoomsFeature.on('breakoutRoomsUpdated', breakoutRoomsUpdatedListener);
@@ -164,7 +185,7 @@ callAgent.on('callsUpdated', e =>{
164185
});
165186
```
166187
167-
When the user is in a breakout room and the organizer assigns a new breakout room to the user, the user gets `breakoutRoomsUpdated` event with the type `assignedBreakoutRooms`. This event contains the latest breakout room details. The user has to `hangUp()` previous breakout room call. If `autoMoveParticipantToBreakoutRoom` is set to `true`, the user is automatically moved, other wise the user has to call the `join` method explicitly on the new breakout room.
188+
When the user is in a breakout room and the organizer assigns a new breakout room to the user, the user gets `breakoutRoomsUpdated` event with the type `assignedBreakoutRooms`. This event contains the latest breakout room details. The user has to `hangUp()` previous breakout room call. If `autoMoveParticipantToBreakoutRoom` is set to `true`, the user is automatically moved, otherwise the user has to call the `join` method explicitly on the new breakout room.
168189
169190
```js
170191
//Breakout room which is assigned initially.
@@ -191,7 +212,6 @@ if(assignedRoom.state == 'open' && !assignedRoom.autoMoveParticipantToBreakoutRo
191212
const breakoutRoomCall = await assignedRoom.join();
192213
}
193214
```
194-
195215
Microsoft 365 user with role organizer, co-organizer, or breakout room manager get the list of breakout rooms created by the breakout room manager or organizer of the main meeting. In this case, the behavior is slightly different. This user has to explicitly call `join()` method to join the breakout room. The user is kept on hold in the main meeting. When the leaves the breakout room, then the user's main meeting call is automatically resumed.
196216
197217
If the user wants to join any of the breakout rooms , then the user explicitly calls the `join` method.
@@ -202,27 +222,22 @@ if(breakoutRoom.state == 'open') {
202222
const breakoutRoomCall = await breakoutRoom.join();
203223
}
204224
```
205-
To exit a breakout room, users should execute the `hangUp()` function on the breakout room call. The user is automatically resumed in the main meeting.
225+
To exit a breakout room, users should execute the `hangUp()` function on the breakout room call. The user would be calling `RejoinToMainMeeting` to resume the main meeting call.
206226
207227
```js
208228
breakoutRoomCall.hangUp();
229+
const mainMeetingCall = breakoutRoomCall.rejoinMainMeeting();
209230
```
210231
211232
### Leave breakout room
212233
213-
When the breakout room state is `closed`, user has to join the main meeting using the `mainMeetingUrl` provided in `breakoutRoomsSettings`. User is informed about the end of breakout room by receiving event `breakoutRoomsUpdated` with class `AssignedBreakoutRoomsEvent` and property `type` equal to `assignedBreakoutRooms` that indicates that `assignedBreakoutRoom` has property `state` set to `closed`.
234+
When the breakout room state is `closed`, user is informed about the end of breakout room by receiving event `breakoutRoomsUpdated` with class `AssignedBreakoutRoomsEvent` and property `type` equal to `assignedBreakoutRooms` that indicates that `assignedBreakoutRoom` has property `state` set to `closed`. User returns to the breakout room automatically and informed about rejoining the main meeting by receiving event `breakoutRoomsUpdated` with class `RejoinMainMeetingEvent` and property `type` equal to `rejoinMainMeeting`.
214235
215-
If the user wants to leave the breakout room even before the room is closed and the breakout room settings `breakoutRoomsFeature.breakoutRoomsSettings` have property `disableReturnToMainMeeting` set to `false` then user can join the main meeting call with the following code:
236+
If the user wants to leave the breakout room even before the room is closed and the breakout room settings `breakoutRoomsFeature.breakoutRoomsSettings` have property `disableReturnToMainMeeting` set to `false` then user can rejoin to the main meeting call with the following code:
216237
217238
```js
218-
const breakoutRoomsSettings = breakoutRoomsFeature.breakoutRoomsSettings;
219-
const mainMeetingUrl = breakoutRoomsFeature.breakoutRoomsSettings.mainMeetingUrl;
220-
if(breakoutRoomCall != null && !breakoutRoomsSettings.disableReturnToMainMeeting){
221-
breakoutRoomCall.hangUp();
222-
//join mainMeeting using the mainmeeting url
223-
const locator = { meetingLink: '<MEETING_LINK>'}
224-
const mainMeetingCall = callAgent.join(locator);
225-
}
239+
breakoutRoomCall.hangUp();
240+
const mainMeetingCall = breakoutRoomCall.rejoinMainMeeting();
226241
```
227242
228243
### Get participants of the breakout room
@@ -286,11 +301,6 @@ const roomEndTime : TimestampInfo = breakoutRoomsSettings.roomEndTime;
286301
```
287302
- `roomEndTime`: Breakout room end time set by the Microsoft 365 user with role organizer, co-organizer, or breakout room manager of the main meeting. This property is read-only.
288303
289-
```js
290-
const mainMeetingUrl : string = breakoutRoomsSettings.mainMeetingUrl;
291-
```
292-
- `mainMeetingUrl`: Url of the main meeting. This property is read-only.
293-
294304
### Troubleshooting
295305
296306
|Error code| Subcode | Result Category | Reason | Resolution |
@@ -304,5 +314,8 @@ const mainMeetingUrl : string = breakoutRoomsSettings.mainMeetingUrl;
304314
|412| 46258 | UnexpectedClientError | Unable to read breakout room details. | Gather browser console logs and contact Azure Communication Services support. |
305315
|500 | 46259| UnexpectedServerError | Could not hang up the Breakout room call. | Follow the instructions defined in the section `Leave breakout room` for manual leaving of breakout room. |
306316
|412| 46260 | UnexpectedClientError | Cannot join Breakout Room as it is not yet assigned. | Ensure that the `breakoutRoomsFeature.assignedBreakoutRoom` is having the details of the assigned breakout room. Ensure that the `state` of `assignedBreakoutRoom` is `open` and call `breakoutRoomsFeature.assignedBreakoutRoom.join()` method explicitly. |
317+
|412| 46261 | UnexpectedClientError | Unable to join the main meeting. Please try again by calling the RejoinMainMeeting() method. If the issue persists, gather browser console logs and contact Azure Communication Services support.|
318+
|412| 46262 | ExpectedError | Already in the main meeting. Please call this method only when the participant is in breakout room and removed from the main meeting.|
319+
|412| 46263 | UnexpectedClientError | Existing breakout room call hangup failed. Try to call hangup() method again to hangup the call. Call join() method to join the breakout room again. |
307320
308321

0 commit comments

Comments
 (0)