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