Skip to content

Commit 1eb603a

Browse files
Update breakoutrooms-web.md
1 parent ca47581 commit 1eb603a

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ The following code shows you valuable information received in the breakout room
108108
case "breakoutRoomsSettings":
109109
const breakoutRoomSettings = event.data;
110110
console.log(`Breakout room ends at: ${breakoutRoomSettings.roomEndTime}`);
111+
console.log(`Main meeting url to join the Main Meeting : ${breakoutRoomSettings.mainMeetingUrl}`);
111112
console.log(`Disable the user to return to main meeting from breakout room call : ${breakoutRoomSettings.disableReturnToMainMeeting}`);
112113
break;
113114
case "join":
@@ -151,18 +152,30 @@ if(breakoutRoom.state == 'open' && !breakoutRoom.autoMoveParticipantToBreakoutRo
151152
const breakoutRoomCall = await breakoutRoom.join();
152153
}
153154
```
155+
When the user joins the breakout room, the user is removed from the main meeting. Subscribe to the breakout room features from the call object which you get in the callsUpdated `added` list to get the other updates of breakout rooms like breakoutrooms closed or breakoutrooms assignment changed in `breakoutRoomsUpdated` event.
156+
157+
```js
158+
callAgent.on('callsUpdated', e =>{
159+
e.added.foreach((call) => {
160+
if(call.id == mainMeetingCall.id){
161+
call.feature(SDK.Features.BreakoutRooms).on('breakoutRoomsUpdated', breakoutRoomsUpdatedListener);
162+
}
163+
}
164+
});
165+
```
154166
155167
### Leave breakout room
156168
157-
When the breakout room state is `closed`, then the user is automatically moved to the main meeting. 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`.
169+
When the breakout room state is `closed`, then the user has to join the main meeting using the mainmeeting url 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`.
158170
159171
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:
160172
161173
```js
162174
const breakoutRoomsSettings = breakoutRoomsFeature.breakoutRoomsSettings;
175+
const mainMeetingUrl = breakoutRoomsFeature.breakoutRoomsSettings.mainMeetingUrl;
163176
if(breakoutRoomCall != null && !breakoutRoomsSettings.disableReturnToMainMeeting){
164177
breakoutRoomCall.hangUp();
165-
mainMeetingCall.resume();
178+
//join mainMeeting using the mainmeeting url
166179
}
167180
```
168181

0 commit comments

Comments
 (0)