@whereby.com/core 1.17.0 → 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 +694 -420
- package/dist/index.d.cts +84 -6
- package/dist/index.d.mts +84 -6
- package/dist/index.d.ts +84 -6
- package/dist/index.mjs +690 -421
- package/dist/legacy-esm.js +690 -421
- package/dist/redux/index.cjs +667 -417
- package/dist/redux/index.d.cts +333 -33
- package/dist/redux/index.d.mts +333 -33
- package/dist/redux/index.d.ts +333 -33
- package/dist/redux/index.js +637 -418
- package/dist/redux/index.mjs +637 -418
- package/package.json +4 -4
package/dist/redux/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createAsyncThunk, createListenerMiddleware, addListener, createSlice, createAction, createSelector, isAnyOf, combineReducers, configureStore } from '@reduxjs/toolkit';
|
|
2
2
|
import { ServerSocket, isFileShareError, getDeviceData, getStream, getUpdatedDevices, replaceTracksInStream, getDisplayMedia, CAMERA_STREAM_ID, RtcManagerDispatcher, setClientProvider, subscribeIssues, assert, fromLocation } from '@whereby.com/media';
|
|
3
|
-
import { v4 } from 'uuid';
|
|
4
3
|
import { EventEmitter } from 'events';
|
|
4
|
+
import { v4 } from 'uuid';
|
|
5
5
|
import nodeBtoa from 'btoa';
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
|
|
@@ -74,7 +74,7 @@ const createReactor = (selectors, callback) => {
|
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
-
const coreVersion = "1.
|
|
77
|
+
const coreVersion = "1.18.0";
|
|
78
78
|
|
|
79
79
|
function decodeRoomName(roomName) {
|
|
80
80
|
if (!roomName) {
|
|
@@ -139,6 +139,9 @@ const signalEvents = {
|
|
|
139
139
|
breakoutMoveToGroup: createSignalEventAction("breakoutMoveToGroup"),
|
|
140
140
|
breakoutMoveToMain: createSignalEventAction("breakoutMoveToMain"),
|
|
141
141
|
breakoutSessionUpdated: createSignalEventAction("breakoutSessionUpdated"),
|
|
142
|
+
breakoutEnding: createSignalEventAction("breakoutEnding"),
|
|
143
|
+
breakoutTimerEnded: createSignalEventAction("breakoutTimerEnded"),
|
|
144
|
+
breakoutTimerExtended: createSignalEventAction("breakoutTimerExtended"),
|
|
142
145
|
chatMessage: createSignalEventAction("chatMessage"),
|
|
143
146
|
chatMessageRemoved: createSignalEventAction("chatMessageRemoved"),
|
|
144
147
|
fileSharingError: createSignalEventAction("fileSharingError"),
|
|
@@ -179,6 +182,7 @@ const ROOM_ACTION_PERMISSIONS_BY_ROLE = {
|
|
|
179
182
|
canEndMeeting: ["host"],
|
|
180
183
|
canAskToSpeak: ["host"],
|
|
181
184
|
canSpotlight: ["host"],
|
|
185
|
+
canManageBreakout: ["host"],
|
|
182
186
|
};
|
|
183
187
|
const authorizationSliceInitialState = {
|
|
184
188
|
roomKey: null,
|
|
@@ -221,6 +225,7 @@ const selectIsAuthorizedToKickClient = createSelector(selectAuthorizationRoleNam
|
|
|
221
225
|
const selectIsAuthorizedToEndMeeting = createSelector(selectAuthorizationRoleName, (localParticipantRole) => ROOM_ACTION_PERMISSIONS_BY_ROLE.canEndMeeting.includes(localParticipantRole));
|
|
222
226
|
const selectIsAuthorizedToAskToSpeak = createSelector(selectAuthorizationRoleName, (localParticipantRole) => ROOM_ACTION_PERMISSIONS_BY_ROLE.canAskToSpeak.includes(localParticipantRole));
|
|
223
227
|
const selectIsAuthorizedToSpotlight = createSelector(selectAuthorizationRoleName, (localParticipantRole) => ROOM_ACTION_PERMISSIONS_BY_ROLE.canSpotlight.includes(localParticipantRole));
|
|
228
|
+
const selectIsAuthorizedToManageBreakout = createSelector(selectAuthorizationRoleName, (localParticipantRole) => ROOM_ACTION_PERMISSIONS_BY_ROLE.canManageBreakout.includes(localParticipantRole));
|
|
224
229
|
|
|
225
230
|
/******************************************************************************
|
|
226
231
|
Copyright (c) Microsoft Corporation.
|
|
@@ -352,6 +357,9 @@ function forwardSocketEvents(socket, dispatch) {
|
|
|
352
357
|
socket.on("breakout_session_updated", (payload) => dispatch(signalEvents.breakoutSessionUpdated(payload)));
|
|
353
358
|
socket.on("breakout_move_to_group", () => dispatch(signalEvents.breakoutMoveToGroup()));
|
|
354
359
|
socket.on("breakout_move_to_main", () => dispatch(signalEvents.breakoutMoveToMain()));
|
|
360
|
+
socket.on("breakout_ending", () => dispatch(signalEvents.breakoutEnding()));
|
|
361
|
+
socket.on("breakout_timer_ended", () => dispatch(signalEvents.breakoutTimerEnded()));
|
|
362
|
+
socket.on("breakout_timer_extended", () => dispatch(signalEvents.breakoutTimerExtended()));
|
|
355
363
|
}
|
|
356
364
|
const SIGNAL_BASE_URL = "wss://signal.appearin.net";
|
|
357
365
|
function createSocket() {
|
|
@@ -1074,209 +1082,6 @@ const selectLocalParticipantView = createSelector(selectLocalParticipantRaw, sel
|
|
|
1074
1082
|
return clientView;
|
|
1075
1083
|
});
|
|
1076
1084
|
|
|
1077
|
-
function createBreakout({ assignments, groups, startedAt, initiatedBy, breakoutStartedAt, breakoutEndedAt, breakoutNotification, breakoutTimerDuration, autoMoveToGroup, moveToGroupGracePeriod, autoMoveToMain, moveToMainGracePeriod, enforceAssignment, breakoutTimerSetting, } = {}) {
|
|
1078
|
-
return {
|
|
1079
|
-
assignments: assignments || null,
|
|
1080
|
-
groups: groups || null,
|
|
1081
|
-
startedAt: startedAt ? new Date(startedAt) : null,
|
|
1082
|
-
initiatedBy,
|
|
1083
|
-
breakoutStartedAt: breakoutStartedAt || null,
|
|
1084
|
-
breakoutEndedAt: breakoutEndedAt || null,
|
|
1085
|
-
breakoutNotification: breakoutNotification || null,
|
|
1086
|
-
breakoutTimerDuration: breakoutTimerDuration || 1800,
|
|
1087
|
-
autoMoveToGroup: autoMoveToGroup || false,
|
|
1088
|
-
moveToGroupGracePeriod: moveToGroupGracePeriod || 10,
|
|
1089
|
-
autoMoveToMain: autoMoveToMain || false,
|
|
1090
|
-
moveToMainGracePeriod: moveToMainGracePeriod || 30,
|
|
1091
|
-
enforceAssignment: enforceAssignment || false,
|
|
1092
|
-
breakoutTimerSetting: breakoutTimerSetting || false,
|
|
1093
|
-
};
|
|
1094
|
-
}
|
|
1095
|
-
const breakoutSliceInitialState = Object.assign(Object.assign({}, createBreakout()), { groupId: null });
|
|
1096
|
-
const breakoutSlice = createSlice({
|
|
1097
|
-
name: "breakout",
|
|
1098
|
-
initialState: breakoutSliceInitialState,
|
|
1099
|
-
reducers: {},
|
|
1100
|
-
extraReducers: (builder) => {
|
|
1101
|
-
builder.addCase(signalEvents.roomJoined, (state, action) => {
|
|
1102
|
-
if ("error" in action.payload) {
|
|
1103
|
-
return state;
|
|
1104
|
-
}
|
|
1105
|
-
const { breakout } = action.payload || {};
|
|
1106
|
-
if (breakout) {
|
|
1107
|
-
return Object.assign(Object.assign({}, state), createBreakout(breakout));
|
|
1108
|
-
}
|
|
1109
|
-
return state;
|
|
1110
|
-
});
|
|
1111
|
-
builder.addCase(signalEvents.breakoutSessionUpdated, (state, action) => {
|
|
1112
|
-
return Object.assign(Object.assign({}, state), createBreakout(action.payload));
|
|
1113
|
-
});
|
|
1114
|
-
builder.addCase(signalEvents.breakoutGroupJoined, (state, action) => {
|
|
1115
|
-
var _a;
|
|
1116
|
-
if (((_a = action.meta) === null || _a === void 0 ? void 0 : _a.localParticipantId) !== action.payload.clientId) {
|
|
1117
|
-
return state;
|
|
1118
|
-
}
|
|
1119
|
-
return Object.assign(Object.assign({}, state), { groupId: action.payload.group });
|
|
1120
|
-
});
|
|
1121
|
-
},
|
|
1122
|
-
});
|
|
1123
|
-
const doBreakoutJoin = createAppThunk((payload) => (_, getState) => {
|
|
1124
|
-
const state = getState();
|
|
1125
|
-
const { socket } = selectSignalConnectionRaw(state);
|
|
1126
|
-
socket === null || socket === void 0 ? void 0 : socket.emit("join_breakout_group", { group: payload.group });
|
|
1127
|
-
});
|
|
1128
|
-
const selectBreakoutRaw = (state) => state.breakout;
|
|
1129
|
-
const selectBreakoutInitiatedBy = (state) => state.breakout.initiatedBy;
|
|
1130
|
-
const selectBreakoutActive = (state) => !!state.breakout.startedAt;
|
|
1131
|
-
const selectBreakoutAssignments = (state) => state.breakout.assignments;
|
|
1132
|
-
const selectBreakoutGroups = (state) => state.breakout.groups;
|
|
1133
|
-
const selectBreakoutCurrentId = createSelector(selectBreakoutRaw, selectLocalParticipantBreakoutGroup, (raw, localParticipantBreakoutGroup) => {
|
|
1134
|
-
return raw.groupId || localParticipantBreakoutGroup || "";
|
|
1135
|
-
});
|
|
1136
|
-
const selectBreakoutCurrentGroup = createSelector(selectBreakoutRaw, selectBreakoutCurrentId, (raw, breakoutCurrentId) => {
|
|
1137
|
-
var _a;
|
|
1138
|
-
const name = (_a = raw.groups) === null || _a === void 0 ? void 0 : _a[breakoutCurrentId];
|
|
1139
|
-
if (!name)
|
|
1140
|
-
return null;
|
|
1141
|
-
return { id: breakoutCurrentId, name };
|
|
1142
|
-
});
|
|
1143
|
-
startAppListening({
|
|
1144
|
-
actionCreator: signalEvents.breakoutMoveToGroup,
|
|
1145
|
-
effect: (_, { dispatch, getState }) => {
|
|
1146
|
-
const state = getState();
|
|
1147
|
-
const localParticipant = selectLocalParticipantRaw(state);
|
|
1148
|
-
const breakoutGroupAssigned = localParticipant.breakoutGroupAssigned;
|
|
1149
|
-
if (breakoutGroupAssigned) {
|
|
1150
|
-
dispatch(doBreakoutJoin({ group: breakoutGroupAssigned }));
|
|
1151
|
-
}
|
|
1152
|
-
},
|
|
1153
|
-
});
|
|
1154
|
-
startAppListening({
|
|
1155
|
-
actionCreator: signalEvents.breakoutMoveToMain,
|
|
1156
|
-
effect: (_, { dispatch }) => {
|
|
1157
|
-
dispatch(doBreakoutJoin({ group: "" }));
|
|
1158
|
-
},
|
|
1159
|
-
});
|
|
1160
|
-
startAppListening({
|
|
1161
|
-
actionCreator: signalEvents.breakoutSessionUpdated,
|
|
1162
|
-
effect: ({ payload }, { dispatch, getState }) => {
|
|
1163
|
-
var _a;
|
|
1164
|
-
const state = getState();
|
|
1165
|
-
const autoMoveToMain = selectBreakoutRaw(state).autoMoveToMain;
|
|
1166
|
-
if (((_a = payload.initiatedBy) === null || _a === void 0 ? void 0 : _a.active) === false) {
|
|
1167
|
-
if (!autoMoveToMain) {
|
|
1168
|
-
dispatch(doBreakoutJoin({ group: "" }));
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
},
|
|
1172
|
-
});
|
|
1173
|
-
|
|
1174
|
-
const chatSliceInitialState = {
|
|
1175
|
-
chatMessages: [],
|
|
1176
|
-
};
|
|
1177
|
-
const chatSlice = createSlice({
|
|
1178
|
-
name: "chat",
|
|
1179
|
-
initialState: chatSliceInitialState,
|
|
1180
|
-
reducers: {},
|
|
1181
|
-
extraReducers(builder) {
|
|
1182
|
-
builder.addCase(signalEvents.chatMessage, (state, action) => {
|
|
1183
|
-
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 }));
|
|
1184
|
-
return Object.assign(Object.assign({}, state), { chatMessages: [...state.chatMessages, message] });
|
|
1185
|
-
});
|
|
1186
|
-
builder.addCase(signalEvents.chatMessageRemoved, (state, action) => {
|
|
1187
|
-
return Object.assign(Object.assign({}, state), { chatMessages: state.chatMessages.map((m) => {
|
|
1188
|
-
return Object.assign(Object.assign({}, m), (m.id === action.payload.id && {
|
|
1189
|
-
removed: true,
|
|
1190
|
-
}));
|
|
1191
|
-
}) });
|
|
1192
|
-
});
|
|
1193
|
-
},
|
|
1194
|
-
});
|
|
1195
|
-
const doSendChatMessage = createRoomConnectedThunk((payload) => (_, getState) => {
|
|
1196
|
-
const state = getState();
|
|
1197
|
-
const socket = selectSignalConnectionRaw(state).socket;
|
|
1198
|
-
const breakoutCurrentId = selectBreakoutCurrentId(state);
|
|
1199
|
-
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 })));
|
|
1200
|
-
});
|
|
1201
|
-
const doRemoveChatMessage = createRoomConnectedThunk(({ id, sig }) => (_, getState) => {
|
|
1202
|
-
const state = getState();
|
|
1203
|
-
const socket = selectSignalConnectionRaw(state).socket;
|
|
1204
|
-
socket === null || socket === void 0 ? void 0 : socket.emit("remove_chat_message", {
|
|
1205
|
-
id,
|
|
1206
|
-
sig,
|
|
1207
|
-
});
|
|
1208
|
-
});
|
|
1209
|
-
const selectChatRaw = (state) => state.chat;
|
|
1210
|
-
const selectChatMessages = (state) => state.chat.chatMessages;
|
|
1211
|
-
|
|
1212
|
-
const initialCloudRecordingState = {
|
|
1213
|
-
isInitiator: false,
|
|
1214
|
-
isRecording: false,
|
|
1215
|
-
startedAt: undefined,
|
|
1216
|
-
};
|
|
1217
|
-
const cloudRecordingSlice = createSlice({
|
|
1218
|
-
name: "cloudRecording",
|
|
1219
|
-
initialState: initialCloudRecordingState,
|
|
1220
|
-
reducers: {
|
|
1221
|
-
recordingRequestStarted: (state) => {
|
|
1222
|
-
return Object.assign(Object.assign({}, state), { isInitiator: true, status: "requested" });
|
|
1223
|
-
},
|
|
1224
|
-
},
|
|
1225
|
-
extraReducers: (builder) => {
|
|
1226
|
-
builder.addCase(signalEvents.cloudRecordingStopped, (state) => {
|
|
1227
|
-
return Object.assign(Object.assign({}, state), { isInitiator: false, isRecording: false, status: undefined });
|
|
1228
|
-
});
|
|
1229
|
-
builder.addCase(signalEvents.cloudRecordingStarted, (state, action) => {
|
|
1230
|
-
const { payload } = action;
|
|
1231
|
-
if (!payload.error) {
|
|
1232
|
-
return state;
|
|
1233
|
-
}
|
|
1234
|
-
return Object.assign(Object.assign({}, state), { isInitiator: false, isRecording: false, status: "error", error: payload.error });
|
|
1235
|
-
});
|
|
1236
|
-
builder.addCase(signalEvents.newClient, (state, { payload }) => {
|
|
1237
|
-
var _a;
|
|
1238
|
-
const { client } = payload;
|
|
1239
|
-
if (((_a = client.role) === null || _a === void 0 ? void 0 : _a.roleName) === "recorder") {
|
|
1240
|
-
return Object.assign(Object.assign({}, state), { isRecording: true, status: "recording", startedAt: client.startedCloudRecordingAt
|
|
1241
|
-
? new Date(client.startedCloudRecordingAt).getTime()
|
|
1242
|
-
: new Date().getTime() });
|
|
1243
|
-
}
|
|
1244
|
-
return state;
|
|
1245
|
-
});
|
|
1246
|
-
},
|
|
1247
|
-
});
|
|
1248
|
-
const { recordingRequestStarted } = cloudRecordingSlice.actions;
|
|
1249
|
-
const doStartCloudRecording = createRoomConnectedThunk(() => (dispatch, getState) => {
|
|
1250
|
-
const state = getState();
|
|
1251
|
-
const socket = selectSignalConnectionRaw(state).socket;
|
|
1252
|
-
const status = selectCloudRecordingStatus(state);
|
|
1253
|
-
if (status && ["recording", "requested"].includes(status)) {
|
|
1254
|
-
return;
|
|
1255
|
-
}
|
|
1256
|
-
socket === null || socket === void 0 ? void 0 : socket.emit("start_recording", {
|
|
1257
|
-
recording: "cloud",
|
|
1258
|
-
});
|
|
1259
|
-
dispatch(recordingRequestStarted());
|
|
1260
|
-
});
|
|
1261
|
-
const doStopCloudRecording = createRoomConnectedThunk(() => (dispatch, getState) => {
|
|
1262
|
-
const state = getState();
|
|
1263
|
-
const socket = selectSignalConnectionRaw(state).socket;
|
|
1264
|
-
socket === null || socket === void 0 ? void 0 : socket.emit("stop_recording");
|
|
1265
|
-
});
|
|
1266
|
-
const selectCloudRecordingRaw = (state) => state.cloudRecording;
|
|
1267
|
-
const selectCloudRecordingStatus = (state) => state.cloudRecording.status;
|
|
1268
|
-
const selectCloudRecordingStartedAt = (state) => state.cloudRecording.startedAt;
|
|
1269
|
-
const selectCloudRecordingError = (state) => state.cloudRecording.error;
|
|
1270
|
-
const selectIsCloudRecording = (state) => state.cloudRecording.isRecording;
|
|
1271
|
-
const selectCloudRecordingIsInitiator = (state) => state.cloudRecording.isInitiator;
|
|
1272
|
-
|
|
1273
|
-
const selectRoomConnectionRaw = (state) => state.roomConnection;
|
|
1274
|
-
const selectRoomConnectionSession = (state) => state.roomConnection.session;
|
|
1275
|
-
const selectRoomConnectionSessionId = (state) => { var _a; return (_a = state.roomConnection.session) === null || _a === void 0 ? void 0 : _a.id; };
|
|
1276
|
-
const selectRoomConnectionStatus = (state) => state.roomConnection.status;
|
|
1277
|
-
const selectRoomConnectionError = (state) => state.roomConnection.error;
|
|
1278
|
-
const selectRoomConnectionKnockResponse = (state) => state.roomConnection.knockResponse;
|
|
1279
|
-
|
|
1280
1085
|
function createRtcEventAction(name) {
|
|
1281
1086
|
return createAction(`rtcConnection/event/${name}`);
|
|
1282
1087
|
}
|
|
@@ -1453,6 +1258,9 @@ const remoteParticipantsSlice = createSlice({
|
|
|
1453
1258
|
});
|
|
1454
1259
|
builder.addCase(signalEvents.breakoutGroupJoined, (state, action) => {
|
|
1455
1260
|
const { clientId, group } = action.payload;
|
|
1261
|
+
if (!findParticipant(state, clientId).participant) {
|
|
1262
|
+
return state;
|
|
1263
|
+
}
|
|
1456
1264
|
return updateParticipant(state, clientId, {
|
|
1457
1265
|
breakoutGroup: group || null,
|
|
1458
1266
|
});
|
|
@@ -1494,43 +1302,618 @@ const selectNumParticipants = createSelector(selectRemoteParticipants, selectLoc
|
|
|
1494
1302
|
return clients.length + 1;
|
|
1495
1303
|
});
|
|
1496
1304
|
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1305
|
+
const selectRoomConnectionRaw = (state) => state.roomConnection;
|
|
1306
|
+
const selectRoomConnectionSession = (state) => state.roomConnection.session;
|
|
1307
|
+
const selectRoomConnectionSessionId = (state) => { var _a; return (_a = state.roomConnection.session) === null || _a === void 0 ? void 0 : _a.id; };
|
|
1308
|
+
const selectRoomConnectionStatus = (state) => state.roomConnection.status;
|
|
1309
|
+
const selectRoomConnectionError = (state) => state.roomConnection.error;
|
|
1310
|
+
const selectRoomConnectionKnockResponse = (state) => state.roomConnection.knockResponse;
|
|
1311
|
+
|
|
1312
|
+
const emitter = new EventEmitter();
|
|
1313
|
+
function createNotificationEvent(payload) {
|
|
1314
|
+
const notificationEvent = Object.assign(Object.assign({}, payload), { timestamp: Date.now() });
|
|
1315
|
+
return notificationEvent;
|
|
1316
|
+
}
|
|
1317
|
+
const initialNotificationsState = {
|
|
1318
|
+
emitter,
|
|
1319
|
+
events: [],
|
|
1501
1320
|
};
|
|
1502
|
-
const
|
|
1503
|
-
name: "
|
|
1504
|
-
initialState:
|
|
1321
|
+
const notificationsSlice = createSlice({
|
|
1322
|
+
name: "notifications",
|
|
1323
|
+
initialState: initialNotificationsState,
|
|
1505
1324
|
reducers: {
|
|
1506
|
-
|
|
1507
|
-
return Object.assign(Object.assign({}, state), {
|
|
1325
|
+
addNotification: (state, action) => {
|
|
1326
|
+
return Object.assign(Object.assign({}, state), { events: [...state.events, Object.assign({}, action.payload)] });
|
|
1327
|
+
},
|
|
1328
|
+
doClearNotifications: (state) => {
|
|
1329
|
+
return Object.assign(Object.assign({}, state), { events: [] });
|
|
1508
1330
|
},
|
|
1509
|
-
},
|
|
1510
|
-
extraReducers: (builder) => {
|
|
1511
|
-
builder.addCase(doStartScreenshare.pending, (state) => {
|
|
1512
|
-
return Object.assign(Object.assign({}, state), { status: "starting" });
|
|
1513
|
-
});
|
|
1514
|
-
builder.addCase(doStartScreenshare.fulfilled, (state, { payload: { stream } }) => {
|
|
1515
|
-
return Object.assign(Object.assign({}, state), { status: "active", stream });
|
|
1516
|
-
});
|
|
1517
|
-
builder.addCase(doStartScreenshare.rejected, (state, { payload }) => {
|
|
1518
|
-
return Object.assign(Object.assign({}, state), { error: payload, status: "inactive", stream: null });
|
|
1519
|
-
});
|
|
1520
1331
|
},
|
|
1521
1332
|
});
|
|
1522
|
-
const {
|
|
1523
|
-
const
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1333
|
+
const { doClearNotifications } = notificationsSlice.actions;
|
|
1334
|
+
const doSetNotification = createAppThunk((payload) => (dispatch, getState) => {
|
|
1335
|
+
dispatch(notificationsSlice.actions.addNotification(payload));
|
|
1336
|
+
const state = getState();
|
|
1337
|
+
const emitter = selectNotificationsEmitter(state);
|
|
1338
|
+
emitter.emit(payload.type, payload);
|
|
1339
|
+
emitter.emit("*", payload);
|
|
1340
|
+
});
|
|
1341
|
+
const selectNotificationsRaw = (state) => state.notifications;
|
|
1342
|
+
const selectNotificationsEvents = (state) => state.notifications.events;
|
|
1343
|
+
const selectNotificationsEmitter = (state) => state.notifications.emitter;
|
|
1344
|
+
startAppListening({
|
|
1345
|
+
actionCreator: signalEvents.chatMessage,
|
|
1346
|
+
effect: ({ payload }, { dispatch, getState }) => {
|
|
1347
|
+
const state = getState();
|
|
1348
|
+
const selfId = selectSelfId(state);
|
|
1349
|
+
if (selfId === payload.senderId) {
|
|
1350
|
+
return;
|
|
1351
|
+
}
|
|
1352
|
+
const client = selectRemoteParticipants(state).find(({ id }) => id === payload.senderId);
|
|
1353
|
+
if (!client) {
|
|
1354
|
+
console.warn("Could not find remote client that sent chat message");
|
|
1355
|
+
return;
|
|
1356
|
+
}
|
|
1357
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
1358
|
+
type: "chatMessageReceived",
|
|
1359
|
+
message: `${client.displayName} says: ${payload.text}`,
|
|
1360
|
+
props: {
|
|
1361
|
+
client,
|
|
1362
|
+
chatMessage: {
|
|
1363
|
+
id: payload.id,
|
|
1364
|
+
senderId: payload.senderId,
|
|
1365
|
+
parentId: payload.parentId,
|
|
1366
|
+
timestamp: payload.timestamp,
|
|
1367
|
+
text: payload.text,
|
|
1368
|
+
sig: payload.sig,
|
|
1369
|
+
removed: false,
|
|
1370
|
+
},
|
|
1371
|
+
},
|
|
1372
|
+
})));
|
|
1373
|
+
},
|
|
1374
|
+
});
|
|
1375
|
+
startAppListening({
|
|
1376
|
+
actionCreator: signalEvents.audioEnableRequested,
|
|
1377
|
+
effect: ({ payload }, { dispatch, getState }) => {
|
|
1378
|
+
const { enable, requestedByClientId } = payload;
|
|
1379
|
+
const state = getState();
|
|
1380
|
+
const client = selectRemoteParticipants(state).find(({ id }) => id === requestedByClientId);
|
|
1381
|
+
if (!client) {
|
|
1382
|
+
console.warn("Could not find remote client that requested a local audio change");
|
|
1383
|
+
return;
|
|
1384
|
+
}
|
|
1385
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
1386
|
+
type: enable ? "requestAudioEnable" : "requestAudioDisable",
|
|
1387
|
+
message: enable
|
|
1388
|
+
? `${client.displayName} has requested for you to speak`
|
|
1389
|
+
: `${client.displayName} has muted your microphone`,
|
|
1390
|
+
props: {
|
|
1391
|
+
client,
|
|
1392
|
+
enable,
|
|
1393
|
+
},
|
|
1394
|
+
})));
|
|
1395
|
+
},
|
|
1396
|
+
});
|
|
1397
|
+
startAppListening({
|
|
1398
|
+
actionCreator: signalEvents.videoEnableRequested,
|
|
1399
|
+
effect: ({ payload }, { dispatch, getState }) => {
|
|
1400
|
+
const { enable, requestedByClientId } = payload;
|
|
1401
|
+
const state = getState();
|
|
1402
|
+
const client = selectRemoteParticipants(state).find(({ id }) => id === requestedByClientId);
|
|
1403
|
+
if (!client) {
|
|
1404
|
+
console.warn("Could not find remote client that requested a local video change");
|
|
1405
|
+
return;
|
|
1406
|
+
}
|
|
1407
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
1408
|
+
type: enable ? "requestVideoEnable" : "requestVideoDisable",
|
|
1409
|
+
message: enable
|
|
1410
|
+
? `${client.displayName} has requested for you to start video`
|
|
1411
|
+
: `${client.displayName} has stopped your video`,
|
|
1412
|
+
props: {
|
|
1413
|
+
client,
|
|
1414
|
+
enable,
|
|
1415
|
+
},
|
|
1416
|
+
})));
|
|
1417
|
+
},
|
|
1418
|
+
});
|
|
1419
|
+
startAppListening({
|
|
1420
|
+
actionCreator: signalEvents.clientMetadataReceived,
|
|
1421
|
+
effect: (action, { dispatch, getOriginalState, getState }) => {
|
|
1422
|
+
var _a;
|
|
1423
|
+
const { error, payload } = action.payload;
|
|
1424
|
+
if (error || !payload) {
|
|
1425
|
+
return;
|
|
1426
|
+
}
|
|
1427
|
+
const { clientId, stickyReaction } = payload;
|
|
1428
|
+
const state = getState();
|
|
1429
|
+
const canAskToSpeak = selectIsAuthorizedToAskToSpeak(state);
|
|
1430
|
+
if (!canAskToSpeak) {
|
|
1431
|
+
return;
|
|
1432
|
+
}
|
|
1433
|
+
const client = selectRemoteParticipants(state).find(({ id }) => id === clientId);
|
|
1434
|
+
if (!client) {
|
|
1435
|
+
console.warn("Could not find remote client that provided updated metadata");
|
|
1436
|
+
return;
|
|
1437
|
+
}
|
|
1438
|
+
const previousState = getOriginalState();
|
|
1439
|
+
const previousClient = selectRemoteParticipants(previousState).find(({ id }) => id === clientId);
|
|
1440
|
+
if ((!stickyReaction && !(previousClient === null || previousClient === void 0 ? void 0 : previousClient.stickyReaction)) ||
|
|
1441
|
+
(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)) {
|
|
1442
|
+
return;
|
|
1443
|
+
}
|
|
1444
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
1445
|
+
type: stickyReaction ? "remoteHandRaised" : "remoteHandLowered",
|
|
1446
|
+
message: `${client.displayName} ${stickyReaction ? "raised" : "lowered"} their hand`,
|
|
1447
|
+
props: {
|
|
1448
|
+
client,
|
|
1449
|
+
stickyReaction,
|
|
1450
|
+
},
|
|
1451
|
+
})));
|
|
1452
|
+
},
|
|
1453
|
+
});
|
|
1454
|
+
createReactor([selectSignalStatus], ({ dispatch, getState }, signalStatus) => {
|
|
1455
|
+
const state = getState();
|
|
1456
|
+
const roomConnectionStatus = selectRoomConnectionStatus(state);
|
|
1457
|
+
if (["left", "kicked"].includes(roomConnectionStatus)) {
|
|
1458
|
+
return;
|
|
1459
|
+
}
|
|
1460
|
+
if (signalStatus === "disconnected") {
|
|
1461
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
1462
|
+
type: "signalTrouble",
|
|
1463
|
+
message: `Network connection lost. Trying to reconnect you...`,
|
|
1464
|
+
props: {},
|
|
1465
|
+
})));
|
|
1466
|
+
}
|
|
1467
|
+
else if (signalStatus === "connected") {
|
|
1468
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
1469
|
+
type: "signalOk",
|
|
1470
|
+
message: `Network connection available`,
|
|
1471
|
+
props: {},
|
|
1472
|
+
})));
|
|
1473
|
+
}
|
|
1474
|
+
});
|
|
1475
|
+
startAppListening({
|
|
1476
|
+
actionCreator: signalEvents.clientUnableToJoin,
|
|
1477
|
+
effect: (action, { dispatch }) => {
|
|
1478
|
+
var _a;
|
|
1479
|
+
if (((_a = action.payload) === null || _a === void 0 ? void 0 : _a.error) === "room_full") {
|
|
1480
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
1481
|
+
type: "clientUnableToJoinFullRoom",
|
|
1482
|
+
message: "Someone tried to join but the room is full and at capacity.",
|
|
1483
|
+
props: {},
|
|
1484
|
+
})));
|
|
1485
|
+
}
|
|
1486
|
+
},
|
|
1487
|
+
});
|
|
1488
|
+
|
|
1489
|
+
const DEFAULT_BREAKOUT_TIMER_DURATION = 1800;
|
|
1490
|
+
function createBreakout({ assignments, groups, startedAt, initiatedBy, breakoutStartedAt, breakoutEndedAt, breakoutNotification, breakoutTimerDuration, autoMoveToGroup, moveToGroupGracePeriod, autoMoveToMain, moveToMainGracePeriod, enforceAssignment, breakoutTimerSetting, } = {}) {
|
|
1491
|
+
return {
|
|
1492
|
+
assignments: assignments || null,
|
|
1493
|
+
groups: groups || null,
|
|
1494
|
+
startedAt: startedAt ? new Date(startedAt) : null,
|
|
1495
|
+
initiatedBy,
|
|
1496
|
+
breakoutStartedAt: breakoutStartedAt || null,
|
|
1497
|
+
breakoutEndedAt: breakoutEndedAt || null,
|
|
1498
|
+
breakoutNotification: breakoutNotification || null,
|
|
1499
|
+
breakoutTimerDuration: breakoutTimerDuration || DEFAULT_BREAKOUT_TIMER_DURATION,
|
|
1500
|
+
autoMoveToGroup: autoMoveToGroup || false,
|
|
1501
|
+
moveToGroupGracePeriod: moveToGroupGracePeriod || 10,
|
|
1502
|
+
autoMoveToMain: autoMoveToMain || false,
|
|
1503
|
+
moveToMainGracePeriod: moveToMainGracePeriod || 30,
|
|
1504
|
+
enforceAssignment: enforceAssignment || false,
|
|
1505
|
+
breakoutTimerSetting: breakoutTimerSetting || false,
|
|
1506
|
+
};
|
|
1507
|
+
}
|
|
1508
|
+
const breakoutSliceInitialState = Object.assign(Object.assign({}, createBreakout()), { error: null });
|
|
1509
|
+
const BREAKOUT_UNAVAILABLE_ERROR = "Breakout groups are not available in peer-to-peer rooms";
|
|
1510
|
+
const breakoutSlice = createSlice({
|
|
1511
|
+
name: "breakout",
|
|
1512
|
+
initialState: breakoutSliceInitialState,
|
|
1513
|
+
reducers: {
|
|
1514
|
+
setBreakoutError: (state, action) => {
|
|
1515
|
+
return Object.assign(Object.assign({}, state), { error: action.payload.error });
|
|
1516
|
+
},
|
|
1517
|
+
},
|
|
1518
|
+
extraReducers: (builder) => {
|
|
1519
|
+
builder.addCase(signalEvents.roomJoined, (state, action) => {
|
|
1520
|
+
if ("error" in action.payload) {
|
|
1521
|
+
return state;
|
|
1522
|
+
}
|
|
1523
|
+
const { breakout } = action.payload || {};
|
|
1524
|
+
state = Object.assign(Object.assign({}, state), { error: null });
|
|
1525
|
+
if (breakout) {
|
|
1526
|
+
return Object.assign(Object.assign({}, state), createBreakout(breakout));
|
|
1527
|
+
}
|
|
1528
|
+
return state;
|
|
1529
|
+
});
|
|
1530
|
+
builder.addCase(signalEvents.breakoutSessionUpdated, (state, action) => {
|
|
1531
|
+
return Object.assign(Object.assign({}, state), createBreakout(action.payload));
|
|
1532
|
+
});
|
|
1533
|
+
},
|
|
1534
|
+
});
|
|
1535
|
+
const { setBreakoutError } = breakoutSlice.actions;
|
|
1536
|
+
const doBreakoutJoin = createAppThunk((payload) => (_, getState) => {
|
|
1537
|
+
const state = getState();
|
|
1538
|
+
const { socket } = selectSignalConnectionRaw(state);
|
|
1539
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("join_breakout_group", { group: payload.group });
|
|
1540
|
+
});
|
|
1541
|
+
function ensureDefaults(state, payload) {
|
|
1542
|
+
const { moveToGroupGracePeriod, moveToMainGracePeriod, breakoutTimerDuration } = state.breakout;
|
|
1543
|
+
const next = Object.assign({}, payload);
|
|
1544
|
+
if (next.autoMoveToGroup === true && next.moveToGroupGracePeriod == null) {
|
|
1545
|
+
next.moveToGroupGracePeriod = moveToGroupGracePeriod !== null && moveToGroupGracePeriod !== void 0 ? moveToGroupGracePeriod : 10;
|
|
1546
|
+
}
|
|
1547
|
+
if (next.autoMoveToMain === true && next.moveToMainGracePeriod == null) {
|
|
1548
|
+
next.moveToMainGracePeriod = moveToMainGracePeriod !== null && moveToMainGracePeriod !== void 0 ? moveToMainGracePeriod : 30;
|
|
1549
|
+
}
|
|
1550
|
+
if (next.breakoutTimerSetting === true && !next.breakoutTimerDuration) {
|
|
1551
|
+
next.breakoutTimerDuration = breakoutTimerDuration || DEFAULT_BREAKOUT_TIMER_DURATION;
|
|
1552
|
+
}
|
|
1553
|
+
return next;
|
|
1554
|
+
}
|
|
1555
|
+
function emitBreakoutSessionUpdate(state, payload) {
|
|
1556
|
+
const { socket } = selectSignalConnectionRaw(state);
|
|
1557
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("update_breakout_session", ensureDefaults(state, payload));
|
|
1558
|
+
}
|
|
1559
|
+
function resolveClientAssignmentsToDeviceAssignments(state, clientAssignments) {
|
|
1560
|
+
const deviceIdByClientId = {};
|
|
1561
|
+
for (const participant of selectRemoteParticipants(state)) {
|
|
1562
|
+
deviceIdByClientId[participant.id] = participant.deviceId;
|
|
1563
|
+
}
|
|
1564
|
+
const localParticipant = selectLocalParticipantRaw(state);
|
|
1565
|
+
const localDeviceId = selectDeviceId(state);
|
|
1566
|
+
if (localParticipant.id && localDeviceId) {
|
|
1567
|
+
deviceIdByClientId[localParticipant.id] = localDeviceId;
|
|
1568
|
+
}
|
|
1569
|
+
const deviceAssignments = {};
|
|
1570
|
+
for (const [clientId, group] of Object.entries(clientAssignments)) {
|
|
1571
|
+
const deviceId = deviceIdByClientId[clientId];
|
|
1572
|
+
if (deviceId) {
|
|
1573
|
+
deviceAssignments[deviceId] = group;
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
return deviceAssignments;
|
|
1577
|
+
}
|
|
1578
|
+
const doStartBreakoutSession = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), (payload) => (dispatch, getState) => {
|
|
1579
|
+
const state = getState();
|
|
1580
|
+
if (!selectBreakoutIsAvailable(state)) {
|
|
1581
|
+
dispatch(setBreakoutError({ error: BREAKOUT_UNAVAILABLE_ERROR }));
|
|
1582
|
+
console.warn(BREAKOUT_UNAVAILABLE_ERROR);
|
|
1583
|
+
return;
|
|
1584
|
+
}
|
|
1585
|
+
dispatch(setBreakoutError({ error: null }));
|
|
1586
|
+
const { assignments } = payload, rest = __rest(payload, ["assignments"]);
|
|
1587
|
+
emitBreakoutSessionUpdate(state, Object.assign(Object.assign(Object.assign({}, rest), (assignments ? { assignments: resolveClientAssignmentsToDeviceAssignments(state, assignments) } : {})), { active: true }));
|
|
1588
|
+
});
|
|
1589
|
+
const doUpdateBreakoutSession = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), (payload) => (_, getState) => {
|
|
1590
|
+
const state = getState();
|
|
1591
|
+
const { assignments } = payload, rest = __rest(payload, ["assignments"]);
|
|
1592
|
+
emitBreakoutSessionUpdate(state, Object.assign(Object.assign({}, rest), (assignments ? { assignments: resolveClientAssignmentsToDeviceAssignments(state, assignments) } : {})));
|
|
1593
|
+
});
|
|
1594
|
+
const doStopBreakoutSession = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), () => (_, getState) => {
|
|
1595
|
+
emitBreakoutSessionUpdate(getState(), { active: false });
|
|
1596
|
+
});
|
|
1597
|
+
const doAssignBreakoutParticipants = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), (payload) => (_, getState) => {
|
|
1598
|
+
const state = getState();
|
|
1599
|
+
const deviceAssignments = resolveClientAssignmentsToDeviceAssignments(state, payload.assignments);
|
|
1600
|
+
const mergedAssignments = Object.assign(Object.assign({}, (selectBreakoutAssignments(state) || {})), deviceAssignments);
|
|
1601
|
+
emitBreakoutSessionUpdate(state, { assignments: mergedAssignments });
|
|
1602
|
+
});
|
|
1603
|
+
const BREAKOUT_GROUPS_MIN_MAX = [2, 20];
|
|
1604
|
+
const GROUP_ID_ALPHABET = "abcdefghijklmnopqrstuvwxyz";
|
|
1605
|
+
function defaultBreakoutGroupName(groupId) {
|
|
1606
|
+
return `Group ${groupId.toUpperCase()}`;
|
|
1607
|
+
}
|
|
1608
|
+
function createBreakoutGroups(count = BREAKOUT_GROUPS_MIN_MAX[0]) {
|
|
1609
|
+
const [min, max] = BREAKOUT_GROUPS_MIN_MAX;
|
|
1610
|
+
const amount = Math.min(Math.max(count, min), max);
|
|
1611
|
+
const groups = {};
|
|
1612
|
+
for (let i = 0; i < amount; i++) {
|
|
1613
|
+
const id = GROUP_ID_ALPHABET[i];
|
|
1614
|
+
groups[id] = defaultBreakoutGroupName(id);
|
|
1615
|
+
}
|
|
1616
|
+
return groups;
|
|
1617
|
+
}
|
|
1618
|
+
function shuffle(items) {
|
|
1619
|
+
return [...items].sort(() => Math.random() - 0.5);
|
|
1620
|
+
}
|
|
1621
|
+
function chunk(items, chunkCount) {
|
|
1622
|
+
let remaining = [...items];
|
|
1623
|
+
let count = chunkCount;
|
|
1624
|
+
const chunks = [];
|
|
1625
|
+
while (remaining.length && count > 0) {
|
|
1626
|
+
const size = Math.ceil(remaining.length / count);
|
|
1627
|
+
chunks.push(remaining.slice(0, size));
|
|
1628
|
+
remaining = remaining.slice(size);
|
|
1629
|
+
count -= 1;
|
|
1630
|
+
}
|
|
1631
|
+
return chunks;
|
|
1632
|
+
}
|
|
1633
|
+
function randomizeAssignments(deviceIds, groupIds) {
|
|
1634
|
+
const assignments = {};
|
|
1635
|
+
chunk(deviceIds, groupIds.length).forEach((chunkOfDevices, index) => {
|
|
1636
|
+
chunkOfDevices.forEach((deviceId) => {
|
|
1637
|
+
assignments[deviceId] = groupIds[index];
|
|
1638
|
+
});
|
|
1639
|
+
});
|
|
1640
|
+
return assignments;
|
|
1641
|
+
}
|
|
1642
|
+
const doAssignAllBreakoutParticipants = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), () => (_, getState) => {
|
|
1643
|
+
const state = getState();
|
|
1644
|
+
const groupIds = Object.keys(selectBreakoutGroups(state) || {});
|
|
1645
|
+
if (!groupIds.length)
|
|
1646
|
+
return;
|
|
1647
|
+
const deviceIds = shuffle(selectRemoteParticipants(state).map((participant) => participant.deviceId));
|
|
1648
|
+
emitBreakoutSessionUpdate(state, { assignments: randomizeAssignments(deviceIds, groupIds) });
|
|
1649
|
+
});
|
|
1650
|
+
const doUnassignAllBreakoutParticipants = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), () => (_, getState) => {
|
|
1651
|
+
const state = getState();
|
|
1652
|
+
const assignments = selectBreakoutAssignments(state) || {};
|
|
1653
|
+
const cleared = Object.keys(assignments).reduce((acc, deviceId) => {
|
|
1654
|
+
acc[deviceId] = "";
|
|
1655
|
+
return acc;
|
|
1656
|
+
}, {});
|
|
1657
|
+
emitBreakoutSessionUpdate(state, { assignments: cleared });
|
|
1658
|
+
});
|
|
1659
|
+
const doShuffleBreakoutParticipants = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), () => (_, getState) => {
|
|
1660
|
+
const state = getState();
|
|
1661
|
+
const groupIds = Object.keys(selectBreakoutGroups(state) || {});
|
|
1662
|
+
if (!groupIds.length)
|
|
1663
|
+
return;
|
|
1664
|
+
const assignments = selectBreakoutAssignments(state) || {};
|
|
1665
|
+
const deviceIds = shuffle(Object.entries(assignments)
|
|
1666
|
+
.filter(([, groupId]) => !!groupId)
|
|
1667
|
+
.map(([deviceId]) => deviceId));
|
|
1668
|
+
emitBreakoutSessionUpdate(state, { assignments: randomizeAssignments(deviceIds, groupIds) });
|
|
1669
|
+
});
|
|
1670
|
+
const doExtendBreakoutTimer = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), (payload) => (_, getState) => {
|
|
1671
|
+
var _a;
|
|
1672
|
+
const state = getState();
|
|
1673
|
+
const additionalSeconds = (_a = payload === null || payload === void 0 ? void 0 : payload.seconds) !== null && _a !== void 0 ? _a : 60;
|
|
1674
|
+
const breakoutTimerDuration = (selectBreakoutTimerDuration(state) || 0) + additionalSeconds;
|
|
1675
|
+
emitBreakoutSessionUpdate(state, { breakoutTimerDuration });
|
|
1676
|
+
});
|
|
1677
|
+
const doStopBreakoutTimer = createAppAuthorizedThunk((state) => selectIsAuthorizedToManageBreakout(state), () => (_, getState) => {
|
|
1678
|
+
emitBreakoutSessionUpdate(getState(), { breakoutTimerSetting: false });
|
|
1679
|
+
});
|
|
1680
|
+
const selectBreakoutRaw = (state) => state.breakout;
|
|
1681
|
+
const selectBreakoutError = (state) => state.breakout.error;
|
|
1682
|
+
const selectBreakoutIsAvailable = (state) => state.room.mode === "group";
|
|
1683
|
+
const selectBreakoutInitiatedBy = (state) => state.breakout.initiatedBy;
|
|
1684
|
+
const selectBreakoutActive = (state) => !!state.breakout.startedAt;
|
|
1685
|
+
const selectBreakoutAssignments = (state) => state.breakout.assignments;
|
|
1686
|
+
const selectBreakoutGroups = (state) => state.breakout.groups;
|
|
1687
|
+
const selectBreakoutEnforceAssignment = (state) => state.breakout.enforceAssignment;
|
|
1688
|
+
const selectBreakoutTimerSetting = (state) => state.breakout.breakoutTimerSetting;
|
|
1689
|
+
const selectBreakoutTimerDuration = (state) => state.breakout.breakoutTimerDuration;
|
|
1690
|
+
const selectBreakoutAutoMoveToGroup = (state) => state.breakout.autoMoveToGroup;
|
|
1691
|
+
const selectBreakoutMoveToGroupGracePeriod = (state) => state.breakout.moveToGroupGracePeriod;
|
|
1692
|
+
const selectBreakoutAutoMoveToMain = (state) => state.breakout.autoMoveToMain;
|
|
1693
|
+
const selectBreakoutMoveToMainGracePeriod = (state) => state.breakout.moveToMainGracePeriod;
|
|
1694
|
+
const selectBreakoutStartedAt = (state) => state.breakout.startedAt;
|
|
1695
|
+
const selectBreakoutEndTime = createSelector(selectBreakoutRaw, (raw) => {
|
|
1696
|
+
if (!raw.breakoutStartedAt)
|
|
1697
|
+
return null;
|
|
1698
|
+
const startTime = new Date(raw.breakoutStartedAt).getTime();
|
|
1699
|
+
const gracePeriod = raw.autoMoveToGroup ? raw.moveToGroupGracePeriod || 0 : 0;
|
|
1700
|
+
return startTime + ((raw.breakoutTimerDuration || 0) + gracePeriod) * 1000;
|
|
1701
|
+
});
|
|
1702
|
+
const selectBreakoutMoveToGroupAt = createSelector(selectBreakoutRaw, (raw) => {
|
|
1703
|
+
if (!raw.autoMoveToGroup || !raw.breakoutStartedAt)
|
|
1704
|
+
return null;
|
|
1705
|
+
return new Date(raw.breakoutStartedAt).getTime() + (raw.moveToGroupGracePeriod || 0) * 1000;
|
|
1706
|
+
});
|
|
1707
|
+
const selectBreakoutMoveToMainAt = createSelector(selectBreakoutRaw, (raw) => {
|
|
1708
|
+
if (!raw.autoMoveToMain || !raw.breakoutEndedAt)
|
|
1709
|
+
return null;
|
|
1710
|
+
return new Date(raw.breakoutEndedAt).getTime() + (raw.moveToMainGracePeriod || 0) * 1000;
|
|
1711
|
+
});
|
|
1712
|
+
const selectBreakoutCurrentId = createSelector(selectLocalParticipantBreakoutGroup, (localParticipantBreakoutGroup) => localParticipantBreakoutGroup || "");
|
|
1713
|
+
const selectBreakoutCurrentGroup = createSelector(selectBreakoutRaw, selectBreakoutCurrentId, (raw, breakoutCurrentId) => {
|
|
1714
|
+
var _a;
|
|
1715
|
+
const name = (_a = raw.groups) === null || _a === void 0 ? void 0 : _a[breakoutCurrentId];
|
|
1716
|
+
if (!name)
|
|
1717
|
+
return null;
|
|
1718
|
+
return { id: breakoutCurrentId, name };
|
|
1719
|
+
});
|
|
1720
|
+
startAppListening({
|
|
1721
|
+
actionCreator: signalEvents.breakoutMoveToGroup,
|
|
1722
|
+
effect: (_, { dispatch, getState }) => {
|
|
1723
|
+
const state = getState();
|
|
1724
|
+
const localParticipant = selectLocalParticipantRaw(state);
|
|
1725
|
+
const breakoutGroupAssigned = localParticipant.breakoutGroupAssigned;
|
|
1726
|
+
if (breakoutGroupAssigned) {
|
|
1727
|
+
dispatch(doBreakoutJoin({ group: breakoutGroupAssigned }));
|
|
1728
|
+
}
|
|
1729
|
+
},
|
|
1730
|
+
});
|
|
1731
|
+
startAppListening({
|
|
1732
|
+
actionCreator: signalEvents.breakoutMoveToMain,
|
|
1733
|
+
effect: (_, { dispatch }) => {
|
|
1734
|
+
dispatch(doBreakoutJoin({ group: "" }));
|
|
1735
|
+
},
|
|
1736
|
+
});
|
|
1737
|
+
startAppListening({
|
|
1738
|
+
actionCreator: signalEvents.breakoutSessionUpdated,
|
|
1739
|
+
effect: ({ payload }, { dispatch, getState }) => {
|
|
1740
|
+
var _a;
|
|
1741
|
+
const state = getState();
|
|
1742
|
+
const autoMoveToMain = selectBreakoutRaw(state).autoMoveToMain;
|
|
1743
|
+
if (((_a = payload.initiatedBy) === null || _a === void 0 ? void 0 : _a.active) === false) {
|
|
1744
|
+
if (!autoMoveToMain) {
|
|
1745
|
+
dispatch(doBreakoutJoin({ group: "" }));
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
},
|
|
1749
|
+
});
|
|
1750
|
+
startAppListening({
|
|
1751
|
+
actionCreator: signalEvents.breakoutEnding,
|
|
1752
|
+
effect: (_, { dispatch }) => {
|
|
1753
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
1754
|
+
type: "breakoutTimerEnding",
|
|
1755
|
+
message: "The breakout session is ending soon",
|
|
1756
|
+
props: {},
|
|
1757
|
+
})));
|
|
1758
|
+
},
|
|
1759
|
+
});
|
|
1760
|
+
startAppListening({
|
|
1761
|
+
actionCreator: signalEvents.breakoutTimerExtended,
|
|
1762
|
+
effect: (_, { dispatch }) => {
|
|
1763
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
1764
|
+
type: "breakoutTimerExtended",
|
|
1765
|
+
message: "The breakout timer was extended",
|
|
1766
|
+
props: {},
|
|
1767
|
+
})));
|
|
1768
|
+
},
|
|
1769
|
+
});
|
|
1770
|
+
startAppListening({
|
|
1771
|
+
actionCreator: signalEvents.breakoutTimerEnded,
|
|
1772
|
+
effect: (_, { dispatch }) => {
|
|
1773
|
+
dispatch(doSetNotification(createNotificationEvent({
|
|
1774
|
+
type: "breakoutTimerEnded",
|
|
1775
|
+
message: "The breakout timer ended",
|
|
1776
|
+
props: {},
|
|
1777
|
+
})));
|
|
1778
|
+
},
|
|
1779
|
+
});
|
|
1780
|
+
|
|
1781
|
+
const chatSliceInitialState = {
|
|
1782
|
+
chatMessages: [],
|
|
1783
|
+
};
|
|
1784
|
+
const chatSlice = createSlice({
|
|
1785
|
+
name: "chat",
|
|
1786
|
+
initialState: chatSliceInitialState,
|
|
1787
|
+
reducers: {},
|
|
1788
|
+
extraReducers(builder) {
|
|
1789
|
+
builder.addCase(signalEvents.chatMessage, (state, action) => {
|
|
1790
|
+
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 }));
|
|
1791
|
+
return Object.assign(Object.assign({}, state), { chatMessages: [...state.chatMessages, message] });
|
|
1792
|
+
});
|
|
1793
|
+
builder.addCase(signalEvents.chatMessageRemoved, (state, action) => {
|
|
1794
|
+
return Object.assign(Object.assign({}, state), { chatMessages: state.chatMessages.map((m) => {
|
|
1795
|
+
return Object.assign(Object.assign({}, m), (m.id === action.payload.id && {
|
|
1796
|
+
removed: true,
|
|
1797
|
+
}));
|
|
1798
|
+
}) });
|
|
1799
|
+
});
|
|
1800
|
+
},
|
|
1801
|
+
});
|
|
1802
|
+
const doSendChatMessage = createRoomConnectedThunk((payload) => (_, getState) => {
|
|
1803
|
+
const state = getState();
|
|
1804
|
+
const socket = selectSignalConnectionRaw(state).socket;
|
|
1805
|
+
const breakoutCurrentId = selectBreakoutCurrentId(state);
|
|
1806
|
+
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 })));
|
|
1807
|
+
});
|
|
1808
|
+
const doRemoveChatMessage = createRoomConnectedThunk(({ id, sig }) => (_, getState) => {
|
|
1809
|
+
const state = getState();
|
|
1810
|
+
const socket = selectSignalConnectionRaw(state).socket;
|
|
1811
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("remove_chat_message", {
|
|
1812
|
+
id,
|
|
1813
|
+
sig,
|
|
1814
|
+
});
|
|
1815
|
+
});
|
|
1816
|
+
const selectChatRaw = (state) => state.chat;
|
|
1817
|
+
const selectChatMessages = (state) => state.chat.chatMessages;
|
|
1818
|
+
|
|
1819
|
+
const initialCloudRecordingState = {
|
|
1820
|
+
isInitiator: false,
|
|
1821
|
+
isRecording: false,
|
|
1822
|
+
startedAt: undefined,
|
|
1823
|
+
};
|
|
1824
|
+
const cloudRecordingSlice = createSlice({
|
|
1825
|
+
name: "cloudRecording",
|
|
1826
|
+
initialState: initialCloudRecordingState,
|
|
1827
|
+
reducers: {
|
|
1828
|
+
recordingRequestStarted: (state) => {
|
|
1829
|
+
return Object.assign(Object.assign({}, state), { isInitiator: true, status: "requested" });
|
|
1830
|
+
},
|
|
1831
|
+
},
|
|
1832
|
+
extraReducers: (builder) => {
|
|
1833
|
+
builder.addCase(signalEvents.cloudRecordingStopped, (state) => {
|
|
1834
|
+
return Object.assign(Object.assign({}, state), { isInitiator: false, isRecording: false, status: undefined });
|
|
1835
|
+
});
|
|
1836
|
+
builder.addCase(signalEvents.cloudRecordingStarted, (state, action) => {
|
|
1837
|
+
const { payload } = action;
|
|
1838
|
+
if (!payload.error) {
|
|
1839
|
+
return state;
|
|
1840
|
+
}
|
|
1841
|
+
return Object.assign(Object.assign({}, state), { isInitiator: false, isRecording: false, status: "error", error: payload.error });
|
|
1842
|
+
});
|
|
1843
|
+
builder.addCase(signalEvents.newClient, (state, { payload }) => {
|
|
1844
|
+
var _a;
|
|
1845
|
+
const { client } = payload;
|
|
1846
|
+
if (((_a = client.role) === null || _a === void 0 ? void 0 : _a.roleName) === "recorder") {
|
|
1847
|
+
return Object.assign(Object.assign({}, state), { isRecording: true, status: "recording", startedAt: client.startedCloudRecordingAt
|
|
1848
|
+
? new Date(client.startedCloudRecordingAt).getTime()
|
|
1849
|
+
: new Date().getTime() });
|
|
1850
|
+
}
|
|
1851
|
+
return state;
|
|
1852
|
+
});
|
|
1853
|
+
},
|
|
1854
|
+
});
|
|
1855
|
+
const { recordingRequestStarted } = cloudRecordingSlice.actions;
|
|
1856
|
+
const doStartCloudRecording = createRoomConnectedThunk(() => (dispatch, getState) => {
|
|
1857
|
+
const state = getState();
|
|
1858
|
+
const socket = selectSignalConnectionRaw(state).socket;
|
|
1859
|
+
const status = selectCloudRecordingStatus(state);
|
|
1860
|
+
if (status && ["recording", "requested"].includes(status)) {
|
|
1861
|
+
return;
|
|
1862
|
+
}
|
|
1863
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("start_recording", {
|
|
1864
|
+
recording: "cloud",
|
|
1865
|
+
});
|
|
1866
|
+
dispatch(recordingRequestStarted());
|
|
1867
|
+
});
|
|
1868
|
+
const doStopCloudRecording = createRoomConnectedThunk(() => (dispatch, getState) => {
|
|
1869
|
+
const state = getState();
|
|
1870
|
+
const socket = selectSignalConnectionRaw(state).socket;
|
|
1871
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("stop_recording");
|
|
1872
|
+
});
|
|
1873
|
+
const selectCloudRecordingRaw = (state) => state.cloudRecording;
|
|
1874
|
+
const selectCloudRecordingStatus = (state) => state.cloudRecording.status;
|
|
1875
|
+
const selectCloudRecordingStartedAt = (state) => state.cloudRecording.startedAt;
|
|
1876
|
+
const selectCloudRecordingError = (state) => state.cloudRecording.error;
|
|
1877
|
+
const selectIsCloudRecording = (state) => state.cloudRecording.isRecording;
|
|
1878
|
+
const selectCloudRecordingIsInitiator = (state) => state.cloudRecording.isInitiator;
|
|
1879
|
+
|
|
1880
|
+
const localScreenshareSliceInitialState = {
|
|
1881
|
+
status: "inactive",
|
|
1882
|
+
stream: null,
|
|
1883
|
+
error: null,
|
|
1884
|
+
};
|
|
1885
|
+
const localScreenshareSlice = createSlice({
|
|
1886
|
+
name: "localScreenshare",
|
|
1887
|
+
initialState: localScreenshareSliceInitialState,
|
|
1888
|
+
reducers: {
|
|
1889
|
+
stopScreenshare(state, action) {
|
|
1890
|
+
return Object.assign(Object.assign({}, state), { status: "inactive", stream: null });
|
|
1891
|
+
},
|
|
1892
|
+
},
|
|
1893
|
+
extraReducers: (builder) => {
|
|
1894
|
+
builder.addCase(doStartScreenshare.pending, (state) => {
|
|
1895
|
+
return Object.assign(Object.assign({}, state), { status: "starting" });
|
|
1896
|
+
});
|
|
1897
|
+
builder.addCase(doStartScreenshare.fulfilled, (state, { payload: { stream } }) => {
|
|
1898
|
+
return Object.assign(Object.assign({}, state), { status: "active", stream });
|
|
1899
|
+
});
|
|
1900
|
+
builder.addCase(doStartScreenshare.rejected, (state, { payload }) => {
|
|
1901
|
+
return Object.assign(Object.assign({}, state), { error: payload, status: "inactive", stream: null });
|
|
1902
|
+
});
|
|
1903
|
+
},
|
|
1904
|
+
});
|
|
1905
|
+
const { stopScreenshare } = localScreenshareSlice.actions;
|
|
1906
|
+
const doStartScreenshare = createAsyncRoomConnectedThunk("localScreenshare/doStartScreenshare", (_1, _a) => __awaiter(void 0, [_1, _a], void 0, function* (_, { dispatch, getState, rejectWithValue }) {
|
|
1907
|
+
var _b;
|
|
1908
|
+
try {
|
|
1909
|
+
const state = getState();
|
|
1910
|
+
const screenshareStream = selectLocalScreenshareStream(state);
|
|
1911
|
+
if (screenshareStream) {
|
|
1912
|
+
return { stream: screenshareStream };
|
|
1913
|
+
}
|
|
1914
|
+
const stream = yield getDisplayMedia({
|
|
1915
|
+
video: {
|
|
1916
|
+
width: { max: window.screen.width },
|
|
1534
1917
|
height: { max: window.screen.height },
|
|
1535
1918
|
},
|
|
1536
1919
|
audio: {
|
|
@@ -1588,6 +1971,7 @@ function isRecorderClient(client) {
|
|
|
1588
1971
|
}
|
|
1589
1972
|
const roomSliceInitialState = {
|
|
1590
1973
|
isLocked: false,
|
|
1974
|
+
mode: null,
|
|
1591
1975
|
};
|
|
1592
1976
|
const roomSlice = createSlice({
|
|
1593
1977
|
name: "room",
|
|
@@ -1595,6 +1979,7 @@ const roomSlice = createSlice({
|
|
|
1595
1979
|
reducers: {},
|
|
1596
1980
|
extraReducers: (builder) => {
|
|
1597
1981
|
builder.addCase(signalEvents.roomJoined, (state, action) => {
|
|
1982
|
+
var _a;
|
|
1598
1983
|
if ("error" in action.payload) {
|
|
1599
1984
|
if (action.payload.error === "room_locked") {
|
|
1600
1985
|
return Object.assign(Object.assign({}, state), { isLocked: Boolean(action.payload.isLocked) });
|
|
@@ -1602,7 +1987,7 @@ const roomSlice = createSlice({
|
|
|
1602
1987
|
return state;
|
|
1603
1988
|
}
|
|
1604
1989
|
const { room } = action.payload;
|
|
1605
|
-
return Object.assign(Object.assign({}, state), { isLocked: Boolean(room.isLocked) });
|
|
1990
|
+
return Object.assign(Object.assign({}, state), { isLocked: Boolean(room.isLocked), mode: (_a = room.mode) !== null && _a !== void 0 ? _a : (room.sfuServer ? "group" : "normal") });
|
|
1606
1991
|
});
|
|
1607
1992
|
builder.addCase(signalEvents.roomLocked, (state, action) => {
|
|
1608
1993
|
const { isLocked } = action.payload;
|
|
@@ -1632,6 +2017,7 @@ const doEndMeeting = createAppAuthorizedThunk((state) => selectIsAuthorizedToEnd
|
|
|
1632
2017
|
}
|
|
1633
2018
|
});
|
|
1634
2019
|
const selectRoomIsLocked = (state) => state.room.isLocked;
|
|
2020
|
+
const selectRoomMode = (state) => state.room.mode;
|
|
1635
2021
|
const selectScreenshares = createSelector(selectLocalScreenshareStream, selectLocalParticipantRaw, selectRemoteParticipants, (localScreenshareStream, localParticipant, remoteParticipants) => {
|
|
1636
2022
|
const screenshares = [];
|
|
1637
2023
|
if (localScreenshareStream) {
|
|
@@ -1973,8 +2359,7 @@ const doHandleAcceptStreams = createAppThunk((payload) => (dispatch, getState) =
|
|
|
1973
2359
|
const participant = remoteClients.find((p) => p.id === clientId);
|
|
1974
2360
|
if (!participant)
|
|
1975
2361
|
continue;
|
|
1976
|
-
if (state === "to_accept" ||
|
|
1977
|
-
(state === "new_accept" && shouldAcceptNewClients)) {
|
|
2362
|
+
if (state === "to_accept" || (state === "new_accept" && shouldAcceptNewClients)) {
|
|
1978
2363
|
rtcManager.acceptNewStream({
|
|
1979
2364
|
streamId: streamId === CAMERA_STREAM_ID ? clientId : streamId,
|
|
1980
2365
|
clientId,
|
|
@@ -2017,7 +2402,10 @@ const doRtcManagerInitialize = createAppThunk(() => (dispatch, getState) => {
|
|
|
2017
2402
|
const isCameraEnabled = selectIsCameraEnabled(getState());
|
|
2018
2403
|
const isMicrophoneEnabled = selectIsMicrophoneEnabled(getState());
|
|
2019
2404
|
if (localMediaStream && rtcManager) {
|
|
2020
|
-
rtcManager.addCameraStream(localMediaStream, {
|
|
2405
|
+
rtcManager.addCameraStream(localMediaStream, {
|
|
2406
|
+
audioPaused: !isMicrophoneEnabled,
|
|
2407
|
+
videoPaused: !isCameraEnabled,
|
|
2408
|
+
});
|
|
2021
2409
|
}
|
|
2022
2410
|
dispatch(rtcManagerInitialized());
|
|
2023
2411
|
});
|
|
@@ -2160,7 +2548,7 @@ const selectStreamsToAccept = createSelector(selectRtcStatus, selectRemoteClient
|
|
|
2160
2548
|
}
|
|
2161
2549
|
if ((!client.breakoutGroup && !breakoutCurrentId) ||
|
|
2162
2550
|
client.breakoutGroup === breakoutCurrentId ||
|
|
2163
|
-
(
|
|
2551
|
+
(!client.breakoutGroup && clientSpotlight) ||
|
|
2164
2552
|
ignoreBreakoutGroups) {
|
|
2165
2553
|
if (state === "done_accept")
|
|
2166
2554
|
continue;
|
|
@@ -2746,190 +3134,21 @@ createReactor([
|
|
|
2746
3134
|
dispatch(doSendClientMetadata());
|
|
2747
3135
|
}
|
|
2748
3136
|
});
|
|
2749
|
-
createReactor([selectBreakoutAssignments, selectDeviceId, selectLocalParticipantRaw], ({ dispatch }, breakoutAssignments, deviceId, localParticipant) => {
|
|
3137
|
+
createReactor([selectBreakoutAssignments, selectDeviceId, selectLocalParticipantRaw, selectBreakoutGroups, selectBreakoutActive], ({ dispatch }, breakoutAssignments, deviceId, localParticipant, breakoutGroups, breakoutActive) => {
|
|
2750
3138
|
const breakoutGroupAssigned = (breakoutAssignments === null || breakoutAssignments === void 0 ? void 0 : breakoutAssignments[deviceId || ""]) || "";
|
|
2751
3139
|
if (localParticipant.breakoutGroupAssigned === breakoutGroupAssigned) {
|
|
2752
3140
|
return;
|
|
2753
3141
|
}
|
|
2754
3142
|
dispatch(setBreakoutGroupAssigned({ breakoutGroupAssigned }));
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
const emitter = new EventEmitter();
|
|
2758
|
-
function createNotificationEvent(payload) {
|
|
2759
|
-
const notificationEvent = Object.assign(Object.assign({}, payload), { timestamp: Date.now() });
|
|
2760
|
-
return notificationEvent;
|
|
2761
|
-
}
|
|
2762
|
-
const initialNotificationsState = {
|
|
2763
|
-
emitter,
|
|
2764
|
-
events: [],
|
|
2765
|
-
};
|
|
2766
|
-
const notificationsSlice = createSlice({
|
|
2767
|
-
name: "notifications",
|
|
2768
|
-
initialState: initialNotificationsState,
|
|
2769
|
-
reducers: {
|
|
2770
|
-
addNotification: (state, action) => {
|
|
2771
|
-
return Object.assign(Object.assign({}, state), { events: [...state.events, Object.assign({}, action.payload)] });
|
|
2772
|
-
},
|
|
2773
|
-
doClearNotifications: (state) => {
|
|
2774
|
-
return Object.assign(Object.assign({}, state), { events: [] });
|
|
2775
|
-
},
|
|
2776
|
-
},
|
|
2777
|
-
});
|
|
2778
|
-
const { doClearNotifications } = notificationsSlice.actions;
|
|
2779
|
-
const doSetNotification = createAppThunk((payload) => (dispatch, getState) => {
|
|
2780
|
-
dispatch(notificationsSlice.actions.addNotification(payload));
|
|
2781
|
-
const state = getState();
|
|
2782
|
-
const emitter = selectNotificationsEmitter(state);
|
|
2783
|
-
emitter.emit(payload.type, payload);
|
|
2784
|
-
emitter.emit("*", payload);
|
|
2785
|
-
});
|
|
2786
|
-
const selectNotificationsRaw = (state) => state.notifications;
|
|
2787
|
-
const selectNotificationsEvents = (state) => state.notifications.events;
|
|
2788
|
-
const selectNotificationsEmitter = (state) => state.notifications.emitter;
|
|
2789
|
-
startAppListening({
|
|
2790
|
-
actionCreator: signalEvents.chatMessage,
|
|
2791
|
-
effect: ({ payload }, { dispatch, getState }) => {
|
|
2792
|
-
const state = getState();
|
|
2793
|
-
const selfId = selectSelfId(state);
|
|
2794
|
-
if (selfId === payload.senderId) {
|
|
2795
|
-
return;
|
|
2796
|
-
}
|
|
2797
|
-
const client = selectRemoteParticipants(state).find(({ id }) => id === payload.senderId);
|
|
2798
|
-
if (!client) {
|
|
2799
|
-
console.warn("Could not find remote client that sent chat message");
|
|
2800
|
-
return;
|
|
2801
|
-
}
|
|
2802
|
-
dispatch(doSetNotification(createNotificationEvent({
|
|
2803
|
-
type: "chatMessageReceived",
|
|
2804
|
-
message: `${client.displayName} says: ${payload.text}`,
|
|
2805
|
-
props: {
|
|
2806
|
-
client,
|
|
2807
|
-
chatMessage: {
|
|
2808
|
-
id: payload.id,
|
|
2809
|
-
senderId: payload.senderId,
|
|
2810
|
-
parentId: payload.parentId,
|
|
2811
|
-
timestamp: payload.timestamp,
|
|
2812
|
-
text: payload.text,
|
|
2813
|
-
sig: payload.sig,
|
|
2814
|
-
removed: false,
|
|
2815
|
-
},
|
|
2816
|
-
},
|
|
2817
|
-
})));
|
|
2818
|
-
},
|
|
2819
|
-
});
|
|
2820
|
-
startAppListening({
|
|
2821
|
-
actionCreator: signalEvents.audioEnableRequested,
|
|
2822
|
-
effect: ({ payload }, { dispatch, getState }) => {
|
|
2823
|
-
const { enable, requestedByClientId } = payload;
|
|
2824
|
-
const state = getState();
|
|
2825
|
-
const client = selectRemoteParticipants(state).find(({ id }) => id === requestedByClientId);
|
|
2826
|
-
if (!client) {
|
|
2827
|
-
console.warn("Could not find remote client that requested a local audio change");
|
|
2828
|
-
return;
|
|
2829
|
-
}
|
|
2830
|
-
dispatch(doSetNotification(createNotificationEvent({
|
|
2831
|
-
type: enable ? "requestAudioEnable" : "requestAudioDisable",
|
|
2832
|
-
message: enable
|
|
2833
|
-
? `${client.displayName} has requested for you to speak`
|
|
2834
|
-
: `${client.displayName} has muted your microphone`,
|
|
2835
|
-
props: {
|
|
2836
|
-
client,
|
|
2837
|
-
enable,
|
|
2838
|
-
},
|
|
2839
|
-
})));
|
|
2840
|
-
},
|
|
2841
|
-
});
|
|
2842
|
-
startAppListening({
|
|
2843
|
-
actionCreator: signalEvents.videoEnableRequested,
|
|
2844
|
-
effect: ({ payload }, { dispatch, getState }) => {
|
|
2845
|
-
const { enable, requestedByClientId } = payload;
|
|
2846
|
-
const state = getState();
|
|
2847
|
-
const client = selectRemoteParticipants(state).find(({ id }) => id === requestedByClientId);
|
|
2848
|
-
if (!client) {
|
|
2849
|
-
console.warn("Could not find remote client that requested a local video change");
|
|
2850
|
-
return;
|
|
2851
|
-
}
|
|
2852
|
-
dispatch(doSetNotification(createNotificationEvent({
|
|
2853
|
-
type: enable ? "requestVideoEnable" : "requestVideoDisable",
|
|
2854
|
-
message: enable
|
|
2855
|
-
? `${client.displayName} has requested for you to start video`
|
|
2856
|
-
: `${client.displayName} has stopped your video`,
|
|
2857
|
-
props: {
|
|
2858
|
-
client,
|
|
2859
|
-
enable,
|
|
2860
|
-
},
|
|
2861
|
-
})));
|
|
2862
|
-
},
|
|
2863
|
-
});
|
|
2864
|
-
startAppListening({
|
|
2865
|
-
actionCreator: signalEvents.clientMetadataReceived,
|
|
2866
|
-
effect: (action, { dispatch, getOriginalState, getState }) => {
|
|
2867
|
-
var _a;
|
|
2868
|
-
const { error, payload } = action.payload;
|
|
2869
|
-
if (error || !payload) {
|
|
2870
|
-
return;
|
|
2871
|
-
}
|
|
2872
|
-
const { clientId, stickyReaction } = payload;
|
|
2873
|
-
const state = getState();
|
|
2874
|
-
const canAskToSpeak = selectIsAuthorizedToAskToSpeak(state);
|
|
2875
|
-
if (!canAskToSpeak) {
|
|
2876
|
-
return;
|
|
2877
|
-
}
|
|
2878
|
-
const client = selectRemoteParticipants(state).find(({ id }) => id === clientId);
|
|
2879
|
-
if (!client) {
|
|
2880
|
-
console.warn("Could not find remote client that provided updated metadata");
|
|
2881
|
-
return;
|
|
2882
|
-
}
|
|
2883
|
-
const previousState = getOriginalState();
|
|
2884
|
-
const previousClient = selectRemoteParticipants(previousState).find(({ id }) => id === clientId);
|
|
2885
|
-
if ((!stickyReaction && !(previousClient === null || previousClient === void 0 ? void 0 : previousClient.stickyReaction)) ||
|
|
2886
|
-
(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)) {
|
|
2887
|
-
return;
|
|
2888
|
-
}
|
|
2889
|
-
dispatch(doSetNotification(createNotificationEvent({
|
|
2890
|
-
type: stickyReaction ? "remoteHandRaised" : "remoteHandLowered",
|
|
2891
|
-
message: `${client.displayName} ${stickyReaction ? "raised" : "lowered"} their hand`,
|
|
2892
|
-
props: {
|
|
2893
|
-
client,
|
|
2894
|
-
stickyReaction,
|
|
2895
|
-
},
|
|
2896
|
-
})));
|
|
2897
|
-
},
|
|
2898
|
-
});
|
|
2899
|
-
createReactor([selectSignalStatus], ({ dispatch, getState }, signalStatus) => {
|
|
2900
|
-
const state = getState();
|
|
2901
|
-
const roomConnectionStatus = selectRoomConnectionStatus(state);
|
|
2902
|
-
if (["left", "kicked"].includes(roomConnectionStatus)) {
|
|
2903
|
-
return;
|
|
2904
|
-
}
|
|
2905
|
-
if (signalStatus === "disconnected") {
|
|
2906
|
-
dispatch(doSetNotification(createNotificationEvent({
|
|
2907
|
-
type: "signalTrouble",
|
|
2908
|
-
message: `Network connection lost. Trying to reconnect you...`,
|
|
2909
|
-
props: {},
|
|
2910
|
-
})));
|
|
2911
|
-
}
|
|
2912
|
-
else if (signalStatus === "connected") {
|
|
3143
|
+
if (breakoutGroupAssigned && breakoutActive) {
|
|
3144
|
+
const groupName = (breakoutGroups === null || breakoutGroups === void 0 ? void 0 : breakoutGroups[breakoutGroupAssigned]) || "";
|
|
2913
3145
|
dispatch(doSetNotification(createNotificationEvent({
|
|
2914
|
-
type: "
|
|
2915
|
-
message: `
|
|
2916
|
-
props: {},
|
|
3146
|
+
type: "breakoutGroupAssigned",
|
|
3147
|
+
message: groupName ? `You've been assigned to ${groupName}` : "You've been assigned to a group",
|
|
3148
|
+
props: { group: breakoutGroupAssigned, groupName },
|
|
2917
3149
|
})));
|
|
2918
3150
|
}
|
|
2919
3151
|
});
|
|
2920
|
-
startAppListening({
|
|
2921
|
-
actionCreator: signalEvents.clientUnableToJoin,
|
|
2922
|
-
effect: (action, { dispatch }) => {
|
|
2923
|
-
var _a;
|
|
2924
|
-
if (((_a = action.payload) === null || _a === void 0 ? void 0 : _a.error) === "room_full") {
|
|
2925
|
-
dispatch(doSetNotification(createNotificationEvent({
|
|
2926
|
-
type: "clientUnableToJoinFullRoom",
|
|
2927
|
-
message: "Someone tried to join but the room is full and at capacity.",
|
|
2928
|
-
props: {},
|
|
2929
|
-
})));
|
|
2930
|
-
}
|
|
2931
|
-
},
|
|
2932
|
-
});
|
|
2933
3152
|
|
|
2934
3153
|
const organizationSliceInitialState = {
|
|
2935
3154
|
data: null,
|
|
@@ -4558,4 +4777,4 @@ function createServices() {
|
|
|
4558
4777
|
};
|
|
4559
4778
|
}
|
|
4560
4779
|
|
|
4561
|
-
export { ACCEPTED_FILE_TYPES, MAX_FILES_PER_UPLOAD, MAX_FILE_SIZE, addAppListener, addSpotlight, appSlice, authorizationSlice, authorizationSliceInitialState, breakoutSlice, breakoutSliceInitialState, captioningRequestStarted, chatSlice, chatSliceInitialState, clearCaption, clearFileUploads, cloudRecordingSlice, connectionMonitorSlice, connectionMonitorSliceInitialState, connectionMonitorStarted, connectionMonitorStopped, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createAsyncRoomConnectedThunk, createAuthorizedRoomConnectedThunk, createReactor, createRemoteParticipant, createRoomConnectedThunk, createServices, createStore, createWebRtcEmitter, deviceBusy, deviceCredentialsSlice, deviceCredentialsSliceInitialState, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doBreakoutJoin, doCancelKnock, doClearNotifications, doConnectRoom, doConnectRtc, doDisconnectRtc, doDownloadFile, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doHoldWaitingParticipant, doKickParticipant, doKnockRoom, doLocalStreamEffect, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRemoveChatMessage, doRemoveSpotlight, doRequestAudioEnable, doRequestVideoEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSendClientMetadata, doSendFiles, doSetDevice, doSetDisplayName, doSetLocalStickyReaction, doSetNotification, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doSpotlightParticipant, doStartCloudRecording, doStartConnectionMonitor, doStartLiveCaptions, doStartLiveTranscription, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopConnectionMonitor, doStopLiveCaptions, doStopLiveTranscription, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doTriggerLocalStreamRefresh, doUpdateDeviceList, fileShareRequestSettled, fileShareSlice, fileShareSliceInitialState, fileUploadFailed, fileUploadSucceeded, fileUploadsStarted, initialCloudRecordingState, initialLiveCaptionsState, initialLiveTranscriptionState, initialLocalMediaState, initialNotificationsState, initialState$2 as initialState, isAcceptingStreams, isClientSpotlighted, listenerMiddleware, liveCaptionsSlice, liveTranscriptionSlice, localMediaSlice, localMediaStopped, localParticipantSlice, localParticipantSliceInitialState, localScreenshareSlice, localScreenshareSliceInitialState, localStreamMetadataUpdated, notificationsSlice, observeStore, organizationSlice, organizationSliceInitialState, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, remoteParticipantsSliceInitialState, removeSpotlight, resolutionReported, roomConnectionSlice, roomConnectionSliceInitialState, roomSlice, roomSliceInitialState, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcAnalyticsSliceInitialState, rtcClientConnectionStatusChanged, rtcConnectionSlice, rtcConnectionSliceInitialState, rtcDisconnected, rtcDispatcherCreated, rtcEvents, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAllClientViews, selectAllClientViewsInCurrentGroup, selectAppDisplayName, selectAppExternalId, selectAppIgnoreBreakoutGroups, selectAppInitialConfig, selectAppIsActive, selectAppIsAssistant, selectAppIsAudioRecorder, selectAppIsDialIn, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAssistantKey, selectAuthorizationRoleName, selectBreakoutActive, selectBreakoutAssignments, selectBreakoutCurrentGroup, selectBreakoutCurrentId, selectBreakoutGroupedParticipants, selectBreakoutGroups, selectBreakoutInitiatedBy, selectBreakoutRaw, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingIsInitiator, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectConnectionMonitorIsRunning, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectCurrentSpeakerDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectFileShareRaw, selectFileShareRequestInFlight, selectFileUploads, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToAskToSpeak, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsAuthorizedToRequestVideoEnable, selectIsAuthorizedToSpotlight, selectIsCameraEnabled, selectIsCloudRecording, selectIsHDModeEnabled, selectIsLiveCaptions, selectIsLiveTranscription, selectIsLocalMediaStarting, selectIsLocalParticipantSpotlighted, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectIsWidescreenModeEnabled, selectLiveCaptionsError, selectLiveCaptionsLog, selectLiveCaptionsRaw, selectLiveCaptionsStartedAt, selectLiveCaptionsStatus, selectLiveTranscriptionError, selectLiveTranscriptionIsInitiator, selectLiveTranscriptionRaw, selectLiveTranscriptionStartedAt, selectLiveTranscriptionStatus, selectLocalMediaBeforeEffectTracks, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantBreakoutAssigned, selectLocalParticipantBreakoutGroup, selectLocalParticipantClientClaim, selectLocalParticipantDisplayName, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalParticipantStickyReaction, selectLocalParticipantView, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectNotificationsEmitter, selectNotificationsEvents, selectNotificationsRaw, selectNumClients, selectNumParticipants, selectOrganizationId, selectOrganizationPreferences, selectOrganizationRaw, selectRemoteClientViews, selectRemoteClients, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionKnockResponse, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldStartConnectionMonitor, selectShouldStopConnectionMonitor, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectSpotlightedClientViews, selectSpotlights, selectSpotlightsRaw, selectStopCallbackFunction, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setBreakoutGroupAssigned, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, setDisplayName, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalConnectionSliceInitialState, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, spotlightsSlice, spotlightsSliceInitialState, startAppListening, stopScreenshare, streamIdForClient, streamStatusUpdated, streamingSlice, streamingSliceInitialState, toggleCameraEnabled, toggleHdModeEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, toggleWidescreenModeEnabled, transcribingRequestStarted, updateReportedValues, waitingParticipantsSlice, waitingParticipantsSliceInitialState };
|
|
4780
|
+
export { ACCEPTED_FILE_TYPES, BREAKOUT_GROUPS_MIN_MAX, BREAKOUT_UNAVAILABLE_ERROR, DEFAULT_BREAKOUT_TIMER_DURATION, MAX_FILES_PER_UPLOAD, MAX_FILE_SIZE, addAppListener, addSpotlight, appSlice, authorizationSlice, authorizationSliceInitialState, breakoutSlice, breakoutSliceInitialState, captioningRequestStarted, chatSlice, chatSliceInitialState, clearCaption, clearFileUploads, cloudRecordingSlice, connectionMonitorSlice, connectionMonitorSliceInitialState, connectionMonitorStarted, connectionMonitorStopped, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createAsyncRoomConnectedThunk, createAuthorizedRoomConnectedThunk, createBreakoutGroups, createNotificationEvent, createReactor, createRemoteParticipant, createRoomConnectedThunk, createServices, createStore, createWebRtcEmitter, defaultBreakoutGroupName, deviceBusy, deviceCredentialsSlice, deviceCredentialsSliceInitialState, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doAssignAllBreakoutParticipants, doAssignBreakoutParticipants, doBreakoutJoin, doCancelKnock, doClearNotifications, doConnectRoom, doConnectRtc, doDisconnectRtc, doDownloadFile, doEnableAudio, doEnableVideo, doEndMeeting, doExtendBreakoutTimer, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doHoldWaitingParticipant, doKickParticipant, doKnockRoom, doLocalStreamEffect, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRemoveChatMessage, doRemoveSpotlight, doRequestAudioEnable, doRequestVideoEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSendClientMetadata, doSendFiles, doSetDevice, doSetDisplayName, doSetLocalStickyReaction, doSetNotification, doShuffleBreakoutParticipants, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doSpotlightParticipant, doStartBreakoutSession, doStartCloudRecording, doStartConnectionMonitor, doStartLiveCaptions, doStartLiveTranscription, doStartLocalMedia, doStartScreenshare, doStopBreakoutSession, doStopBreakoutTimer, doStopCloudRecording, doStopConnectionMonitor, doStopLiveCaptions, doStopLiveTranscription, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doTriggerLocalStreamRefresh, doUnassignAllBreakoutParticipants, doUpdateBreakoutSession, doUpdateDeviceList, fileShareRequestSettled, fileShareSlice, fileShareSliceInitialState, fileUploadFailed, fileUploadSucceeded, fileUploadsStarted, initialCloudRecordingState, initialLiveCaptionsState, initialLiveTranscriptionState, initialLocalMediaState, initialNotificationsState, initialState$2 as initialState, isAcceptingStreams, isClientSpotlighted, listenerMiddleware, liveCaptionsSlice, liveTranscriptionSlice, localMediaSlice, localMediaStopped, localParticipantSlice, localParticipantSliceInitialState, localScreenshareSlice, localScreenshareSliceInitialState, localStreamMetadataUpdated, notificationsSlice, observeStore, organizationSlice, organizationSliceInitialState, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, remoteParticipantsSliceInitialState, removeSpotlight, resolutionReported, roomConnectionSlice, roomConnectionSliceInitialState, roomSlice, roomSliceInitialState, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcAnalyticsSliceInitialState, rtcClientConnectionStatusChanged, rtcConnectionSlice, rtcConnectionSliceInitialState, rtcDisconnected, rtcDispatcherCreated, rtcEvents, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAllClientViews, selectAllClientViewsInCurrentGroup, selectAppDisplayName, selectAppExternalId, selectAppIgnoreBreakoutGroups, selectAppInitialConfig, selectAppIsActive, selectAppIsAssistant, selectAppIsAudioRecorder, selectAppIsDialIn, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAssistantKey, selectAuthorizationRoleName, selectBreakoutActive, selectBreakoutAssignments, selectBreakoutAutoMoveToGroup, selectBreakoutAutoMoveToMain, selectBreakoutCurrentGroup, selectBreakoutCurrentId, selectBreakoutEndTime, selectBreakoutEnforceAssignment, selectBreakoutError, selectBreakoutGroupedParticipants, selectBreakoutGroups, selectBreakoutInitiatedBy, selectBreakoutIsAvailable, selectBreakoutMoveToGroupAt, selectBreakoutMoveToGroupGracePeriod, selectBreakoutMoveToMainAt, selectBreakoutMoveToMainGracePeriod, selectBreakoutRaw, selectBreakoutStartedAt, selectBreakoutTimerDuration, selectBreakoutTimerSetting, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingIsInitiator, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectConnectionMonitorIsRunning, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectCurrentSpeakerDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectFileShareRaw, selectFileShareRequestInFlight, selectFileUploads, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToAskToSpeak, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToManageBreakout, selectIsAuthorizedToRequestAudioEnable, selectIsAuthorizedToRequestVideoEnable, selectIsAuthorizedToSpotlight, selectIsCameraEnabled, selectIsCloudRecording, selectIsHDModeEnabled, selectIsLiveCaptions, selectIsLiveTranscription, selectIsLocalMediaStarting, selectIsLocalParticipantSpotlighted, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectIsWidescreenModeEnabled, selectLiveCaptionsError, selectLiveCaptionsLog, selectLiveCaptionsRaw, selectLiveCaptionsStartedAt, selectLiveCaptionsStatus, selectLiveTranscriptionError, selectLiveTranscriptionIsInitiator, selectLiveTranscriptionRaw, selectLiveTranscriptionStartedAt, selectLiveTranscriptionStatus, selectLocalMediaBeforeEffectTracks, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantBreakoutAssigned, selectLocalParticipantBreakoutGroup, selectLocalParticipantClientClaim, selectLocalParticipantDisplayName, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalParticipantStickyReaction, selectLocalParticipantView, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectNotificationsEmitter, selectNotificationsEvents, selectNotificationsRaw, selectNumClients, selectNumParticipants, selectOrganizationId, selectOrganizationPreferences, selectOrganizationRaw, selectRemoteClientViews, selectRemoteClients, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionKnockResponse, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRoomMode, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldStartConnectionMonitor, selectShouldStopConnectionMonitor, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectSpotlightedClientViews, selectSpotlights, selectSpotlightsRaw, selectStopCallbackFunction, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setBreakoutError, setBreakoutGroupAssigned, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, setDisplayName, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalConnectionSliceInitialState, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, spotlightsSlice, spotlightsSliceInitialState, startAppListening, stopScreenshare, streamIdForClient, streamStatusUpdated, streamingSlice, streamingSliceInitialState, toggleCameraEnabled, toggleHdModeEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, toggleWidescreenModeEnabled, transcribingRequestStarted, updateReportedValues, waitingParticipantsSlice, waitingParticipantsSliceInitialState };
|