@whereby.com/core 1.16.3 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +714 -409
- package/dist/index.d.cts +90 -9
- package/dist/index.d.mts +90 -9
- package/dist/index.d.ts +90 -9
- package/dist/index.mjs +710 -410
- package/dist/legacy-esm.js +710 -410
- package/dist/redux/index.cjs +708 -429
- package/dist/redux/index.d.cts +352 -35
- package/dist/redux/index.d.mts +352 -35
- package/dist/redux/index.d.ts +352 -35
- package/dist/redux/index.js +676 -430
- package/dist/redux/index.mjs +676 -430
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1226,7 +1226,7 @@ const createReactor = (selectors, callback) => {
|
|
|
1226
1226
|
});
|
|
1227
1227
|
};
|
|
1228
1228
|
|
|
1229
|
-
const coreVersion = "1.
|
|
1229
|
+
const coreVersion = "1.18.0";
|
|
1230
1230
|
|
|
1231
1231
|
function decodeRoomName(roomName) {
|
|
1232
1232
|
if (!roomName) {
|
|
@@ -1289,6 +1289,9 @@ const signalEvents = {
|
|
|
1289
1289
|
breakoutMoveToGroup: createSignalEventAction("breakoutMoveToGroup"),
|
|
1290
1290
|
breakoutMoveToMain: createSignalEventAction("breakoutMoveToMain"),
|
|
1291
1291
|
breakoutSessionUpdated: createSignalEventAction("breakoutSessionUpdated"),
|
|
1292
|
+
breakoutEnding: createSignalEventAction("breakoutEnding"),
|
|
1293
|
+
breakoutTimerEnded: createSignalEventAction("breakoutTimerEnded"),
|
|
1294
|
+
breakoutTimerExtended: createSignalEventAction("breakoutTimerExtended"),
|
|
1292
1295
|
chatMessage: createSignalEventAction("chatMessage"),
|
|
1293
1296
|
chatMessageRemoved: createSignalEventAction("chatMessageRemoved"),
|
|
1294
1297
|
fileSharingError: createSignalEventAction("fileSharingError"),
|
|
@@ -1329,6 +1332,7 @@ const ROOM_ACTION_PERMISSIONS_BY_ROLE = {
|
|
|
1329
1332
|
canEndMeeting: ["host"],
|
|
1330
1333
|
canAskToSpeak: ["host"],
|
|
1331
1334
|
canSpotlight: ["host"],
|
|
1335
|
+
canManageBreakout: ["host"],
|
|
1332
1336
|
};
|
|
1333
1337
|
const authorizationSliceInitialState = {
|
|
1334
1338
|
roomKey: null,
|
|
@@ -1371,6 +1375,7 @@ const selectIsAuthorizedToKickClient = toolkit.createSelector(selectAuthorizatio
|
|
|
1371
1375
|
const selectIsAuthorizedToEndMeeting = toolkit.createSelector(selectAuthorizationRoleName, (localParticipantRole) => ROOM_ACTION_PERMISSIONS_BY_ROLE.canEndMeeting.includes(localParticipantRole));
|
|
1372
1376
|
const selectIsAuthorizedToAskToSpeak = toolkit.createSelector(selectAuthorizationRoleName, (localParticipantRole) => ROOM_ACTION_PERMISSIONS_BY_ROLE.canAskToSpeak.includes(localParticipantRole));
|
|
1373
1377
|
const selectIsAuthorizedToSpotlight = toolkit.createSelector(selectAuthorizationRoleName, (localParticipantRole) => ROOM_ACTION_PERMISSIONS_BY_ROLE.canSpotlight.includes(localParticipantRole));
|
|
1378
|
+
const selectIsAuthorizedToManageBreakout = toolkit.createSelector(selectAuthorizationRoleName, (localParticipantRole) => ROOM_ACTION_PERMISSIONS_BY_ROLE.canManageBreakout.includes(localParticipantRole));
|
|
1374
1379
|
|
|
1375
1380
|
function createAppAsyncThunk(typePrefix, payloadCreator) {
|
|
1376
1381
|
return toolkit.createAsyncThunk(typePrefix, payloadCreator);
|
|
@@ -1505,6 +1510,9 @@ function forwardSocketEvents(socket, dispatch) {
|
|
|
1505
1510
|
socket.on("breakout_session_updated", (payload) => dispatch(signalEvents.breakoutSessionUpdated(payload)));
|
|
1506
1511
|
socket.on("breakout_move_to_group", () => dispatch(signalEvents.breakoutMoveToGroup()));
|
|
1507
1512
|
socket.on("breakout_move_to_main", () => dispatch(signalEvents.breakoutMoveToMain()));
|
|
1513
|
+
socket.on("breakout_ending", () => dispatch(signalEvents.breakoutEnding()));
|
|
1514
|
+
socket.on("breakout_timer_ended", () => dispatch(signalEvents.breakoutTimerEnded()));
|
|
1515
|
+
socket.on("breakout_timer_extended", () => dispatch(signalEvents.breakoutTimerExtended()));
|
|
1508
1516
|
}
|
|
1509
1517
|
const SIGNAL_BASE_URL = "wss://signal.appearin.net";
|
|
1510
1518
|
function createSocket() {
|
|
@@ -2206,202 +2214,6 @@ const selectLocalParticipantView = toolkit.createSelector(selectLocalParticipant
|
|
|
2206
2214
|
return clientView;
|
|
2207
2215
|
});
|
|
2208
2216
|
|
|
2209
|
-
function createBreakout({ assignments, groups, startedAt, initiatedBy, breakoutStartedAt, breakoutEndedAt, breakoutNotification, breakoutTimerDuration, autoMoveToGroup, moveToGroupGracePeriod, autoMoveToMain, moveToMainGracePeriod, enforceAssignment, breakoutTimerSetting, } = {}) {
|
|
2210
|
-
return {
|
|
2211
|
-
assignments: assignments || null,
|
|
2212
|
-
groups: groups || null,
|
|
2213
|
-
startedAt: startedAt ? new Date(startedAt) : null,
|
|
2214
|
-
initiatedBy,
|
|
2215
|
-
breakoutStartedAt: breakoutStartedAt || null,
|
|
2216
|
-
breakoutEndedAt: breakoutEndedAt || null,
|
|
2217
|
-
breakoutNotification: breakoutNotification || null,
|
|
2218
|
-
breakoutTimerDuration: breakoutTimerDuration || 1800,
|
|
2219
|
-
autoMoveToGroup: autoMoveToGroup || false,
|
|
2220
|
-
moveToGroupGracePeriod: moveToGroupGracePeriod || 10,
|
|
2221
|
-
autoMoveToMain: autoMoveToMain || false,
|
|
2222
|
-
moveToMainGracePeriod: moveToMainGracePeriod || 30,
|
|
2223
|
-
enforceAssignment: enforceAssignment || false,
|
|
2224
|
-
breakoutTimerSetting: breakoutTimerSetting || false,
|
|
2225
|
-
};
|
|
2226
|
-
}
|
|
2227
|
-
const breakoutSliceInitialState = Object.assign(Object.assign({}, createBreakout()), { groupId: null });
|
|
2228
|
-
const breakoutSlice = toolkit.createSlice({
|
|
2229
|
-
name: "breakout",
|
|
2230
|
-
initialState: breakoutSliceInitialState,
|
|
2231
|
-
reducers: {},
|
|
2232
|
-
extraReducers: (builder) => {
|
|
2233
|
-
builder.addCase(signalEvents.roomJoined, (state, action) => {
|
|
2234
|
-
if ("error" in action.payload) {
|
|
2235
|
-
return state;
|
|
2236
|
-
}
|
|
2237
|
-
const { breakout } = action.payload || {};
|
|
2238
|
-
if (breakout) {
|
|
2239
|
-
return Object.assign(Object.assign({}, state), createBreakout(breakout));
|
|
2240
|
-
}
|
|
2241
|
-
return state;
|
|
2242
|
-
});
|
|
2243
|
-
builder.addCase(signalEvents.breakoutSessionUpdated, (state, action) => {
|
|
2244
|
-
return Object.assign(Object.assign({}, state), createBreakout(action.payload));
|
|
2245
|
-
});
|
|
2246
|
-
builder.addCase(signalEvents.breakoutGroupJoined, (state, action) => {
|
|
2247
|
-
var _a;
|
|
2248
|
-
if (((_a = action.meta) === null || _a === void 0 ? void 0 : _a.localParticipantId) !== action.payload.clientId) {
|
|
2249
|
-
return state;
|
|
2250
|
-
}
|
|
2251
|
-
return Object.assign(Object.assign({}, state), { groupId: action.payload.group });
|
|
2252
|
-
});
|
|
2253
|
-
},
|
|
2254
|
-
});
|
|
2255
|
-
const doBreakoutJoin = createAppThunk((payload) => (_, getState) => {
|
|
2256
|
-
const state = getState();
|
|
2257
|
-
const { socket } = selectSignalConnectionRaw(state);
|
|
2258
|
-
socket === null || socket === void 0 ? void 0 : socket.emit("join_breakout_group", { group: payload.group });
|
|
2259
|
-
});
|
|
2260
|
-
const selectBreakoutRaw = (state) => state.breakout;
|
|
2261
|
-
const selectBreakoutActive = (state) => !!state.breakout.startedAt;
|
|
2262
|
-
const selectBreakoutAssignments = (state) => state.breakout.assignments;
|
|
2263
|
-
const selectBreakoutGroups = (state) => state.breakout.groups;
|
|
2264
|
-
const selectBreakoutCurrentId = toolkit.createSelector(selectBreakoutRaw, selectLocalParticipantBreakoutGroup, (raw, localParticipantBreakoutGroup) => {
|
|
2265
|
-
return raw.groupId || localParticipantBreakoutGroup || "";
|
|
2266
|
-
});
|
|
2267
|
-
const selectBreakoutCurrentGroup = toolkit.createSelector(selectBreakoutRaw, selectBreakoutCurrentId, (raw, breakoutCurrentId) => {
|
|
2268
|
-
var _a;
|
|
2269
|
-
const name = (_a = raw.groups) === null || _a === void 0 ? void 0 : _a[breakoutCurrentId];
|
|
2270
|
-
if (!name)
|
|
2271
|
-
return null;
|
|
2272
|
-
return { id: breakoutCurrentId, name };
|
|
2273
|
-
});
|
|
2274
|
-
startAppListening({
|
|
2275
|
-
actionCreator: signalEvents.breakoutMoveToGroup,
|
|
2276
|
-
effect: (_, { dispatch, getState }) => {
|
|
2277
|
-
const state = getState();
|
|
2278
|
-
const localParticipant = selectLocalParticipantRaw(state);
|
|
2279
|
-
const breakoutGroupAssigned = localParticipant.breakoutGroupAssigned;
|
|
2280
|
-
if (breakoutGroupAssigned) {
|
|
2281
|
-
dispatch(doBreakoutJoin({ group: breakoutGroupAssigned }));
|
|
2282
|
-
}
|
|
2283
|
-
},
|
|
2284
|
-
});
|
|
2285
|
-
startAppListening({
|
|
2286
|
-
actionCreator: signalEvents.breakoutMoveToMain,
|
|
2287
|
-
effect: (_, { dispatch }) => {
|
|
2288
|
-
dispatch(doBreakoutJoin({ group: "" }));
|
|
2289
|
-
},
|
|
2290
|
-
});
|
|
2291
|
-
startAppListening({
|
|
2292
|
-
actionCreator: signalEvents.breakoutSessionUpdated,
|
|
2293
|
-
effect: ({ payload }, { dispatch, getState }) => {
|
|
2294
|
-
var _a;
|
|
2295
|
-
const state = getState();
|
|
2296
|
-
const autoMoveToMain = selectBreakoutRaw(state).autoMoveToMain;
|
|
2297
|
-
if (((_a = payload.initiatedBy) === null || _a === void 0 ? void 0 : _a.active) === false) {
|
|
2298
|
-
if (!autoMoveToMain) {
|
|
2299
|
-
dispatch(doBreakoutJoin({ group: "" }));
|
|
2300
|
-
}
|
|
2301
|
-
}
|
|
2302
|
-
},
|
|
2303
|
-
});
|
|
2304
|
-
|
|
2305
|
-
const chatSliceInitialState = {
|
|
2306
|
-
chatMessages: [],
|
|
2307
|
-
};
|
|
2308
|
-
const chatSlice = toolkit.createSlice({
|
|
2309
|
-
name: "chat",
|
|
2310
|
-
initialState: chatSliceInitialState,
|
|
2311
|
-
reducers: {},
|
|
2312
|
-
extraReducers(builder) {
|
|
2313
|
-
builder.addCase(signalEvents.chatMessage, (state, action) => {
|
|
2314
|
-
const message = Object.assign({ id: action.payload.id, senderId: action.payload.senderId, parentId: action.payload.parentId, timestamp: action.payload.timestamp, text: action.payload.text, sig: action.payload.sig, removed: false }, (action.payload.file && { file: action.payload.file }));
|
|
2315
|
-
return Object.assign(Object.assign({}, state), { chatMessages: [...state.chatMessages, message] });
|
|
2316
|
-
});
|
|
2317
|
-
builder.addCase(signalEvents.chatMessageRemoved, (state, action) => {
|
|
2318
|
-
return Object.assign(Object.assign({}, state), { chatMessages: state.chatMessages.map((m) => {
|
|
2319
|
-
return Object.assign(Object.assign({}, m), (m.id === action.payload.id && {
|
|
2320
|
-
removed: true,
|
|
2321
|
-
}));
|
|
2322
|
-
}) });
|
|
2323
|
-
});
|
|
2324
|
-
},
|
|
2325
|
-
});
|
|
2326
|
-
const doSendChatMessage = createRoomConnectedThunk((payload) => (_, getState) => {
|
|
2327
|
-
const state = getState();
|
|
2328
|
-
const socket = selectSignalConnectionRaw(state).socket;
|
|
2329
|
-
const breakoutCurrentId = selectBreakoutCurrentId(state);
|
|
2330
|
-
socket === null || socket === void 0 ? void 0 : socket.emit("chat_message", Object.assign(Object.assign(Object.assign({ text: payload.text }, (payload.parentId && { parentId: payload.parentId })), (breakoutCurrentId && { breakoutGroup: breakoutCurrentId })), (payload.isBroadcast && { broadcast: true })));
|
|
2331
|
-
});
|
|
2332
|
-
const doRemoveChatMessage = createRoomConnectedThunk(({ id, sig }) => (_, getState) => {
|
|
2333
|
-
const state = getState();
|
|
2334
|
-
const socket = selectSignalConnectionRaw(state).socket;
|
|
2335
|
-
socket === null || socket === void 0 ? void 0 : socket.emit("remove_chat_message", {
|
|
2336
|
-
id,
|
|
2337
|
-
sig,
|
|
2338
|
-
});
|
|
2339
|
-
});
|
|
2340
|
-
const selectChatMessages = (state) => state.chat.chatMessages;
|
|
2341
|
-
|
|
2342
|
-
const initialCloudRecordingState = {
|
|
2343
|
-
isInitiator: false,
|
|
2344
|
-
isRecording: false,
|
|
2345
|
-
startedAt: undefined,
|
|
2346
|
-
};
|
|
2347
|
-
const cloudRecordingSlice = toolkit.createSlice({
|
|
2348
|
-
name: "cloudRecording",
|
|
2349
|
-
initialState: initialCloudRecordingState,
|
|
2350
|
-
reducers: {
|
|
2351
|
-
recordingRequestStarted: (state) => {
|
|
2352
|
-
return Object.assign(Object.assign({}, state), { isInitiator: true, status: "requested" });
|
|
2353
|
-
},
|
|
2354
|
-
},
|
|
2355
|
-
extraReducers: (builder) => {
|
|
2356
|
-
builder.addCase(signalEvents.cloudRecordingStopped, (state) => {
|
|
2357
|
-
return Object.assign(Object.assign({}, state), { isInitiator: false, isRecording: false, status: undefined });
|
|
2358
|
-
});
|
|
2359
|
-
builder.addCase(signalEvents.cloudRecordingStarted, (state, action) => {
|
|
2360
|
-
const { payload } = action;
|
|
2361
|
-
if (!payload.error) {
|
|
2362
|
-
return state;
|
|
2363
|
-
}
|
|
2364
|
-
return Object.assign(Object.assign({}, state), { isInitiator: false, isRecording: false, status: "error", error: payload.error });
|
|
2365
|
-
});
|
|
2366
|
-
builder.addCase(signalEvents.newClient, (state, { payload }) => {
|
|
2367
|
-
var _a;
|
|
2368
|
-
const { client } = payload;
|
|
2369
|
-
if (((_a = client.role) === null || _a === void 0 ? void 0 : _a.roleName) === "recorder") {
|
|
2370
|
-
return Object.assign(Object.assign({}, state), { isRecording: true, status: "recording", startedAt: client.startedCloudRecordingAt
|
|
2371
|
-
? new Date(client.startedCloudRecordingAt).getTime()
|
|
2372
|
-
: new Date().getTime() });
|
|
2373
|
-
}
|
|
2374
|
-
return state;
|
|
2375
|
-
});
|
|
2376
|
-
},
|
|
2377
|
-
});
|
|
2378
|
-
const { recordingRequestStarted } = cloudRecordingSlice.actions;
|
|
2379
|
-
const doStartCloudRecording = createRoomConnectedThunk(() => (dispatch, getState) => {
|
|
2380
|
-
const state = getState();
|
|
2381
|
-
const socket = selectSignalConnectionRaw(state).socket;
|
|
2382
|
-
const status = selectCloudRecordingStatus(state);
|
|
2383
|
-
if (status && ["recording", "requested"].includes(status)) {
|
|
2384
|
-
return;
|
|
2385
|
-
}
|
|
2386
|
-
socket === null || socket === void 0 ? void 0 : socket.emit("start_recording", {
|
|
2387
|
-
recording: "cloud",
|
|
2388
|
-
});
|
|
2389
|
-
dispatch(recordingRequestStarted());
|
|
2390
|
-
});
|
|
2391
|
-
const doStopCloudRecording = createRoomConnectedThunk(() => (dispatch, getState) => {
|
|
2392
|
-
const state = getState();
|
|
2393
|
-
const socket = selectSignalConnectionRaw(state).socket;
|
|
2394
|
-
socket === null || socket === void 0 ? void 0 : socket.emit("stop_recording");
|
|
2395
|
-
});
|
|
2396
|
-
const selectCloudRecordingRaw = (state) => state.cloudRecording;
|
|
2397
|
-
const selectCloudRecordingStatus = (state) => state.cloudRecording.status;
|
|
2398
|
-
const selectIsCloudRecording = (state) => state.cloudRecording.isRecording;
|
|
2399
|
-
const selectCloudRecordingIsInitiator = (state) => state.cloudRecording.isInitiator;
|
|
2400
|
-
|
|
2401
|
-
const selectRoomConnectionSessionId = (state) => { var _a; return (_a = state.roomConnection.session) === null || _a === void 0 ? void 0 : _a.id; };
|
|
2402
|
-
const selectRoomConnectionStatus = (state) => state.roomConnection.status;
|
|
2403
|
-
const selectRoomConnectionError = (state) => state.roomConnection.error;
|
|
2404
|
-
|
|
2405
2217
|
function createRtcEventAction(name) {
|
|
2406
2218
|
return toolkit.createAction(`rtcConnection/event/${name}`);
|
|
2407
2219
|
}
|
|
@@ -2578,45 +2390,615 @@ const remoteParticipantsSlice = toolkit.createSlice({
|
|
|
2578
2390
|
});
|
|
2579
2391
|
builder.addCase(signalEvents.breakoutGroupJoined, (state, action) => {
|
|
2580
2392
|
const { clientId, group } = action.payload;
|
|
2393
|
+
if (!findParticipant(state, clientId).participant) {
|
|
2394
|
+
return state;
|
|
2395
|
+
}
|
|
2581
2396
|
return updateParticipant(state, clientId, {
|
|
2582
2397
|
breakoutGroup: group || null,
|
|
2583
2398
|
});
|
|
2584
2399
|
});
|
|
2585
|
-
builder.addCase(signalEvents.screenshareStarted, (state, action) => {
|
|
2586
|
-
const { clientId, streamId } = action.payload;
|
|
2587
|
-
return addStreamId(state, clientId, streamId);
|
|
2400
|
+
builder.addCase(signalEvents.screenshareStarted, (state, action) => {
|
|
2401
|
+
const { clientId, streamId } = action.payload;
|
|
2402
|
+
return addStreamId(state, clientId, streamId);
|
|
2403
|
+
});
|
|
2404
|
+
builder.addCase(signalEvents.screenshareStopped, (state, action) => {
|
|
2405
|
+
const { clientId, streamId } = action.payload;
|
|
2406
|
+
return removeStreamId(state, clientId, streamId);
|
|
2407
|
+
});
|
|
2408
|
+
},
|
|
2409
|
+
});
|
|
2410
|
+
const { participantStreamAdded, participantStreamIdAdded, streamStatusUpdated } = remoteParticipantsSlice.actions;
|
|
2411
|
+
const doRequestAudioEnable = createAuthorizedRoomConnectedThunk((state) => selectIsAuthorizedToRequestAudioEnable(state), (payload) => (_, getState) => {
|
|
2412
|
+
const state = getState();
|
|
2413
|
+
const canEnableRemoteAudio = selectIsAuthorizedToAskToSpeak(state);
|
|
2414
|
+
if (payload.enable && !canEnableRemoteAudio) {
|
|
2415
|
+
console.warn("Not authorized to perform this action");
|
|
2416
|
+
return;
|
|
2417
|
+
}
|
|
2418
|
+
const socket = selectSignalConnectionRaw(state).socket;
|
|
2419
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("request_audio_enable", payload);
|
|
2420
|
+
});
|
|
2421
|
+
const doRequestVideoEnable = createAuthorizedRoomConnectedThunk((state) => selectIsAuthorizedToRequestVideoEnable(state), (payload) => (_, getState) => {
|
|
2422
|
+
const state = getState();
|
|
2423
|
+
const socket = selectSignalConnectionRaw(state).socket;
|
|
2424
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("request_video_enable", payload);
|
|
2425
|
+
});
|
|
2426
|
+
const selectRemoteClients = (state) => state.remoteParticipants.remoteParticipants;
|
|
2427
|
+
const selectRemoteParticipants = toolkit.createSelector(selectRemoteClients, (clients) => clients.filter((c) => !NON_PERSON_ROLES.includes(c.roleName)));
|
|
2428
|
+
const selectNumClients = toolkit.createSelector(selectRemoteClients, (clients) => clients.length + 1);
|
|
2429
|
+
toolkit.createSelector(selectRemoteParticipants, selectLocalParticipantRaw, (clients, localParticipant) => {
|
|
2430
|
+
if (NON_PERSON_ROLES.includes(localParticipant.roleName)) {
|
|
2431
|
+
return clients.length;
|
|
2432
|
+
}
|
|
2433
|
+
return clients.length + 1;
|
|
2434
|
+
});
|
|
2435
|
+
|
|
2436
|
+
const selectRoomConnectionSessionId = (state) => { var _a; return (_a = state.roomConnection.session) === null || _a === void 0 ? void 0 : _a.id; };
|
|
2437
|
+
const selectRoomConnectionStatus = (state) => state.roomConnection.status;
|
|
2438
|
+
const selectRoomConnectionError = (state) => state.roomConnection.error;
|
|
2439
|
+
const selectRoomConnectionKnockResponse = (state) => state.roomConnection.knockResponse;
|
|
2440
|
+
|
|
2441
|
+
const emitter = new events$1.EventEmitter();
|
|
2442
|
+
function createNotificationEvent(payload) {
|
|
2443
|
+
const notificationEvent = Object.assign(Object.assign({}, payload), { timestamp: Date.now() });
|
|
2444
|
+
return notificationEvent;
|
|
2445
|
+
}
|
|
2446
|
+
const initialNotificationsState = {
|
|
2447
|
+
emitter,
|
|
2448
|
+
events: [],
|
|
2449
|
+
};
|
|
2450
|
+
const notificationsSlice = toolkit.createSlice({
|
|
2451
|
+
name: "notifications",
|
|
2452
|
+
initialState: initialNotificationsState,
|
|
2453
|
+
reducers: {
|
|
2454
|
+
addNotification: (state, action) => {
|
|
2455
|
+
return Object.assign(Object.assign({}, state), { events: [...state.events, Object.assign({}, action.payload)] });
|
|
2456
|
+
},
|
|
2457
|
+
doClearNotifications: (state) => {
|
|
2458
|
+
return Object.assign(Object.assign({}, state), { events: [] });
|
|
2459
|
+
},
|
|
2460
|
+
},
|
|
2461
|
+
});
|
|
2462
|
+
const { doClearNotifications } = notificationsSlice.actions;
|
|
2463
|
+
const doSetNotification = createAppThunk((payload) => (dispatch, getState) => {
|
|
2464
|
+
dispatch(notificationsSlice.actions.addNotification(payload));
|
|
2465
|
+
const state = getState();
|
|
2466
|
+
const emitter = selectNotificationsEmitter(state);
|
|
2467
|
+
emitter.emit(payload.type, payload);
|
|
2468
|
+
emitter.emit("*", payload);
|
|
2469
|
+
});
|
|
2470
|
+
const selectNotificationsEmitter = (state) => state.notifications.emitter;
|
|
2471
|
+
startAppListening({
|
|
2472
|
+
actionCreator: signalEvents.chatMessage,
|
|
2473
|
+
effect: ({ payload }, { dispatch, getState }) => {
|
|
2474
|
+
const state = getState();
|
|
2475
|
+
const selfId = selectSelfId(state);
|
|
2476
|
+
if (selfId === payload.senderId) {
|
|
2477
|
+
return;
|
|
2478
|
+
}
|
|
2479
|
+
const client = selectRemoteParticipants(state).find(({ id }) => id === payload.senderId);
|
|
2480
|
+
if (!client) {
|
|
2481
|
+
console.warn("Could not find remote client that sent chat message");
|
|
2482
|
+
return;
|
|
2483
|
+
}
|
|
2484
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
2485
|
+
type: "chatMessageReceived",
|
|
2486
|
+
message: `${client.displayName} says: ${payload.text}`,
|
|
2487
|
+
props: {
|
|
2488
|
+
client,
|
|
2489
|
+
chatMessage: {
|
|
2490
|
+
id: payload.id,
|
|
2491
|
+
senderId: payload.senderId,
|
|
2492
|
+
parentId: payload.parentId,
|
|
2493
|
+
timestamp: payload.timestamp,
|
|
2494
|
+
text: payload.text,
|
|
2495
|
+
sig: payload.sig,
|
|
2496
|
+
removed: false,
|
|
2497
|
+
},
|
|
2498
|
+
},
|
|
2499
|
+
})));
|
|
2500
|
+
},
|
|
2501
|
+
});
|
|
2502
|
+
startAppListening({
|
|
2503
|
+
actionCreator: signalEvents.audioEnableRequested,
|
|
2504
|
+
effect: ({ payload }, { dispatch, getState }) => {
|
|
2505
|
+
const { enable, requestedByClientId } = payload;
|
|
2506
|
+
const state = getState();
|
|
2507
|
+
const client = selectRemoteParticipants(state).find(({ id }) => id === requestedByClientId);
|
|
2508
|
+
if (!client) {
|
|
2509
|
+
console.warn("Could not find remote client that requested a local audio change");
|
|
2510
|
+
return;
|
|
2511
|
+
}
|
|
2512
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
2513
|
+
type: enable ? "requestAudioEnable" : "requestAudioDisable",
|
|
2514
|
+
message: enable
|
|
2515
|
+
? `${client.displayName} has requested for you to speak`
|
|
2516
|
+
: `${client.displayName} has muted your microphone`,
|
|
2517
|
+
props: {
|
|
2518
|
+
client,
|
|
2519
|
+
enable,
|
|
2520
|
+
},
|
|
2521
|
+
})));
|
|
2522
|
+
},
|
|
2523
|
+
});
|
|
2524
|
+
startAppListening({
|
|
2525
|
+
actionCreator: signalEvents.videoEnableRequested,
|
|
2526
|
+
effect: ({ payload }, { dispatch, getState }) => {
|
|
2527
|
+
const { enable, requestedByClientId } = payload;
|
|
2528
|
+
const state = getState();
|
|
2529
|
+
const client = selectRemoteParticipants(state).find(({ id }) => id === requestedByClientId);
|
|
2530
|
+
if (!client) {
|
|
2531
|
+
console.warn("Could not find remote client that requested a local video change");
|
|
2532
|
+
return;
|
|
2533
|
+
}
|
|
2534
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
2535
|
+
type: enable ? "requestVideoEnable" : "requestVideoDisable",
|
|
2536
|
+
message: enable
|
|
2537
|
+
? `${client.displayName} has requested for you to start video`
|
|
2538
|
+
: `${client.displayName} has stopped your video`,
|
|
2539
|
+
props: {
|
|
2540
|
+
client,
|
|
2541
|
+
enable,
|
|
2542
|
+
},
|
|
2543
|
+
})));
|
|
2544
|
+
},
|
|
2545
|
+
});
|
|
2546
|
+
startAppListening({
|
|
2547
|
+
actionCreator: signalEvents.clientMetadataReceived,
|
|
2548
|
+
effect: (action, { dispatch, getOriginalState, getState }) => {
|
|
2549
|
+
var _a;
|
|
2550
|
+
const { error, payload } = action.payload;
|
|
2551
|
+
if (error || !payload) {
|
|
2552
|
+
return;
|
|
2553
|
+
}
|
|
2554
|
+
const { clientId, stickyReaction } = payload;
|
|
2555
|
+
const state = getState();
|
|
2556
|
+
const canAskToSpeak = selectIsAuthorizedToAskToSpeak(state);
|
|
2557
|
+
if (!canAskToSpeak) {
|
|
2558
|
+
return;
|
|
2559
|
+
}
|
|
2560
|
+
const client = selectRemoteParticipants(state).find(({ id }) => id === clientId);
|
|
2561
|
+
if (!client) {
|
|
2562
|
+
console.warn("Could not find remote client that provided updated metadata");
|
|
2563
|
+
return;
|
|
2564
|
+
}
|
|
2565
|
+
const previousState = getOriginalState();
|
|
2566
|
+
const previousClient = selectRemoteParticipants(previousState).find(({ id }) => id === clientId);
|
|
2567
|
+
if ((!stickyReaction && !(previousClient === null || previousClient === void 0 ? void 0 : previousClient.stickyReaction)) ||
|
|
2568
|
+
(stickyReaction === null || stickyReaction === void 0 ? void 0 : stickyReaction.timestamp) === ((_a = previousClient === null || previousClient === void 0 ? void 0 : previousClient.stickyReaction) === null || _a === void 0 ? void 0 : _a.timestamp)) {
|
|
2569
|
+
return;
|
|
2570
|
+
}
|
|
2571
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
2572
|
+
type: stickyReaction ? "remoteHandRaised" : "remoteHandLowered",
|
|
2573
|
+
message: `${client.displayName} ${stickyReaction ? "raised" : "lowered"} their hand`,
|
|
2574
|
+
props: {
|
|
2575
|
+
client,
|
|
2576
|
+
stickyReaction,
|
|
2577
|
+
},
|
|
2578
|
+
})));
|
|
2579
|
+
},
|
|
2580
|
+
});
|
|
2581
|
+
createReactor([selectSignalStatus], ({ dispatch, getState }, signalStatus) => {
|
|
2582
|
+
const state = getState();
|
|
2583
|
+
const roomConnectionStatus = selectRoomConnectionStatus(state);
|
|
2584
|
+
if (["left", "kicked"].includes(roomConnectionStatus)) {
|
|
2585
|
+
return;
|
|
2586
|
+
}
|
|
2587
|
+
if (signalStatus === "disconnected") {
|
|
2588
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
2589
|
+
type: "signalTrouble",
|
|
2590
|
+
message: `Network connection lost. Trying to reconnect you...`,
|
|
2591
|
+
props: {},
|
|
2592
|
+
})));
|
|
2593
|
+
}
|
|
2594
|
+
else if (signalStatus === "connected") {
|
|
2595
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
2596
|
+
type: "signalOk",
|
|
2597
|
+
message: `Network connection available`,
|
|
2598
|
+
props: {},
|
|
2599
|
+
})));
|
|
2600
|
+
}
|
|
2601
|
+
});
|
|
2602
|
+
startAppListening({
|
|
2603
|
+
actionCreator: signalEvents.clientUnableToJoin,
|
|
2604
|
+
effect: (action, { dispatch }) => {
|
|
2605
|
+
var _a;
|
|
2606
|
+
if (((_a = action.payload) === null || _a === void 0 ? void 0 : _a.error) === "room_full") {
|
|
2607
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
2608
|
+
type: "clientUnableToJoinFullRoom",
|
|
2609
|
+
message: "Someone tried to join but the room is full and at capacity.",
|
|
2610
|
+
props: {},
|
|
2611
|
+
})));
|
|
2612
|
+
}
|
|
2613
|
+
},
|
|
2614
|
+
});
|
|
2615
|
+
|
|
2616
|
+
const DEFAULT_BREAKOUT_TIMER_DURATION = 1800;
|
|
2617
|
+
function createBreakout({ assignments, groups, startedAt, initiatedBy, breakoutStartedAt, breakoutEndedAt, breakoutNotification, breakoutTimerDuration, autoMoveToGroup, moveToGroupGracePeriod, autoMoveToMain, moveToMainGracePeriod, enforceAssignment, breakoutTimerSetting, } = {}) {
|
|
2618
|
+
return {
|
|
2619
|
+
assignments: assignments || null,
|
|
2620
|
+
groups: groups || null,
|
|
2621
|
+
startedAt: startedAt ? new Date(startedAt) : null,
|
|
2622
|
+
initiatedBy,
|
|
2623
|
+
breakoutStartedAt: breakoutStartedAt || null,
|
|
2624
|
+
breakoutEndedAt: breakoutEndedAt || null,
|
|
2625
|
+
breakoutNotification: breakoutNotification || null,
|
|
2626
|
+
breakoutTimerDuration: breakoutTimerDuration || DEFAULT_BREAKOUT_TIMER_DURATION,
|
|
2627
|
+
autoMoveToGroup: autoMoveToGroup || false,
|
|
2628
|
+
moveToGroupGracePeriod: moveToGroupGracePeriod || 10,
|
|
2629
|
+
autoMoveToMain: autoMoveToMain || false,
|
|
2630
|
+
moveToMainGracePeriod: moveToMainGracePeriod || 30,
|
|
2631
|
+
enforceAssignment: enforceAssignment || false,
|
|
2632
|
+
breakoutTimerSetting: breakoutTimerSetting || false,
|
|
2633
|
+
};
|
|
2634
|
+
}
|
|
2635
|
+
const breakoutSliceInitialState = Object.assign(Object.assign({}, createBreakout()), { error: null });
|
|
2636
|
+
const BREAKOUT_UNAVAILABLE_ERROR = "Breakout groups are not available in peer-to-peer rooms";
|
|
2637
|
+
const breakoutSlice = toolkit.createSlice({
|
|
2638
|
+
name: "breakout",
|
|
2639
|
+
initialState: breakoutSliceInitialState,
|
|
2640
|
+
reducers: {
|
|
2641
|
+
setBreakoutError: (state, action) => {
|
|
2642
|
+
return Object.assign(Object.assign({}, state), { error: action.payload.error });
|
|
2643
|
+
},
|
|
2644
|
+
},
|
|
2645
|
+
extraReducers: (builder) => {
|
|
2646
|
+
builder.addCase(signalEvents.roomJoined, (state, action) => {
|
|
2647
|
+
if ("error" in action.payload) {
|
|
2648
|
+
return state;
|
|
2649
|
+
}
|
|
2650
|
+
const { breakout } = action.payload || {};
|
|
2651
|
+
state = Object.assign(Object.assign({}, state), { error: null });
|
|
2652
|
+
if (breakout) {
|
|
2653
|
+
return Object.assign(Object.assign({}, state), createBreakout(breakout));
|
|
2654
|
+
}
|
|
2655
|
+
return state;
|
|
2656
|
+
});
|
|
2657
|
+
builder.addCase(signalEvents.breakoutSessionUpdated, (state, action) => {
|
|
2658
|
+
return Object.assign(Object.assign({}, state), createBreakout(action.payload));
|
|
2659
|
+
});
|
|
2660
|
+
},
|
|
2661
|
+
});
|
|
2662
|
+
const { setBreakoutError } = breakoutSlice.actions;
|
|
2663
|
+
const doBreakoutJoin = createAppThunk((payload) => (_, getState) => {
|
|
2664
|
+
const state = getState();
|
|
2665
|
+
const { socket } = selectSignalConnectionRaw(state);
|
|
2666
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("join_breakout_group", { group: payload.group });
|
|
2667
|
+
});
|
|
2668
|
+
function ensureDefaults(state, payload) {
|
|
2669
|
+
const { moveToGroupGracePeriod, moveToMainGracePeriod, breakoutTimerDuration } = state.breakout;
|
|
2670
|
+
const next = Object.assign({}, payload);
|
|
2671
|
+
if (next.autoMoveToGroup === true && next.moveToGroupGracePeriod == null) {
|
|
2672
|
+
next.moveToGroupGracePeriod = moveToGroupGracePeriod !== null && moveToGroupGracePeriod !== void 0 ? moveToGroupGracePeriod : 10;
|
|
2673
|
+
}
|
|
2674
|
+
if (next.autoMoveToMain === true && next.moveToMainGracePeriod == null) {
|
|
2675
|
+
next.moveToMainGracePeriod = moveToMainGracePeriod !== null && moveToMainGracePeriod !== void 0 ? moveToMainGracePeriod : 30;
|
|
2676
|
+
}
|
|
2677
|
+
if (next.breakoutTimerSetting === true && !next.breakoutTimerDuration) {
|
|
2678
|
+
next.breakoutTimerDuration = breakoutTimerDuration || DEFAULT_BREAKOUT_TIMER_DURATION;
|
|
2679
|
+
}
|
|
2680
|
+
return next;
|
|
2681
|
+
}
|
|
2682
|
+
function emitBreakoutSessionUpdate(state, payload) {
|
|
2683
|
+
const { socket } = selectSignalConnectionRaw(state);
|
|
2684
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("update_breakout_session", ensureDefaults(state, payload));
|
|
2685
|
+
}
|
|
2686
|
+
function resolveClientAssignmentsToDeviceAssignments(state, clientAssignments) {
|
|
2687
|
+
const deviceIdByClientId = {};
|
|
2688
|
+
for (const participant of selectRemoteParticipants(state)) {
|
|
2689
|
+
deviceIdByClientId[participant.id] = participant.deviceId;
|
|
2690
|
+
}
|
|
2691
|
+
const localParticipant = selectLocalParticipantRaw(state);
|
|
2692
|
+
const localDeviceId = selectDeviceId(state);
|
|
2693
|
+
if (localParticipant.id && localDeviceId) {
|
|
2694
|
+
deviceIdByClientId[localParticipant.id] = localDeviceId;
|
|
2695
|
+
}
|
|
2696
|
+
const deviceAssignments = {};
|
|
2697
|
+
for (const [clientId, group] of Object.entries(clientAssignments)) {
|
|
2698
|
+
const deviceId = deviceIdByClientId[clientId];
|
|
2699
|
+
if (deviceId) {
|
|
2700
|
+
deviceAssignments[deviceId] = group;
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2703
|
+
return deviceAssignments;
|
|
2704
|
+
}
|
|
2705
|
+
const doStartBreakoutSession = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), (payload) => (dispatch, getState) => {
|
|
2706
|
+
const state = getState();
|
|
2707
|
+
if (!selectBreakoutIsAvailable(state)) {
|
|
2708
|
+
dispatch(setBreakoutError({ error: BREAKOUT_UNAVAILABLE_ERROR }));
|
|
2709
|
+
console.warn(BREAKOUT_UNAVAILABLE_ERROR);
|
|
2710
|
+
return;
|
|
2711
|
+
}
|
|
2712
|
+
dispatch(setBreakoutError({ error: null }));
|
|
2713
|
+
const { assignments } = payload, rest = __rest(payload, ["assignments"]);
|
|
2714
|
+
emitBreakoutSessionUpdate(state, Object.assign(Object.assign(Object.assign({}, rest), (assignments ? { assignments: resolveClientAssignmentsToDeviceAssignments(state, assignments) } : {})), { active: true }));
|
|
2715
|
+
});
|
|
2716
|
+
const doUpdateBreakoutSession = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), (payload) => (_, getState) => {
|
|
2717
|
+
const state = getState();
|
|
2718
|
+
const { assignments } = payload, rest = __rest(payload, ["assignments"]);
|
|
2719
|
+
emitBreakoutSessionUpdate(state, Object.assign(Object.assign({}, rest), (assignments ? { assignments: resolveClientAssignmentsToDeviceAssignments(state, assignments) } : {})));
|
|
2720
|
+
});
|
|
2721
|
+
const doStopBreakoutSession = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), () => (_, getState) => {
|
|
2722
|
+
emitBreakoutSessionUpdate(getState(), { active: false });
|
|
2723
|
+
});
|
|
2724
|
+
const doAssignBreakoutParticipants = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), (payload) => (_, getState) => {
|
|
2725
|
+
const state = getState();
|
|
2726
|
+
const deviceAssignments = resolveClientAssignmentsToDeviceAssignments(state, payload.assignments);
|
|
2727
|
+
const mergedAssignments = Object.assign(Object.assign({}, (selectBreakoutAssignments(state) || {})), deviceAssignments);
|
|
2728
|
+
emitBreakoutSessionUpdate(state, { assignments: mergedAssignments });
|
|
2729
|
+
});
|
|
2730
|
+
const BREAKOUT_GROUPS_MIN_MAX = [2, 20];
|
|
2731
|
+
const GROUP_ID_ALPHABET = "abcdefghijklmnopqrstuvwxyz";
|
|
2732
|
+
function defaultBreakoutGroupName(groupId) {
|
|
2733
|
+
return `Group ${groupId.toUpperCase()}`;
|
|
2734
|
+
}
|
|
2735
|
+
function createBreakoutGroups(count = BREAKOUT_GROUPS_MIN_MAX[0]) {
|
|
2736
|
+
const [min, max] = BREAKOUT_GROUPS_MIN_MAX;
|
|
2737
|
+
const amount = Math.min(Math.max(count, min), max);
|
|
2738
|
+
const groups = {};
|
|
2739
|
+
for (let i = 0; i < amount; i++) {
|
|
2740
|
+
const id = GROUP_ID_ALPHABET[i];
|
|
2741
|
+
groups[id] = defaultBreakoutGroupName(id);
|
|
2742
|
+
}
|
|
2743
|
+
return groups;
|
|
2744
|
+
}
|
|
2745
|
+
function shuffle(items) {
|
|
2746
|
+
return [...items].sort(() => Math.random() - 0.5);
|
|
2747
|
+
}
|
|
2748
|
+
function chunk(items, chunkCount) {
|
|
2749
|
+
let remaining = [...items];
|
|
2750
|
+
let count = chunkCount;
|
|
2751
|
+
const chunks = [];
|
|
2752
|
+
while (remaining.length && count > 0) {
|
|
2753
|
+
const size = Math.ceil(remaining.length / count);
|
|
2754
|
+
chunks.push(remaining.slice(0, size));
|
|
2755
|
+
remaining = remaining.slice(size);
|
|
2756
|
+
count -= 1;
|
|
2757
|
+
}
|
|
2758
|
+
return chunks;
|
|
2759
|
+
}
|
|
2760
|
+
function randomizeAssignments(deviceIds, groupIds) {
|
|
2761
|
+
const assignments = {};
|
|
2762
|
+
chunk(deviceIds, groupIds.length).forEach((chunkOfDevices, index) => {
|
|
2763
|
+
chunkOfDevices.forEach((deviceId) => {
|
|
2764
|
+
assignments[deviceId] = groupIds[index];
|
|
2765
|
+
});
|
|
2766
|
+
});
|
|
2767
|
+
return assignments;
|
|
2768
|
+
}
|
|
2769
|
+
const doAssignAllBreakoutParticipants = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), () => (_, getState) => {
|
|
2770
|
+
const state = getState();
|
|
2771
|
+
const groupIds = Object.keys(selectBreakoutGroups(state) || {});
|
|
2772
|
+
if (!groupIds.length)
|
|
2773
|
+
return;
|
|
2774
|
+
const deviceIds = shuffle(selectRemoteParticipants(state).map((participant) => participant.deviceId));
|
|
2775
|
+
emitBreakoutSessionUpdate(state, { assignments: randomizeAssignments(deviceIds, groupIds) });
|
|
2776
|
+
});
|
|
2777
|
+
const doUnassignAllBreakoutParticipants = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), () => (_, getState) => {
|
|
2778
|
+
const state = getState();
|
|
2779
|
+
const assignments = selectBreakoutAssignments(state) || {};
|
|
2780
|
+
const cleared = Object.keys(assignments).reduce((acc, deviceId) => {
|
|
2781
|
+
acc[deviceId] = "";
|
|
2782
|
+
return acc;
|
|
2783
|
+
}, {});
|
|
2784
|
+
emitBreakoutSessionUpdate(state, { assignments: cleared });
|
|
2785
|
+
});
|
|
2786
|
+
const doShuffleBreakoutParticipants = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), () => (_, getState) => {
|
|
2787
|
+
const state = getState();
|
|
2788
|
+
const groupIds = Object.keys(selectBreakoutGroups(state) || {});
|
|
2789
|
+
if (!groupIds.length)
|
|
2790
|
+
return;
|
|
2791
|
+
const assignments = selectBreakoutAssignments(state) || {};
|
|
2792
|
+
const deviceIds = shuffle(Object.entries(assignments)
|
|
2793
|
+
.filter(([, groupId]) => !!groupId)
|
|
2794
|
+
.map(([deviceId]) => deviceId));
|
|
2795
|
+
emitBreakoutSessionUpdate(state, { assignments: randomizeAssignments(deviceIds, groupIds) });
|
|
2796
|
+
});
|
|
2797
|
+
const doExtendBreakoutTimer = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), (payload) => (_, getState) => {
|
|
2798
|
+
var _a;
|
|
2799
|
+
const state = getState();
|
|
2800
|
+
const additionalSeconds = (_a = payload === null || payload === void 0 ? void 0 : payload.seconds) !== null && _a !== void 0 ? _a : 60;
|
|
2801
|
+
const breakoutTimerDuration = (selectBreakoutTimerDuration(state) || 0) + additionalSeconds;
|
|
2802
|
+
emitBreakoutSessionUpdate(state, { breakoutTimerDuration });
|
|
2803
|
+
});
|
|
2804
|
+
const doStopBreakoutTimer = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), () => (_, getState) => {
|
|
2805
|
+
emitBreakoutSessionUpdate(getState(), { breakoutTimerSetting: false });
|
|
2806
|
+
});
|
|
2807
|
+
const selectBreakoutRaw = (state) => state.breakout;
|
|
2808
|
+
const selectBreakoutError = (state) => state.breakout.error;
|
|
2809
|
+
const selectBreakoutIsAvailable = (state) => state.room.mode === "group";
|
|
2810
|
+
const selectBreakoutActive = (state) => !!state.breakout.startedAt;
|
|
2811
|
+
const selectBreakoutAssignments = (state) => state.breakout.assignments;
|
|
2812
|
+
const selectBreakoutGroups = (state) => state.breakout.groups;
|
|
2813
|
+
const selectBreakoutEnforceAssignment = (state) => state.breakout.enforceAssignment;
|
|
2814
|
+
const selectBreakoutTimerSetting = (state) => state.breakout.breakoutTimerSetting;
|
|
2815
|
+
const selectBreakoutTimerDuration = (state) => state.breakout.breakoutTimerDuration;
|
|
2816
|
+
const selectBreakoutAutoMoveToGroup = (state) => state.breakout.autoMoveToGroup;
|
|
2817
|
+
const selectBreakoutMoveToGroupGracePeriod = (state) => state.breakout.moveToGroupGracePeriod;
|
|
2818
|
+
const selectBreakoutAutoMoveToMain = (state) => state.breakout.autoMoveToMain;
|
|
2819
|
+
const selectBreakoutMoveToMainGracePeriod = (state) => state.breakout.moveToMainGracePeriod;
|
|
2820
|
+
const selectBreakoutStartedAt = (state) => state.breakout.startedAt;
|
|
2821
|
+
const selectBreakoutEndTime = toolkit.createSelector(selectBreakoutRaw, (raw) => {
|
|
2822
|
+
if (!raw.breakoutStartedAt)
|
|
2823
|
+
return null;
|
|
2824
|
+
const startTime = new Date(raw.breakoutStartedAt).getTime();
|
|
2825
|
+
const gracePeriod = raw.autoMoveToGroup ? raw.moveToGroupGracePeriod || 0 : 0;
|
|
2826
|
+
return startTime + ((raw.breakoutTimerDuration || 0) + gracePeriod) * 1000;
|
|
2827
|
+
});
|
|
2828
|
+
const selectBreakoutMoveToGroupAt = toolkit.createSelector(selectBreakoutRaw, (raw) => {
|
|
2829
|
+
if (!raw.autoMoveToGroup || !raw.breakoutStartedAt)
|
|
2830
|
+
return null;
|
|
2831
|
+
return new Date(raw.breakoutStartedAt).getTime() + (raw.moveToGroupGracePeriod || 0) * 1000;
|
|
2832
|
+
});
|
|
2833
|
+
const selectBreakoutMoveToMainAt = toolkit.createSelector(selectBreakoutRaw, (raw) => {
|
|
2834
|
+
if (!raw.autoMoveToMain || !raw.breakoutEndedAt)
|
|
2835
|
+
return null;
|
|
2836
|
+
return new Date(raw.breakoutEndedAt).getTime() + (raw.moveToMainGracePeriod || 0) * 1000;
|
|
2837
|
+
});
|
|
2838
|
+
const selectBreakoutCurrentId = toolkit.createSelector(selectLocalParticipantBreakoutGroup, (localParticipantBreakoutGroup) => localParticipantBreakoutGroup || "");
|
|
2839
|
+
const selectBreakoutCurrentGroup = toolkit.createSelector(selectBreakoutRaw, selectBreakoutCurrentId, (raw, breakoutCurrentId) => {
|
|
2840
|
+
var _a;
|
|
2841
|
+
const name = (_a = raw.groups) === null || _a === void 0 ? void 0 : _a[breakoutCurrentId];
|
|
2842
|
+
if (!name)
|
|
2843
|
+
return null;
|
|
2844
|
+
return { id: breakoutCurrentId, name };
|
|
2845
|
+
});
|
|
2846
|
+
startAppListening({
|
|
2847
|
+
actionCreator: signalEvents.breakoutMoveToGroup,
|
|
2848
|
+
effect: (_, { dispatch, getState }) => {
|
|
2849
|
+
const state = getState();
|
|
2850
|
+
const localParticipant = selectLocalParticipantRaw(state);
|
|
2851
|
+
const breakoutGroupAssigned = localParticipant.breakoutGroupAssigned;
|
|
2852
|
+
if (breakoutGroupAssigned) {
|
|
2853
|
+
dispatch(doBreakoutJoin({ group: breakoutGroupAssigned }));
|
|
2854
|
+
}
|
|
2855
|
+
},
|
|
2856
|
+
});
|
|
2857
|
+
startAppListening({
|
|
2858
|
+
actionCreator: signalEvents.breakoutMoveToMain,
|
|
2859
|
+
effect: (_, { dispatch }) => {
|
|
2860
|
+
dispatch(doBreakoutJoin({ group: "" }));
|
|
2861
|
+
},
|
|
2862
|
+
});
|
|
2863
|
+
startAppListening({
|
|
2864
|
+
actionCreator: signalEvents.breakoutSessionUpdated,
|
|
2865
|
+
effect: ({ payload }, { dispatch, getState }) => {
|
|
2866
|
+
var _a;
|
|
2867
|
+
const state = getState();
|
|
2868
|
+
const autoMoveToMain = selectBreakoutRaw(state).autoMoveToMain;
|
|
2869
|
+
if (((_a = payload.initiatedBy) === null || _a === void 0 ? void 0 : _a.active) === false) {
|
|
2870
|
+
if (!autoMoveToMain) {
|
|
2871
|
+
dispatch(doBreakoutJoin({ group: "" }));
|
|
2872
|
+
}
|
|
2873
|
+
}
|
|
2874
|
+
},
|
|
2875
|
+
});
|
|
2876
|
+
startAppListening({
|
|
2877
|
+
actionCreator: signalEvents.breakoutEnding,
|
|
2878
|
+
effect: (_, { dispatch }) => {
|
|
2879
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
2880
|
+
type: "breakoutTimerEnding",
|
|
2881
|
+
message: "The breakout session is ending soon",
|
|
2882
|
+
props: {},
|
|
2883
|
+
})));
|
|
2884
|
+
},
|
|
2885
|
+
});
|
|
2886
|
+
startAppListening({
|
|
2887
|
+
actionCreator: signalEvents.breakoutTimerExtended,
|
|
2888
|
+
effect: (_, { dispatch }) => {
|
|
2889
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
2890
|
+
type: "breakoutTimerExtended",
|
|
2891
|
+
message: "The breakout timer was extended",
|
|
2892
|
+
props: {},
|
|
2893
|
+
})));
|
|
2894
|
+
},
|
|
2895
|
+
});
|
|
2896
|
+
startAppListening({
|
|
2897
|
+
actionCreator: signalEvents.breakoutTimerEnded,
|
|
2898
|
+
effect: (_, { dispatch }) => {
|
|
2899
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
2900
|
+
type: "breakoutTimerEnded",
|
|
2901
|
+
message: "The breakout timer ended",
|
|
2902
|
+
props: {},
|
|
2903
|
+
})));
|
|
2904
|
+
},
|
|
2905
|
+
});
|
|
2906
|
+
|
|
2907
|
+
const chatSliceInitialState = {
|
|
2908
|
+
chatMessages: [],
|
|
2909
|
+
};
|
|
2910
|
+
const chatSlice = toolkit.createSlice({
|
|
2911
|
+
name: "chat",
|
|
2912
|
+
initialState: chatSliceInitialState,
|
|
2913
|
+
reducers: {},
|
|
2914
|
+
extraReducers(builder) {
|
|
2915
|
+
builder.addCase(signalEvents.chatMessage, (state, action) => {
|
|
2916
|
+
const message = Object.assign({ id: action.payload.id, senderId: action.payload.senderId, parentId: action.payload.parentId, timestamp: action.payload.timestamp, text: action.payload.text, sig: action.payload.sig, removed: false }, (action.payload.file && { file: action.payload.file }));
|
|
2917
|
+
return Object.assign(Object.assign({}, state), { chatMessages: [...state.chatMessages, message] });
|
|
2918
|
+
});
|
|
2919
|
+
builder.addCase(signalEvents.chatMessageRemoved, (state, action) => {
|
|
2920
|
+
return Object.assign(Object.assign({}, state), { chatMessages: state.chatMessages.map((m) => {
|
|
2921
|
+
return Object.assign(Object.assign({}, m), (m.id === action.payload.id && {
|
|
2922
|
+
removed: true,
|
|
2923
|
+
}));
|
|
2924
|
+
}) });
|
|
2925
|
+
});
|
|
2926
|
+
},
|
|
2927
|
+
});
|
|
2928
|
+
const doSendChatMessage = createRoomConnectedThunk((payload) => (_, getState) => {
|
|
2929
|
+
const state = getState();
|
|
2930
|
+
const socket = selectSignalConnectionRaw(state).socket;
|
|
2931
|
+
const breakoutCurrentId = selectBreakoutCurrentId(state);
|
|
2932
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("chat_message", Object.assign(Object.assign(Object.assign({ text: payload.text }, (payload.parentId && { parentId: payload.parentId })), (breakoutCurrentId && { breakoutGroup: breakoutCurrentId })), (payload.isBroadcast && { broadcast: true })));
|
|
2933
|
+
});
|
|
2934
|
+
const doRemoveChatMessage = createRoomConnectedThunk(({ id, sig }) => (_, getState) => {
|
|
2935
|
+
const state = getState();
|
|
2936
|
+
const socket = selectSignalConnectionRaw(state).socket;
|
|
2937
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("remove_chat_message", {
|
|
2938
|
+
id,
|
|
2939
|
+
sig,
|
|
2940
|
+
});
|
|
2941
|
+
});
|
|
2942
|
+
const selectChatMessages = (state) => state.chat.chatMessages;
|
|
2943
|
+
|
|
2944
|
+
const initialCloudRecordingState = {
|
|
2945
|
+
isInitiator: false,
|
|
2946
|
+
isRecording: false,
|
|
2947
|
+
startedAt: undefined,
|
|
2948
|
+
};
|
|
2949
|
+
const cloudRecordingSlice = toolkit.createSlice({
|
|
2950
|
+
name: "cloudRecording",
|
|
2951
|
+
initialState: initialCloudRecordingState,
|
|
2952
|
+
reducers: {
|
|
2953
|
+
recordingRequestStarted: (state) => {
|
|
2954
|
+
return Object.assign(Object.assign({}, state), { isInitiator: true, status: "requested" });
|
|
2955
|
+
},
|
|
2956
|
+
},
|
|
2957
|
+
extraReducers: (builder) => {
|
|
2958
|
+
builder.addCase(signalEvents.cloudRecordingStopped, (state) => {
|
|
2959
|
+
return Object.assign(Object.assign({}, state), { isInitiator: false, isRecording: false, status: undefined });
|
|
2960
|
+
});
|
|
2961
|
+
builder.addCase(signalEvents.cloudRecordingStarted, (state, action) => {
|
|
2962
|
+
const { payload } = action;
|
|
2963
|
+
if (!payload.error) {
|
|
2964
|
+
return state;
|
|
2965
|
+
}
|
|
2966
|
+
return Object.assign(Object.assign({}, state), { isInitiator: false, isRecording: false, status: "error", error: payload.error });
|
|
2588
2967
|
});
|
|
2589
|
-
builder.addCase(signalEvents.
|
|
2590
|
-
|
|
2591
|
-
|
|
2968
|
+
builder.addCase(signalEvents.newClient, (state, { payload }) => {
|
|
2969
|
+
var _a;
|
|
2970
|
+
const { client } = payload;
|
|
2971
|
+
if (((_a = client.role) === null || _a === void 0 ? void 0 : _a.roleName) === "recorder") {
|
|
2972
|
+
return Object.assign(Object.assign({}, state), { isRecording: true, status: "recording", startedAt: client.startedCloudRecordingAt
|
|
2973
|
+
? new Date(client.startedCloudRecordingAt).getTime()
|
|
2974
|
+
: new Date().getTime() });
|
|
2975
|
+
}
|
|
2976
|
+
return state;
|
|
2592
2977
|
});
|
|
2593
2978
|
},
|
|
2594
2979
|
});
|
|
2595
|
-
const {
|
|
2596
|
-
const
|
|
2980
|
+
const { recordingRequestStarted } = cloudRecordingSlice.actions;
|
|
2981
|
+
const doStartCloudRecording = createRoomConnectedThunk(() => (dispatch, getState) => {
|
|
2597
2982
|
const state = getState();
|
|
2598
|
-
const
|
|
2599
|
-
|
|
2600
|
-
|
|
2983
|
+
const socket = selectSignalConnectionRaw(state).socket;
|
|
2984
|
+
const status = selectCloudRecordingStatus(state);
|
|
2985
|
+
if (status && ["recording", "requested"].includes(status)) {
|
|
2601
2986
|
return;
|
|
2602
2987
|
}
|
|
2603
|
-
|
|
2604
|
-
|
|
2988
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("start_recording", {
|
|
2989
|
+
recording: "cloud",
|
|
2990
|
+
});
|
|
2991
|
+
dispatch(recordingRequestStarted());
|
|
2605
2992
|
});
|
|
2606
|
-
const
|
|
2993
|
+
const doStopCloudRecording = createRoomConnectedThunk(() => (dispatch, getState) => {
|
|
2607
2994
|
const state = getState();
|
|
2608
2995
|
const socket = selectSignalConnectionRaw(state).socket;
|
|
2609
|
-
socket === null || socket === void 0 ? void 0 : socket.emit("
|
|
2610
|
-
});
|
|
2611
|
-
const selectRemoteClients = (state) => state.remoteParticipants.remoteParticipants;
|
|
2612
|
-
const selectRemoteParticipants = toolkit.createSelector(selectRemoteClients, (clients) => clients.filter((c) => !NON_PERSON_ROLES.includes(c.roleName)));
|
|
2613
|
-
const selectNumClients = toolkit.createSelector(selectRemoteClients, (clients) => clients.length + 1);
|
|
2614
|
-
toolkit.createSelector(selectRemoteParticipants, selectLocalParticipantRaw, (clients, localParticipant) => {
|
|
2615
|
-
if (NON_PERSON_ROLES.includes(localParticipant.roleName)) {
|
|
2616
|
-
return clients.length;
|
|
2617
|
-
}
|
|
2618
|
-
return clients.length + 1;
|
|
2996
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("stop_recording");
|
|
2619
2997
|
});
|
|
2998
|
+
const selectCloudRecordingRaw = (state) => state.cloudRecording;
|
|
2999
|
+
const selectCloudRecordingStatus = (state) => state.cloudRecording.status;
|
|
3000
|
+
const selectIsCloudRecording = (state) => state.cloudRecording.isRecording;
|
|
3001
|
+
const selectCloudRecordingIsInitiator = (state) => state.cloudRecording.isInitiator;
|
|
2620
3002
|
|
|
2621
3003
|
const localScreenshareSliceInitialState = {
|
|
2622
3004
|
status: "inactive",
|
|
@@ -2710,6 +3092,7 @@ function isRecorderClient(client) {
|
|
|
2710
3092
|
}
|
|
2711
3093
|
const roomSliceInitialState = {
|
|
2712
3094
|
isLocked: false,
|
|
3095
|
+
mode: null,
|
|
2713
3096
|
};
|
|
2714
3097
|
const roomSlice = toolkit.createSlice({
|
|
2715
3098
|
name: "room",
|
|
@@ -2717,6 +3100,7 @@ const roomSlice = toolkit.createSlice({
|
|
|
2717
3100
|
reducers: {},
|
|
2718
3101
|
extraReducers: (builder) => {
|
|
2719
3102
|
builder.addCase(signalEvents.roomJoined, (state, action) => {
|
|
3103
|
+
var _a;
|
|
2720
3104
|
if ("error" in action.payload) {
|
|
2721
3105
|
if (action.payload.error === "room_locked") {
|
|
2722
3106
|
return Object.assign(Object.assign({}, state), { isLocked: Boolean(action.payload.isLocked) });
|
|
@@ -2724,7 +3108,7 @@ const roomSlice = toolkit.createSlice({
|
|
|
2724
3108
|
return state;
|
|
2725
3109
|
}
|
|
2726
3110
|
const { room } = action.payload;
|
|
2727
|
-
return Object.assign(Object.assign({}, state), { isLocked: Boolean(room.isLocked) });
|
|
3111
|
+
return Object.assign(Object.assign({}, state), { isLocked: Boolean(room.isLocked), mode: (_a = room.mode) !== null && _a !== void 0 ? _a : (room.sfuServer ? "group" : "normal") });
|
|
2728
3112
|
});
|
|
2729
3113
|
builder.addCase(signalEvents.roomLocked, (state, action) => {
|
|
2730
3114
|
const { isLocked } = action.payload;
|
|
@@ -3093,8 +3477,7 @@ const doHandleAcceptStreams = createAppThunk((payload) => (dispatch, getState) =
|
|
|
3093
3477
|
const participant = remoteClients.find((p) => p.id === clientId);
|
|
3094
3478
|
if (!participant)
|
|
3095
3479
|
continue;
|
|
3096
|
-
if (state === "to_accept" ||
|
|
3097
|
-
(state === "new_accept" && shouldAcceptNewClients)) {
|
|
3480
|
+
if (state === "to_accept" || (state === "new_accept" && shouldAcceptNewClients)) {
|
|
3098
3481
|
rtcManager.acceptNewStream({
|
|
3099
3482
|
streamId: streamId === media.CAMERA_STREAM_ID ? clientId : streamId,
|
|
3100
3483
|
clientId,
|
|
@@ -3137,7 +3520,10 @@ const doRtcManagerInitialize = createAppThunk(() => (dispatch, getState) => {
|
|
|
3137
3520
|
const isCameraEnabled = selectIsCameraEnabled(getState());
|
|
3138
3521
|
const isMicrophoneEnabled = selectIsMicrophoneEnabled(getState());
|
|
3139
3522
|
if (localMediaStream && rtcManager) {
|
|
3140
|
-
rtcManager.addCameraStream(localMediaStream, {
|
|
3523
|
+
rtcManager.addCameraStream(localMediaStream, {
|
|
3524
|
+
audioPaused: !isMicrophoneEnabled,
|
|
3525
|
+
videoPaused: !isCameraEnabled,
|
|
3526
|
+
});
|
|
3141
3527
|
}
|
|
3142
3528
|
dispatch(rtcManagerInitialized());
|
|
3143
3529
|
});
|
|
@@ -3280,7 +3666,7 @@ const selectStreamsToAccept = toolkit.createSelector(selectRtcStatus, selectRemo
|
|
|
3280
3666
|
}
|
|
3281
3667
|
if ((!client.breakoutGroup && !breakoutCurrentId) ||
|
|
3282
3668
|
client.breakoutGroup === breakoutCurrentId ||
|
|
3283
|
-
(
|
|
3669
|
+
(!client.breakoutGroup && clientSpotlight) ||
|
|
3284
3670
|
ignoreBreakoutGroups) {
|
|
3285
3671
|
if (state === "done_accept")
|
|
3286
3672
|
continue;
|
|
@@ -3840,188 +4226,21 @@ createReactor([
|
|
|
3840
4226
|
dispatch(doSendClientMetadata());
|
|
3841
4227
|
}
|
|
3842
4228
|
});
|
|
3843
|
-
createReactor([selectBreakoutAssignments, selectDeviceId, selectLocalParticipantRaw], ({ dispatch }, breakoutAssignments, deviceId, localParticipant) => {
|
|
4229
|
+
createReactor([selectBreakoutAssignments, selectDeviceId, selectLocalParticipantRaw, selectBreakoutGroups, selectBreakoutActive], ({ dispatch }, breakoutAssignments, deviceId, localParticipant, breakoutGroups, breakoutActive) => {
|
|
3844
4230
|
const breakoutGroupAssigned = (breakoutAssignments === null || breakoutAssignments === void 0 ? void 0 : breakoutAssignments[deviceId || ""]) || "";
|
|
3845
4231
|
if (localParticipant.breakoutGroupAssigned === breakoutGroupAssigned) {
|
|
3846
4232
|
return;
|
|
3847
4233
|
}
|
|
3848
4234
|
dispatch(setBreakoutGroupAssigned({ breakoutGroupAssigned }));
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
const emitter = new events$1.EventEmitter();
|
|
3852
|
-
function createNotificationEvent(payload) {
|
|
3853
|
-
const notificationEvent = Object.assign(Object.assign({}, payload), { timestamp: Date.now() });
|
|
3854
|
-
return notificationEvent;
|
|
3855
|
-
}
|
|
3856
|
-
const initialNotificationsState = {
|
|
3857
|
-
emitter,
|
|
3858
|
-
events: [],
|
|
3859
|
-
};
|
|
3860
|
-
const notificationsSlice = toolkit.createSlice({
|
|
3861
|
-
name: "notifications",
|
|
3862
|
-
initialState: initialNotificationsState,
|
|
3863
|
-
reducers: {
|
|
3864
|
-
addNotification: (state, action) => {
|
|
3865
|
-
return Object.assign(Object.assign({}, state), { events: [...state.events, Object.assign({}, action.payload)] });
|
|
3866
|
-
},
|
|
3867
|
-
doClearNotifications: (state) => {
|
|
3868
|
-
return Object.assign(Object.assign({}, state), { events: [] });
|
|
3869
|
-
},
|
|
3870
|
-
},
|
|
3871
|
-
});
|
|
3872
|
-
const { doClearNotifications } = notificationsSlice.actions;
|
|
3873
|
-
const doSetNotification = createAppThunk((payload) => (dispatch, getState) => {
|
|
3874
|
-
dispatch(notificationsSlice.actions.addNotification(payload));
|
|
3875
|
-
const state = getState();
|
|
3876
|
-
const emitter = selectNotificationsEmitter(state);
|
|
3877
|
-
emitter.emit(payload.type, payload);
|
|
3878
|
-
emitter.emit("*", payload);
|
|
3879
|
-
});
|
|
3880
|
-
const selectNotificationsEmitter = (state) => state.notifications.emitter;
|
|
3881
|
-
startAppListening({
|
|
3882
|
-
actionCreator: signalEvents.chatMessage,
|
|
3883
|
-
effect: ({ payload }, { dispatch, getState }) => {
|
|
3884
|
-
const state = getState();
|
|
3885
|
-
const selfId = selectSelfId(state);
|
|
3886
|
-
if (selfId === payload.senderId) {
|
|
3887
|
-
return;
|
|
3888
|
-
}
|
|
3889
|
-
const client = selectRemoteParticipants(state).find(({ id }) => id === payload.senderId);
|
|
3890
|
-
if (!client) {
|
|
3891
|
-
console.warn("Could not find remote client that sent chat message");
|
|
3892
|
-
return;
|
|
3893
|
-
}
|
|
3894
|
-
dispatch(doSetNotification(createNotificationEvent({
|
|
3895
|
-
type: "chatMessageReceived",
|
|
3896
|
-
message: `${client.displayName} says: ${payload.text}`,
|
|
3897
|
-
props: {
|
|
3898
|
-
client,
|
|
3899
|
-
chatMessage: {
|
|
3900
|
-
id: payload.id,
|
|
3901
|
-
senderId: payload.senderId,
|
|
3902
|
-
parentId: payload.parentId,
|
|
3903
|
-
timestamp: payload.timestamp,
|
|
3904
|
-
text: payload.text,
|
|
3905
|
-
sig: payload.sig,
|
|
3906
|
-
removed: false,
|
|
3907
|
-
},
|
|
3908
|
-
},
|
|
3909
|
-
})));
|
|
3910
|
-
},
|
|
3911
|
-
});
|
|
3912
|
-
startAppListening({
|
|
3913
|
-
actionCreator: signalEvents.audioEnableRequested,
|
|
3914
|
-
effect: ({ payload }, { dispatch, getState }) => {
|
|
3915
|
-
const { enable, requestedByClientId } = payload;
|
|
3916
|
-
const state = getState();
|
|
3917
|
-
const client = selectRemoteParticipants(state).find(({ id }) => id === requestedByClientId);
|
|
3918
|
-
if (!client) {
|
|
3919
|
-
console.warn("Could not find remote client that requested a local audio change");
|
|
3920
|
-
return;
|
|
3921
|
-
}
|
|
3922
|
-
dispatch(doSetNotification(createNotificationEvent({
|
|
3923
|
-
type: enable ? "requestAudioEnable" : "requestAudioDisable",
|
|
3924
|
-
message: enable
|
|
3925
|
-
? `${client.displayName} has requested for you to speak`
|
|
3926
|
-
: `${client.displayName} has muted your microphone`,
|
|
3927
|
-
props: {
|
|
3928
|
-
client,
|
|
3929
|
-
enable,
|
|
3930
|
-
},
|
|
3931
|
-
})));
|
|
3932
|
-
},
|
|
3933
|
-
});
|
|
3934
|
-
startAppListening({
|
|
3935
|
-
actionCreator: signalEvents.videoEnableRequested,
|
|
3936
|
-
effect: ({ payload }, { dispatch, getState }) => {
|
|
3937
|
-
const { enable, requestedByClientId } = payload;
|
|
3938
|
-
const state = getState();
|
|
3939
|
-
const client = selectRemoteParticipants(state).find(({ id }) => id === requestedByClientId);
|
|
3940
|
-
if (!client) {
|
|
3941
|
-
console.warn("Could not find remote client that requested a local video change");
|
|
3942
|
-
return;
|
|
3943
|
-
}
|
|
3944
|
-
dispatch(doSetNotification(createNotificationEvent({
|
|
3945
|
-
type: enable ? "requestVideoEnable" : "requestVideoDisable",
|
|
3946
|
-
message: enable
|
|
3947
|
-
? `${client.displayName} has requested for you to start video`
|
|
3948
|
-
: `${client.displayName} has stopped your video`,
|
|
3949
|
-
props: {
|
|
3950
|
-
client,
|
|
3951
|
-
enable,
|
|
3952
|
-
},
|
|
3953
|
-
})));
|
|
3954
|
-
},
|
|
3955
|
-
});
|
|
3956
|
-
startAppListening({
|
|
3957
|
-
actionCreator: signalEvents.clientMetadataReceived,
|
|
3958
|
-
effect: (action, { dispatch, getOriginalState, getState }) => {
|
|
3959
|
-
var _a;
|
|
3960
|
-
const { error, payload } = action.payload;
|
|
3961
|
-
if (error || !payload) {
|
|
3962
|
-
return;
|
|
3963
|
-
}
|
|
3964
|
-
const { clientId, stickyReaction } = payload;
|
|
3965
|
-
const state = getState();
|
|
3966
|
-
const canAskToSpeak = selectIsAuthorizedToAskToSpeak(state);
|
|
3967
|
-
if (!canAskToSpeak) {
|
|
3968
|
-
return;
|
|
3969
|
-
}
|
|
3970
|
-
const client = selectRemoteParticipants(state).find(({ id }) => id === clientId);
|
|
3971
|
-
if (!client) {
|
|
3972
|
-
console.warn("Could not find remote client that provided updated metadata");
|
|
3973
|
-
return;
|
|
3974
|
-
}
|
|
3975
|
-
const previousState = getOriginalState();
|
|
3976
|
-
const previousClient = selectRemoteParticipants(previousState).find(({ id }) => id === clientId);
|
|
3977
|
-
if ((!stickyReaction && !(previousClient === null || previousClient === void 0 ? void 0 : previousClient.stickyReaction)) ||
|
|
3978
|
-
(stickyReaction === null || stickyReaction === void 0 ? void 0 : stickyReaction.timestamp) === ((_a = previousClient === null || previousClient === void 0 ? void 0 : previousClient.stickyReaction) === null || _a === void 0 ? void 0 : _a.timestamp)) {
|
|
3979
|
-
return;
|
|
3980
|
-
}
|
|
3981
|
-
dispatch(doSetNotification(createNotificationEvent({
|
|
3982
|
-
type: stickyReaction ? "remoteHandRaised" : "remoteHandLowered",
|
|
3983
|
-
message: `${client.displayName} ${stickyReaction ? "raised" : "lowered"} their hand`,
|
|
3984
|
-
props: {
|
|
3985
|
-
client,
|
|
3986
|
-
stickyReaction,
|
|
3987
|
-
},
|
|
3988
|
-
})));
|
|
3989
|
-
},
|
|
3990
|
-
});
|
|
3991
|
-
createReactor([selectSignalStatus], ({ dispatch, getState }, signalStatus) => {
|
|
3992
|
-
const state = getState();
|
|
3993
|
-
const roomConnectionStatus = selectRoomConnectionStatus(state);
|
|
3994
|
-
if (["left", "kicked"].includes(roomConnectionStatus)) {
|
|
3995
|
-
return;
|
|
3996
|
-
}
|
|
3997
|
-
if (signalStatus === "disconnected") {
|
|
3998
|
-
dispatch(doSetNotification(createNotificationEvent({
|
|
3999
|
-
type: "signalTrouble",
|
|
4000
|
-
message: `Network connection lost. Trying to reconnect you...`,
|
|
4001
|
-
props: {},
|
|
4002
|
-
})));
|
|
4003
|
-
}
|
|
4004
|
-
else if (signalStatus === "connected") {
|
|
4235
|
+
if (breakoutGroupAssigned && breakoutActive) {
|
|
4236
|
+
const groupName = (breakoutGroups === null || breakoutGroups === void 0 ? void 0 : breakoutGroups[breakoutGroupAssigned]) || "";
|
|
4005
4237
|
dispatch(doSetNotification(createNotificationEvent({
|
|
4006
|
-
type: "
|
|
4007
|
-
message: `
|
|
4008
|
-
props: {},
|
|
4238
|
+
type: "breakoutGroupAssigned",
|
|
4239
|
+
message: groupName ? `You've been assigned to ${groupName}` : "You've been assigned to a group",
|
|
4240
|
+
props: { group: breakoutGroupAssigned, groupName },
|
|
4009
4241
|
})));
|
|
4010
4242
|
}
|
|
4011
4243
|
});
|
|
4012
|
-
startAppListening({
|
|
4013
|
-
actionCreator: signalEvents.clientUnableToJoin,
|
|
4014
|
-
effect: (action, { dispatch }) => {
|
|
4015
|
-
var _a;
|
|
4016
|
-
if (((_a = action.payload) === null || _a === void 0 ? void 0 : _a.error) === "room_full") {
|
|
4017
|
-
dispatch(doSetNotification(createNotificationEvent({
|
|
4018
|
-
type: "clientUnableToJoinFullRoom",
|
|
4019
|
-
message: "Someone tried to join but the room is full and at capacity.",
|
|
4020
|
-
props: {},
|
|
4021
|
-
})));
|
|
4022
|
-
}
|
|
4023
|
-
},
|
|
4024
|
-
});
|
|
4025
4244
|
|
|
4026
4245
|
const organizationSliceInitialState = {
|
|
4027
4246
|
data: null,
|
|
@@ -4082,6 +4301,7 @@ const roomConnectionSliceInitialState = {
|
|
|
4082
4301
|
session: null,
|
|
4083
4302
|
status: "ready",
|
|
4084
4303
|
error: null,
|
|
4304
|
+
knockResponse: null,
|
|
4085
4305
|
};
|
|
4086
4306
|
const roomConnectionSlice = toolkit.createSlice({
|
|
4087
4307
|
name: "roomConnection",
|
|
@@ -4090,6 +4310,9 @@ const roomConnectionSlice = toolkit.createSlice({
|
|
|
4090
4310
|
connectionStatusChanged: (state, action) => {
|
|
4091
4311
|
return Object.assign(Object.assign({}, state), { status: action.payload });
|
|
4092
4312
|
},
|
|
4313
|
+
knockResponseReceived: (state, action) => {
|
|
4314
|
+
return Object.assign(Object.assign({}, state), { knockResponse: action.payload });
|
|
4315
|
+
},
|
|
4093
4316
|
},
|
|
4094
4317
|
extraReducers: (builder) => {
|
|
4095
4318
|
builder.addCase(signalEvents.roomJoined, (state, action) => {
|
|
@@ -4131,7 +4354,7 @@ const roomConnectionSlice = toolkit.createSlice({
|
|
|
4131
4354
|
});
|
|
4132
4355
|
},
|
|
4133
4356
|
});
|
|
4134
|
-
const { connectionStatusChanged } = roomConnectionSlice.actions;
|
|
4357
|
+
const { connectionStatusChanged, knockResponseReceived } = roomConnectionSlice.actions;
|
|
4135
4358
|
const doKnockRoom = createAppThunk(() => (dispatch, getState) => {
|
|
4136
4359
|
const state = getState();
|
|
4137
4360
|
const socket = selectSignalConnectionRaw(state).socket;
|
|
@@ -4224,6 +4447,7 @@ createReactor([selectShouldConnectRoom], ({ dispatch }, shouldConnectRoom) => {
|
|
|
4224
4447
|
startAppListening({
|
|
4225
4448
|
actionCreator: signalEvents.knockHandled,
|
|
4226
4449
|
effect: ({ payload }, { dispatch, getState }) => {
|
|
4450
|
+
var _a, _b;
|
|
4227
4451
|
const { clientId, resolution } = payload;
|
|
4228
4452
|
const state = getState();
|
|
4229
4453
|
const selfId = selectSelfId(state);
|
|
@@ -4234,7 +4458,12 @@ startAppListening({
|
|
|
4234
4458
|
dispatch(setRoomKey(payload.metadata.roomKey));
|
|
4235
4459
|
dispatch(doConnectRoom());
|
|
4236
4460
|
}
|
|
4461
|
+
else if (resolution === "on_hold") {
|
|
4462
|
+
dispatch(knockResponseReceived((_a = payload.knockResponse) !== null && _a !== void 0 ? _a : null));
|
|
4463
|
+
dispatch(connectionStatusChanged("knock_on_hold"));
|
|
4464
|
+
}
|
|
4237
4465
|
else if (resolution === "rejected") {
|
|
4466
|
+
dispatch(knockResponseReceived((_b = payload.knockResponse) !== null && _b !== void 0 ? _b : null));
|
|
4238
4467
|
dispatch(connectionStatusChanged("knock_rejected"));
|
|
4239
4468
|
}
|
|
4240
4469
|
},
|
|
@@ -4513,17 +4742,33 @@ const doAcceptWaitingParticipant = createRoomConnectedThunk((payload) => (dispat
|
|
|
4513
4742
|
socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
|
|
4514
4743
|
action: "accept",
|
|
4515
4744
|
clientId: participantId,
|
|
4516
|
-
|
|
4745
|
+
knockResponse: {},
|
|
4746
|
+
});
|
|
4747
|
+
});
|
|
4748
|
+
const doHoldWaitingParticipant = createRoomConnectedThunk((payload) => (dispatch, getState) => {
|
|
4749
|
+
const { participantId, response } = payload;
|
|
4750
|
+
const state = getState();
|
|
4751
|
+
const socket = selectSignalConnectionSocket(state);
|
|
4752
|
+
const message = response === null || response === void 0 ? void 0 : response.trim();
|
|
4753
|
+
const knockResponse = message
|
|
4754
|
+
? { message, sender: { displayName: selectLocalParticipantDisplayName(state) } }
|
|
4755
|
+
: {};
|
|
4756
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
|
|
4757
|
+
action: "hold",
|
|
4758
|
+
clientId: participantId,
|
|
4759
|
+
knockResponse,
|
|
4517
4760
|
});
|
|
4518
4761
|
});
|
|
4519
4762
|
const doRejectWaitingParticipant = createRoomConnectedThunk((payload) => (dispatch, getState) => {
|
|
4520
|
-
const { participantId } = payload;
|
|
4763
|
+
const { participantId, response } = payload;
|
|
4521
4764
|
const state = getState();
|
|
4522
4765
|
const socket = selectSignalConnectionSocket(state);
|
|
4766
|
+
const message = response === null || response === void 0 ? void 0 : response.trim();
|
|
4767
|
+
const knockResponse = message ? { message, sender: {} } : {};
|
|
4523
4768
|
socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
|
|
4524
4769
|
action: "reject",
|
|
4525
4770
|
clientId: participantId,
|
|
4526
|
-
|
|
4771
|
+
knockResponse,
|
|
4527
4772
|
});
|
|
4528
4773
|
});
|
|
4529
4774
|
const selectWaitingParticipants = (state) => state.waitingParticipants.waitingParticipants;
|
|
@@ -5216,7 +5461,10 @@ const SPOTLIGHT_PARTICIPANT_REMOVED = "spotlight:participant-removed";
|
|
|
5216
5461
|
const ROOM_JOINED = "room:joined";
|
|
5217
5462
|
const ROOM_JOINED_ERROR = "room:joined:error";
|
|
5218
5463
|
|
|
5219
|
-
const selectRoomConnectionState = toolkit.createSelector(selectChatMessages, selectFileUploads, selectCloudRecordingRaw, selectBreakoutCurrentGroup, selectBreakoutActive, selectBreakoutGroupedParticipants, selectAllClientViewsInCurrentGroup, selectLiveCaptionsRaw, selectLiveTranscriptionRaw, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectRoomConnectionError, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, selectIsCameraEnabled, selectIsMicrophoneEnabled, (chatMessages, fileUploads, cloudRecording, breakoutCurrentGroup, breakoutActive, breakoutGroupedParticipants, clientViewsInCurrentGroup, liveCaptions, liveTranscription, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, connectionError, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews, isCameraEnabled, isMicrophoneEnabled) => {
|
|
5464
|
+
const selectRoomConnectionState = toolkit.createSelector(selectChatMessages, selectFileUploads, selectCloudRecordingRaw, selectBreakoutCurrentGroup, selectBreakoutCurrentId, selectBreakoutActive, selectBreakoutGroupedParticipants, selectBreakoutGroups, selectBreakoutAssignments, selectBreakoutEnforceAssignment, selectBreakoutTimerSetting, selectBreakoutTimerDuration, selectBreakoutAutoMoveToGroup, selectBreakoutMoveToGroupGracePeriod, selectBreakoutAutoMoveToMain, selectBreakoutMoveToMainGracePeriod, selectBreakoutStartedAt, selectBreakoutEndTime, selectBreakoutMoveToGroupAt, selectBreakoutMoveToMainAt, selectBreakoutIsAvailable, selectBreakoutError, selectAllClientViewsInCurrentGroup, selectLiveCaptionsRaw, selectLiveTranscriptionRaw, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectRoomConnectionError, selectRoomConnectionKnockResponse, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, selectIsCameraEnabled, selectIsMicrophoneEnabled, (chatMessages, fileUploads, cloudRecording, breakoutCurrentGroup, breakoutCurrentId, breakoutActive, breakoutGroupedParticipants, breakoutGroups, breakoutAssignments, breakoutEnforceAssignment, breakoutTimerSetting, breakoutTimerDuration, breakoutAutoMoveToGroup, breakoutMoveToGroupGracePeriod, breakoutAutoMoveToMain, breakoutMoveToMainGracePeriod, breakoutStartedAt, breakoutEndTime, breakoutMoveToGroupAt, breakoutMoveToMainAt, breakoutIsAvailable, breakoutError, clientViewsInCurrentGroup, liveCaptions, liveTranscription, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, connectionError, knockResponse, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews, isCameraEnabled, isMicrophoneEnabled) => {
|
|
5465
|
+
const broadcastingParticipants = breakoutActive && breakoutCurrentId
|
|
5466
|
+
? spotlightedClientViews.filter((c) => !c.breakoutGroup && c.isAudioEnabled && !c.isPresentation)
|
|
5467
|
+
: [];
|
|
5220
5468
|
const state = {
|
|
5221
5469
|
chatMessages,
|
|
5222
5470
|
fileUploads,
|
|
@@ -5228,13 +5476,29 @@ const selectRoomConnectionState = toolkit.createSelector(selectChatMessages, sel
|
|
|
5228
5476
|
}
|
|
5229
5477
|
: undefined,
|
|
5230
5478
|
breakout: {
|
|
5479
|
+
isAvailable: breakoutIsAvailable,
|
|
5480
|
+
error: breakoutError,
|
|
5231
5481
|
isActive: breakoutActive,
|
|
5232
5482
|
currentGroup: breakoutCurrentGroup,
|
|
5483
|
+
groups: breakoutGroups !== null && breakoutGroups !== void 0 ? breakoutGroups : null,
|
|
5484
|
+
enforceAssignment: breakoutEnforceAssignment !== null && breakoutEnforceAssignment !== void 0 ? breakoutEnforceAssignment : false,
|
|
5485
|
+
autoMoveToGroup: breakoutAutoMoveToGroup !== null && breakoutAutoMoveToGroup !== void 0 ? breakoutAutoMoveToGroup : false,
|
|
5486
|
+
moveToGroupGracePeriod: breakoutMoveToGroupGracePeriod !== null && breakoutMoveToGroupGracePeriod !== void 0 ? breakoutMoveToGroupGracePeriod : null,
|
|
5487
|
+
autoMoveToMain: breakoutAutoMoveToMain !== null && breakoutAutoMoveToMain !== void 0 ? breakoutAutoMoveToMain : false,
|
|
5488
|
+
moveToMainGracePeriod: breakoutMoveToMainGracePeriod !== null && breakoutMoveToMainGracePeriod !== void 0 ? breakoutMoveToMainGracePeriod : null,
|
|
5489
|
+
breakoutTimerSetting: breakoutTimerSetting !== null && breakoutTimerSetting !== void 0 ? breakoutTimerSetting : false,
|
|
5490
|
+
breakoutTimerDuration: breakoutTimerDuration !== null && breakoutTimerDuration !== void 0 ? breakoutTimerDuration : 0,
|
|
5491
|
+
startedAt: breakoutStartedAt !== null && breakoutStartedAt !== void 0 ? breakoutStartedAt : null,
|
|
5492
|
+
endTime: breakoutEndTime,
|
|
5493
|
+
moveToGroupAt: breakoutMoveToGroupAt,
|
|
5494
|
+
moveToMainAt: breakoutMoveToMainAt,
|
|
5233
5495
|
groupedParticipants: breakoutGroupedParticipants,
|
|
5234
5496
|
participantsInCurrentGroup: clientViewsInCurrentGroup,
|
|
5497
|
+
broadcastingParticipants,
|
|
5235
5498
|
},
|
|
5236
5499
|
connectionStatus,
|
|
5237
5500
|
connectionError,
|
|
5501
|
+
knockResponse,
|
|
5238
5502
|
events: notificationsEmitter,
|
|
5239
5503
|
isCameraEnabled,
|
|
5240
5504
|
isMicrophoneEnabled,
|
|
@@ -5261,7 +5525,7 @@ const selectRoomConnectionState = toolkit.createSelector(selectChatMessages, sel
|
|
|
5261
5525
|
: undefined,
|
|
5262
5526
|
localScreenshareStatus: localParticipant.isScreenSharing ? "active" : undefined,
|
|
5263
5527
|
localParticipant: Object.assign(Object.assign({}, localParticipant), { stream: localMediaStream }),
|
|
5264
|
-
remoteParticipants,
|
|
5528
|
+
remoteParticipants: remoteParticipants.map((participant) => (Object.assign(Object.assign({}, participant), { breakoutGroupAssigned: (breakoutAssignments === null || breakoutAssignments === void 0 ? void 0 : breakoutAssignments[participant.deviceId]) || "" }))),
|
|
5265
5529
|
screenshares,
|
|
5266
5530
|
waitingParticipants,
|
|
5267
5531
|
spotlightedParticipants: spotlightedClientViews,
|
|
@@ -5527,8 +5791,8 @@ class RoomConnectionClient extends BaseClient {
|
|
|
5527
5791
|
return promise;
|
|
5528
5792
|
});
|
|
5529
5793
|
}
|
|
5530
|
-
sendChatMessage(text, parentId) {
|
|
5531
|
-
this.store.dispatch(doSendChatMessage({ text, parentId }));
|
|
5794
|
+
sendChatMessage(text, parentId, isBroadcast) {
|
|
5795
|
+
this.store.dispatch(doSendChatMessage({ text, parentId, isBroadcast }));
|
|
5532
5796
|
}
|
|
5533
5797
|
removeChatMessage(id, sig) {
|
|
5534
5798
|
this.store.dispatch(doRemoveChatMessage({ id, sig }));
|
|
@@ -5579,8 +5843,11 @@ class RoomConnectionClient extends BaseClient {
|
|
|
5579
5843
|
acceptWaitingParticipant(participantId) {
|
|
5580
5844
|
this.store.dispatch(doAcceptWaitingParticipant({ participantId }));
|
|
5581
5845
|
}
|
|
5582
|
-
|
|
5583
|
-
this.store.dispatch(
|
|
5846
|
+
holdWaitingParticipant(participantId, response) {
|
|
5847
|
+
this.store.dispatch(doHoldWaitingParticipant({ participantId, response }));
|
|
5848
|
+
}
|
|
5849
|
+
rejectWaitingParticipant(participantId, response) {
|
|
5850
|
+
this.store.dispatch(doRejectWaitingParticipant({ participantId, response }));
|
|
5584
5851
|
}
|
|
5585
5852
|
startCloudRecording() {
|
|
5586
5853
|
this.store.dispatch(doStartCloudRecording());
|
|
@@ -5633,6 +5900,39 @@ class RoomConnectionClient extends BaseClient {
|
|
|
5633
5900
|
joinBreakoutMainRoom() {
|
|
5634
5901
|
this.store.dispatch(doBreakoutJoin({ group: "" }));
|
|
5635
5902
|
}
|
|
5903
|
+
startBreakoutSession(options) {
|
|
5904
|
+
this.store.dispatch(doStartBreakoutSession(options));
|
|
5905
|
+
}
|
|
5906
|
+
updateBreakoutSession(options) {
|
|
5907
|
+
this.store.dispatch(doUpdateBreakoutSession(options));
|
|
5908
|
+
}
|
|
5909
|
+
stopBreakoutSession() {
|
|
5910
|
+
this.store.dispatch(doStopBreakoutSession());
|
|
5911
|
+
}
|
|
5912
|
+
assignBreakoutParticipants(assignments) {
|
|
5913
|
+
this.store.dispatch(doAssignBreakoutParticipants({ assignments }));
|
|
5914
|
+
}
|
|
5915
|
+
assignAllBreakoutParticipants() {
|
|
5916
|
+
this.store.dispatch(doAssignAllBreakoutParticipants());
|
|
5917
|
+
}
|
|
5918
|
+
unassignAllBreakoutParticipants() {
|
|
5919
|
+
this.store.dispatch(doUnassignAllBreakoutParticipants());
|
|
5920
|
+
}
|
|
5921
|
+
shuffleBreakoutParticipants() {
|
|
5922
|
+
this.store.dispatch(doShuffleBreakoutParticipants());
|
|
5923
|
+
}
|
|
5924
|
+
extendBreakoutTimer(seconds) {
|
|
5925
|
+
this.store.dispatch(doExtendBreakoutTimer({ seconds }));
|
|
5926
|
+
}
|
|
5927
|
+
stopBreakoutTimer() {
|
|
5928
|
+
this.store.dispatch(doStopBreakoutTimer());
|
|
5929
|
+
}
|
|
5930
|
+
broadcastToGroups(participantId) {
|
|
5931
|
+
this.store.dispatch(doSpotlightParticipant({ id: participantId }));
|
|
5932
|
+
}
|
|
5933
|
+
stopBroadcastToGroups(participantId) {
|
|
5934
|
+
this.store.dispatch(doRemoveSpotlight({ id: participantId }));
|
|
5935
|
+
}
|
|
5636
5936
|
reportStreamResolution(streamId, width, height) {
|
|
5637
5937
|
this.store.dispatch(doRtcReportStreamResolution({ streamId, width, height }));
|
|
5638
5938
|
}
|
|
@@ -5747,6 +6047,8 @@ class WherebyClient {
|
|
|
5747
6047
|
exports.ACCEPTED_FILE_TYPES = ACCEPTED_FILE_TYPES;
|
|
5748
6048
|
exports.ApiClient = ApiClient;
|
|
5749
6049
|
exports.BREAKOUT_CONFIG_CHANGED = BREAKOUT_CONFIG_CHANGED;
|
|
6050
|
+
exports.BREAKOUT_GROUPS_MIN_MAX = BREAKOUT_GROUPS_MIN_MAX;
|
|
6051
|
+
exports.BREAKOUT_UNAVAILABLE_ERROR = BREAKOUT_UNAVAILABLE_ERROR;
|
|
5750
6052
|
exports.CAMERA_DEVICES_CHANGED = CAMERA_DEVICES_CHANGED;
|
|
5751
6053
|
exports.CAMERA_DEVICE_ERROR_CHANGED = CAMERA_DEVICE_ERROR_CHANGED;
|
|
5752
6054
|
exports.CAMERA_STATE_CHANGED = CAMERA_STATE_CHANGED;
|
|
@@ -5761,6 +6063,7 @@ exports.CURRENT_MICROPHONE_CHANGED = CURRENT_MICROPHONE_CHANGED;
|
|
|
5761
6063
|
exports.CURRENT_SPEAKER_CHANGED = CURRENT_SPEAKER_CHANGED;
|
|
5762
6064
|
exports.Credentials = Credentials;
|
|
5763
6065
|
exports.CredentialsService = CredentialsService;
|
|
6066
|
+
exports.DEFAULT_BREAKOUT_TIMER_DURATION = DEFAULT_BREAKOUT_TIMER_DURATION;
|
|
5764
6067
|
exports.GridClient = GridClient;
|
|
5765
6068
|
exports.IS_SETTING_CAMERA_DEVICE = IS_SETTING_CAMERA_DEVICE;
|
|
5766
6069
|
exports.IS_SETTING_MICROPHONE_DEVICE = IS_SETTING_MICROPHONE_DEVICE;
|
|
@@ -5799,8 +6102,10 @@ exports.STREAMING_STOPPED = STREAMING_STOPPED;
|
|
|
5799
6102
|
exports.WAITING_PARTICIPANT_JOINED = WAITING_PARTICIPANT_JOINED;
|
|
5800
6103
|
exports.WAITING_PARTICIPANT_LEFT = WAITING_PARTICIPANT_LEFT;
|
|
5801
6104
|
exports.WherebyClient = WherebyClient;
|
|
6105
|
+
exports.createBreakoutGroups = createBreakoutGroups;
|
|
5802
6106
|
exports.createServices = createServices;
|
|
5803
6107
|
exports.debounce = debounce;
|
|
6108
|
+
exports.defaultBreakoutGroupName = defaultBreakoutGroupName;
|
|
5804
6109
|
exports.getAudioTrack = getAudioTrack;
|
|
5805
6110
|
exports.getFakeMediaStream = getFakeMediaStream;
|
|
5806
6111
|
exports.getUsableCameraEffectPresets = getUsableCameraEffectPresets;
|