Skip to content

Commit cdccb84

Browse files
Merge pull request #287390 from sravanthivelidandla/insravan/breakoutRooms_updates
Insravan/breakout rooms updates
2 parents 9ce2f3e + e8ceb95 commit cdccb84

File tree

2 files changed

+58
-20
lines changed

2 files changed

+58
-20
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ ms.custom: template-how-to
1515

1616
This article describes how to implement Microsoft Teams breakout rooms with Azure Communication Services. This capability enables Azure Communication Services users in Teams meetings to participate in breakout rooms. Teams administrators control the availability of breakout rooms in Teams meeting with Teams meeting policy. You can find additional information about breakout rooms in [Teams documentation](https://support.microsoft.com/office/use-breakout-rooms-in-microsoft-teams-meetings-7de1f48a-da07-466c-a5ab-4ebace28e461).
1717

18-
[!INCLUDE [Public Preview Disclaimer](../../includes/public-preview-include-document.md)]
19-
2018
## Prerequisites
2119

2220
- An Azure account with an active subscription. See [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).

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

Lines changed: 58 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ const breakoutRoomsFeature = mainMeetingCall.feature(Features.BreakoutRooms);
2525

2626
### Subscribe to breakoutRoom events
2727

28-
The `BreakoutRooms` API enables you to subscribe to `BreakoutRooms` events. A `breakoutRoomsUpdated` event comes from a `BreakoutRoomsCallFeature` instance and contains information about the created, updated, and assigned breakout rooms.
29-
30-
To receive breakout room details, subscribe to the `breakoutRoomsUpdated` event.
28+
The `BreakoutRooms` API allows you to subscribe to `BreakoutRooms` events. A `breakoutRoomsUpdated` event comes from a `BreakoutRoomsCallFeature` instance and contains information about the created, updated, and assigned breakout rooms.
3129

30+
To receive breakout room details, subscribe to the `breakoutRoomsUpdated` event.
3231
```js
3332
breakoutRoomsFeature.on('breakoutRoomsUpdated', breakoutRoomsUpdatedListener);
3433
```
@@ -96,9 +95,7 @@ Event `breakoutRoomsUpdated` provides an instance of one of the following classe
9695
data: Call | TeamsCall;
9796
}
9897
```
99-
100-
The following code shows the useful information received in the breakout room events:
101-
98+
The following code shows you valuable information received in the breakout room events:
10299
```js
103100
const breakoutRoomsUpdatedListener = (event) => {
104101
switch(event.type) {
@@ -118,13 +115,13 @@ The following code shows the useful information received in the breakout room ev
118115
break;
119116
case "breakoutRoomsSettings":
120117
const breakoutRoomSettings = event.data;
121-
console.log(`Breakout room ends at: ${breakoutRoomSettings.roomEndTime}`);
118+
console.log(`Breakout room ends at: ${breakoutRoomSettings.roomEndTime}`);
122119
console.log(`Disable the user to return to main meeting from breakout room call : ${breakoutRoomSettings.disableReturnToMainMeeting}`);
123120
break;
124121
case "join":
125122
const breakoutRoomCall = event.data;
126123
console.log(`You have joined breakout room with call ID: ${breakoutRoomCall.id}`);
127-
break;
124+
break;
128125
}
129126
}
130127
breakoutRoomsFeature.on('breakoutRoomsUpdated', breakoutRoomsUpdatedListener);
@@ -166,19 +163,59 @@ if(breakoutRoom.state == 'open' && !breakoutRoom.autoMoveParticipantToBreakoutRo
166163
const breakoutRoomCall = await breakoutRoom.join();
167164
}
168165
```
166+
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.
167+
168+
```js
169+
//Breakout room which is assigned initially.
170+
const breakoutRoom = breakoutRoomsFeature.assignedBreakoutRoom;
171+
if(breakoutRoom.state == 'open' && !breakoutRoom.autoMoveParticipantToBreakoutRoom) {
172+
const breakoutRoomCall = await breakoutRoom.join();
173+
}
174+
175+
// `breakoutRoomsUpdated` event which contains the details of the new breakout room
176+
let assignedRoom = undefined;
177+
const breakoutRoomsUpdatedListener = (event) => {
178+
switch(event.type) {
179+
case "assignedBreakoutRooms":
180+
const assignedRoom = event.data;
181+
break;
182+
}
183+
}
184+
185+
if(assignedRoom.threadId != breakoutRoom.threadId && breakoutRooms != null)
186+
{
187+
await breakoutRoom.hangUp();
188+
}
189+
if(assignedRoom.state == 'open' && !assignedRoom.autoMoveParticipantToBreakoutRoom) {
190+
const breakoutRoomCall = await assignedRoom.join();
191+
}
192+
```
193+
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 initially and eventually removed from the main meeting. The user has to initialize the breakoutRooms Feature for the `breakoutRoomCall` inorder to receive updates on the breakout room.
194+
195+
If the user wants to join any of the breakout rooms , then the user explicitly calls the `join` method.
196+
197+
```js
198+
const breakoutRoom = breakoutRoomsFeature.breakoutRooms[0];
199+
if(breakoutRoom.state == 'open') {
200+
const breakoutRoomCall = await breakoutRoom.join();
201+
}
202+
```
203+
To exit a breakout room, users should execute the `hangUp()` function on the breakout room call. The user would be calling `ReturnToMainMeeting` to resume the main meeting call.
204+
205+
```js
206+
breakoutRoomCall.hangUp();
207+
const mainMeetingCall = breakoutRoomCall.returnToMainMeeting();
208+
```
169209

170210
### Leave breakout room
171211

172-
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`.
212+
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 leaves the breakout room automatically and can return to the main meeting by calling `returnToMainMeeting()` as shown above.
173213

174-
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:
214+
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 return to the main meeting call with the following code:
175215

176216
```js
177-
const breakoutRoomsSettings = breakoutRoomsFeature.breakoutRoomsSettings;
178-
if(breakoutRoomCall != null && !breakoutRoomsSettings.disableReturnToMainMeeting){
179-
breakoutRoomCall.hangUp();
180-
mainMeetingCall.resume();
181-
}
217+
breakoutRoomCall.hangUp();
218+
const mainMeetingCall = breakoutRoomCall.returnToMainMeeting();
182219
```
183220

184221
### Get participants of the breakout room
@@ -208,7 +245,7 @@ Breakout rooms have the following properties:
208245
const displayName : string = breakoutRoom.displayName;
209246
const threadId : string = breakoutRoom.threadId;
210247
const state : BreakoutRoomState = breakoutRoom.state;
211-
const autoMoveParticipantToBreakoutRoom : boolean = breakoutRoom.autoMoveParticipantToBreakoutRoom;
248+
const autoMoveParticipantToBreakoutRoom : boolean = breakoutRoom.autoMoveParticipantToBreakoutRoom;
212249
const call : Call | TeamsCall = breakoutRoom.call;
213250
const invitees : Invitee[] = breakoutRoom.invitees;
214251
```
@@ -247,5 +284,8 @@ const roomEndTime : TimestampInfo = breakoutRoomsSettings.roomEndTime;
247284
|412 | 46256| ExpectedError | Unable to join Breakout Room as the room is closed. | Ensure that the `state` of `assignedBreakoutRoom` is `open` and call `breakoutRoomsFeature.assignedBreakoutRoom.join()` method explicitly.|
248285
|412 | 46257| UnexpectedServerError | Unable to resume main meeting. | Follow the instructions defined in the section `Leave breakout room` for manual leaving of breakout room. If the issue persists, gather browser console logs and contact Azure Communication Services support. |
249286
|412| 46258 | UnexpectedClientError | Unable to read breakout room details. | Gather browser console logs and contact Azure Communication Services support. |
250-
|500 | 46259| UnexpectedServerError | Couldn't hang up the Breakout room call. | Follow the instructions defined in the section `Leave breakout room` for manual leaving of breakout room. |
251-
|412| 46260 | UnexpectedClientError | Can't join Breakout Room as it isn't 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. |
287+
|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. |
288+
|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. |
289+
|412| 46261 | UnexpectedClientError | Unable to join the main meeting. | Please try again by calling the `breakoutRoomsFeature.assignedBreakoutRoom.returnToMainMeeting()` method. If the issue persists, gather browser console logs and contact Azure Communication Services support.|
290+
|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.|
291+
|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. |

0 commit comments

Comments
 (0)