Skip to content

Commit 1b7742a

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

File tree

1 file changed

+54
-3
lines changed

1 file changed

+54
-3
lines changed

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

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ if(breakoutRoom.state == 'open' && !breakoutRoom.autoMoveParticipantToBreakoutRo
152152
const breakoutRoomCall = await breakoutRoom.join();
153153
}
154154
```
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.
155+
When the user joins the breakout room, the user is automatically removed from the main meeting. Subscribe to the breakout room features from the `call` object in the callsUpdated `added` list to get the other updates of breakout rooms like breakout rooms closed or breakout rooms assignment changed events.
156156

157157
```js
158158
callAgent.on('callsUpdated', e =>{
@@ -164,9 +164,53 @@ callAgent.on('callsUpdated', e =>{
164164
});
165165
```
166166
167+
When the user is in a breakout room and the organizer assigns a new breakout room to the user, the user will get `breakoutRoomsUpdated` event with the type `assignedBreakoutRooms`. This event will contain the latest breakout room details. The user has to `hangUp()` previous breakout room call. If `autoMoveParticipantToBreakoutRoom` is set to `true`, the user will be automatically moved, other wise the user has to call the `join` method explicitly on the new breakout room as shown above.
168+
169+
```js
170+
//Breakout room which is assigned initially.
171+
const breakoutRoom = breakoutRoomsFeature.assignedBreakoutRoom;
172+
if(breakoutRoom.state == 'open' && !breakoutRoom.autoMoveParticipantToBreakoutRoom) {
173+
const breakoutRoomCall = await breakoutRoom.join();
174+
}
175+
176+
// `breakoutRoomsUpdated` event which contains the details of the new breakout room
177+
let assignedRoom = undefined;
178+
const breakoutRoomsUpdatedListener = (event) => {
179+
switch(event.type) {
180+
case "assignedBreakoutRooms":
181+
const assignedRoom = event.data;
182+
break;
183+
}
184+
}
185+
186+
if(assignedRoom.threadId != breakoutRoom.threadId)
187+
{
188+
await breakoutRoom.hangUp();
189+
}
190+
if(assignedRoom.state == 'open' && !assignedRoom.autoMoveParticipantToBreakoutRoom) {
191+
const breakoutRoomCall = await assignedRoom.join();
192+
}
193+
```
194+
195+
Microsoft 365 user with role organizer, co-organizer, or breakout room manager will 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 will be kept on hold in the mainmeeting. When the leaves the breakoutroom, then the user's main meeting call will be automatically resumed.
196+
197+
If the user wants to join any of the breakout rooms , then the user explicitly calls the `join` method.
198+
199+
```js
200+
const breakoutRoom = breakoutRoomsFeature.breakoutRooms[0];
201+
if(breakoutRoom.state == 'open') {
202+
const breakoutRoomCall = await breakoutRoom.join();
203+
}
204+
```
205+
To exit a breakout room, users should execute the `hangUp()` function on the breakout room call. The user will be automatically resumed in the main meeting.
206+
207+
```js
208+
breakoutRoomCall.hangUp();
209+
```
210+
167211
### Leave breakout room
168212
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`.
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`.
170214
171215
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:
172216
@@ -175,7 +219,9 @@ const breakoutRoomsSettings = breakoutRoomsFeature.breakoutRoomsSettings;
175219
const mainMeetingUrl = breakoutRoomsFeature.breakoutRoomsSettings.mainMeetingUrl;
176220
if(breakoutRoomCall != null && !breakoutRoomsSettings.disableReturnToMainMeeting){
177221
breakoutRoomCall.hangUp();
178-
//join mainMeeting using the mainmeeting url
222+
//join mainMeeting using the mainmeeting url
223+
const locator = { meetingLink: '<MEETING_LINK>'}
224+
const mainMeetingCall = callAgent.join(locator);
179225
}
180226
```
181227
@@ -240,6 +286,11 @@ const roomEndTime : TimestampInfo = breakoutRoomsSettings.roomEndTime;
240286
```
241287
- `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.
242288
289+
```js
290+
const mainMeetingUrl : string = breakoutRoomsSettings.mainMeetingUrl;
291+
```
292+
- `mainMeetingUrl`: Url of the main meeting. This property is read-only.
293+
243294
### Troubleshooting
244295
245296
|Error code| Subcode | Result Category | Reason | Resolution |

0 commit comments

Comments
 (0)