@whereby.com/core 1.21.2 → 1.23.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.
@@ -1,5 +1,5 @@
1
1
  import { createAsyncThunk, createListenerMiddleware, addListener, createSlice, createAction, createSelector, isAnyOf, combineReducers, configureStore } from '@reduxjs/toolkit';
2
- import { ServerSocket, isFileShareError, getDeviceData, getStream, getUpdatedDevices, replaceTracksInStream, getDisplayMedia, CAMERA_STREAM_ID, RtcManagerDispatcher, setClientProvider, subscribeIssues, assert, fromLocation } from '@whereby.com/media';
2
+ import { ServerSocket, isFileShareError, getDeviceData, getStream, getUpdatedDevices, replaceTracksInStream, getDisplayMedia, CAMERA_STREAM_ID, RtcManagerDispatcher, setClientProvider, subscribeIssues, isRoomIntegrationErrorCode, assert, fromLocation } from '@whereby.com/media';
3
3
  import { EventEmitter } from 'events';
4
4
  import { v4 } from 'uuid';
5
5
  import nodeBtoa from 'btoa';
@@ -74,7 +74,7 @@ const createReactor = (selectors, callback) => {
74
74
  });
75
75
  };
76
76
 
77
- const coreVersion = "1.21.2";
77
+ const coreVersion = "1.23.0";
78
78
 
79
79
  function decodeRoomName(roomName) {
80
80
  if (!roomName) {
@@ -156,6 +156,11 @@ const signalEvents = {
156
156
  knockerLeft: createSignalEventAction("knockerLeft"),
157
157
  knockHandled: createSignalEventAction("knockHandled"),
158
158
  newClient: createSignalEventAction("newClient"),
159
+ roomIntegrationStarted: createSignalEventAction("roomIntegrationStarted"),
160
+ roomIntegrationStopped: createSignalEventAction("roomIntegrationStopped"),
161
+ roomIntegrationPropsUpdated: createSignalEventAction("roomIntegrationPropsUpdated"),
162
+ roomIntegrationEnabled: createSignalEventAction("roomIntegrationEnabled"),
163
+ roomIntegrationDisabled: createSignalEventAction("roomIntegrationDisabled"),
159
164
  roomJoined: createSignalEventAction("roomJoined"),
160
165
  roomKnocked: createSignalEventAction("roomKnocked"),
161
166
  roomLeft: createSignalEventAction("roomLeft"),
@@ -186,6 +191,7 @@ const ROOM_ACTION_PERMISSIONS_BY_ROLE = {
186
191
  canAskToSpeak: ["host"],
187
192
  canSpotlight: ["host"],
188
193
  canManageBreakout: ["host"],
194
+ canManageRoomIntegration: ["host"],
189
195
  };
190
196
  const authorizationSliceInitialState = {
191
197
  roomKey: null,
@@ -230,6 +236,7 @@ const selectIsAuthorizedToEndMeeting = createSelector(selectAuthorizationRoleNam
230
236
  const selectIsAuthorizedToAskToSpeak = createSelector(selectAuthorizationRoleName, (localParticipantRole) => ROOM_ACTION_PERMISSIONS_BY_ROLE.canAskToSpeak.includes(localParticipantRole));
231
237
  const selectIsAuthorizedToSpotlight = createSelector(selectAuthorizationRoleName, (localParticipantRole) => ROOM_ACTION_PERMISSIONS_BY_ROLE.canSpotlight.includes(localParticipantRole));
232
238
  const selectIsAuthorizedToManageBreakout = createSelector(selectAuthorizationRoleName, (localParticipantRole) => ROOM_ACTION_PERMISSIONS_BY_ROLE.canManageBreakout.includes(localParticipantRole));
239
+ const selectIsAuthorizedToManageRoomIntegration = createSelector(selectAuthorizationRoleName, (localParticipantRole) => ROOM_ACTION_PERMISSIONS_BY_ROLE.canManageRoomIntegration.includes(localParticipantRole));
233
240
 
234
241
  /******************************************************************************
235
242
  Copyright (c) Microsoft Corporation.
@@ -360,6 +367,11 @@ function forwardSocketEvents(socket, dispatch) {
360
367
  socket.on("video_enable_requested", (payload) => dispatch(signalEvents.videoEnableRequested(payload)));
361
368
  socket.on("breakout_group_joined", (payload) => dispatch(signalEvents.breakoutGroupJoined(payload)));
362
369
  socket.on("breakout_session_updated", (payload) => dispatch(signalEvents.breakoutSessionUpdated(payload)));
370
+ socket.on("room_integration_started", (payload) => dispatch(signalEvents.roomIntegrationStarted(payload)));
371
+ socket.on("room_integration_stopped", (payload) => dispatch(signalEvents.roomIntegrationStopped(payload)));
372
+ socket.on("room_integration_props_updated", (payload) => dispatch(signalEvents.roomIntegrationPropsUpdated(payload)));
373
+ socket.on("room_integration_enabled", (payload) => dispatch(signalEvents.roomIntegrationEnabled(payload)));
374
+ socket.on("room_integration_disabled", (payload) => dispatch(signalEvents.roomIntegrationDisabled(payload)));
363
375
  socket.on("breakout_move_to_group", () => dispatch(signalEvents.breakoutMoveToGroup()));
364
376
  socket.on("breakout_move_to_main", () => dispatch(signalEvents.breakoutMoveToMain()));
365
377
  socket.on("breakout_ending", () => dispatch(signalEvents.breakoutEnding()));
@@ -1083,7 +1095,7 @@ const selectLocalParticipantClientClaim = (state) => state.localParticipant.clie
1083
1095
  const selectLocalParticipantStickyReaction = (state) => state.localParticipant.stickyReaction;
1084
1096
  const selectLocalParticipantBreakoutGroup = (state) => state.localParticipant.breakoutGroup;
1085
1097
  const selectLocalParticipantBreakoutAssigned = (state) => state.localParticipant.breakoutGroupAssigned;
1086
- const selectLocalParticipantView = createSelector(selectLocalParticipantRaw, selectLocalMediaStream, (participant, localStream) => {
1098
+ const selectLocalParticipantView = createSelector(selectLocalParticipantRaw, selectLocalMediaStream, (state) => state.rtcConnection.isAudioOnlyModeEnabled, (participant, localStream, isAudioOnlyModeEnabled) => {
1087
1099
  const clientView = {
1088
1100
  id: participant.id,
1089
1101
  clientId: participant.id,
@@ -1093,6 +1105,7 @@ const selectLocalParticipantView = createSelector(selectLocalParticipantRaw, sel
1093
1105
  isLocalClient: true,
1094
1106
  isAudioEnabled: participant.isAudioEnabled,
1095
1107
  isVideoEnabled: participant.isVideoEnabled,
1108
+ isAudioOnlyModeEnabled,
1096
1109
  };
1097
1110
  if (NON_PERSON_ROLES.includes(participant.roleName)) {
1098
1111
  return null;
@@ -2105,6 +2118,13 @@ const selectScreenshares = createSelector(selectLocalScreenshareStream, selectLo
2105
2118
  }
2106
2119
  return screenshares;
2107
2120
  });
2121
+ const selectRemoteScreenshareVideoTrackIds = createSelector(selectScreenshares, (screenshares) => screenshares
2122
+ .filter((screenshare) => !screenshare.isLocal)
2123
+ .flatMap((screenshare) => { var _a, _b; return (_b = (_a = screenshare.stream) === null || _a === void 0 ? void 0 : _a.getVideoTracks().map((track) => track.id)) !== null && _b !== void 0 ? _b : []; }), {
2124
+ memoizeOptions: {
2125
+ resultEqualityCheck: (a, b) => a.length === b.length && a.every((trackId, index) => trackId === b[index]),
2126
+ },
2127
+ });
2108
2128
  const selectRemoteClientViews = createSelector(selectLocalScreenshareStream, selectLocalParticipantRaw, selectRemoteParticipants, selectBreakoutCurrentId, selectBreakoutAssignments, (localScreenshareStream, localParticipant, remoteParticipants, breakoutCurrentId, breakoutAssignments) => {
2109
2129
  const views = [];
2110
2130
  if (localScreenshareStream) {
@@ -2317,11 +2337,16 @@ const rtcConnectionSliceInitialState = {
2317
2337
  rtcManagerInitialized: false,
2318
2338
  status: "inactive",
2319
2339
  isAcceptingStreams: false,
2340
+ isAudioOnlyModeEnabled: false,
2320
2341
  };
2321
2342
  const rtcConnectionSlice = createSlice({
2322
2343
  name: "rtcConnection",
2323
2344
  initialState: rtcConnectionSliceInitialState,
2324
2345
  reducers: {
2346
+ audioOnlyModeToggled: (state, action) => {
2347
+ var _a;
2348
+ return Object.assign(Object.assign({}, state), { isAudioOnlyModeEnabled: (_a = action.payload.enabled) !== null && _a !== void 0 ? _a : !state.isAudioOnlyModeEnabled });
2349
+ },
2325
2350
  isAcceptingStreams: (state, action) => {
2326
2351
  return Object.assign(Object.assign({}, state), { isAcceptingStreams: action.payload });
2327
2352
  },
@@ -2339,7 +2364,7 @@ const rtcConnectionSlice = createSlice({
2339
2364
  return Object.assign(Object.assign({}, state), { rtcManager: action.payload, status: "ready" });
2340
2365
  },
2341
2366
  rtcManagerDestroyed: (state) => {
2342
- return Object.assign(Object.assign({}, state), { rtcManager: null });
2367
+ return Object.assign(Object.assign({}, state), { rtcManager: null, rtcManagerInitialized: false });
2343
2368
  },
2344
2369
  rtcManagerInitialized: (state) => {
2345
2370
  return Object.assign(Object.assign({}, state), { rtcManagerInitialized: true });
@@ -2370,7 +2395,7 @@ const rtcConnectionSlice = createSlice({
2370
2395
  });
2371
2396
  },
2372
2397
  });
2373
- const { resolutionReported, rtcDispatcherCreated, rtcDisconnected, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, isAcceptingStreams, rtcClientConnectionStatusChanged, } = rtcConnectionSlice.actions;
2398
+ const { audioOnlyModeToggled, resolutionReported, rtcDispatcherCreated, rtcDisconnected, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, isAcceptingStreams, rtcClientConnectionStatusChanged, } = rtcConnectionSlice.actions;
2374
2399
  const doConnectRtc = createAppThunk(() => (dispatch, getState) => {
2375
2400
  const state = getState();
2376
2401
  const socket = selectSignalConnectionRaw(state).socket;
@@ -2468,8 +2493,19 @@ const doRtcManagerInitialize = createAppThunk(() => (dispatch, getState) => {
2468
2493
  videoPaused: !isCameraEnabled,
2469
2494
  });
2470
2495
  }
2496
+ const screenshareStream = selectLocalScreenshareStream(getState());
2497
+ if (screenshareStream && rtcManager) {
2498
+ rtcManager.addScreenshareStream(screenshareStream);
2499
+ }
2471
2500
  dispatch(rtcManagerInitialized());
2472
2501
  });
2502
+ const doToggleAudioOnlyMode = createAppThunk(({ enabled, autoDisableLocalCamera }) => (dispatch, getState) => {
2503
+ dispatch(audioOnlyModeToggled({ enabled }));
2504
+ const state = getState();
2505
+ if (autoDisableLocalCamera && selectIsAudioOnlyModeEnabled(state) && selectIsCameraEnabled(state)) {
2506
+ dispatch(toggleCameraEnabled({ enabled: false }));
2507
+ }
2508
+ });
2473
2509
  const selectRtcConnectionRaw = (state) => state.rtcConnection;
2474
2510
  const selectRtcManagerInitialized = (state) => state.rtcConnection.rtcManagerInitialized;
2475
2511
  const selectRtcManager = (state) => state.rtcConnection.rtcManager;
@@ -2477,6 +2513,7 @@ const selectRtcDispatcherCreated = (state) => state.rtcConnection.dispatcherCrea
2477
2513
  const selectRtcIsCreatingDispatcher = (state) => state.rtcConnection.isCreatingDispatcher;
2478
2514
  const selectRtcStatus = (state) => state.rtcConnection.status;
2479
2515
  const selectIsAcceptingStreams = (state) => state.rtcConnection.isAcceptingStreams;
2516
+ const selectIsAudioOnlyModeEnabled = (state) => state.rtcConnection.isAudioOnlyModeEnabled;
2480
2517
  startAppListening({
2481
2518
  actionCreator: doSetDevice.fulfilled,
2482
2519
  effect: ({ payload }, { getState }) => {
@@ -2532,6 +2569,22 @@ startAppListening({
2532
2569
  }
2533
2570
  },
2534
2571
  });
2572
+ startAppListening({
2573
+ actionCreator: audioOnlyModeToggled,
2574
+ effect: (_, { getState }) => {
2575
+ const state = getState();
2576
+ const rtcManager = selectRtcManager(state);
2577
+ rtcManager === null || rtcManager === void 0 ? void 0 : rtcManager.setAudioOnly(selectIsAudioOnlyModeEnabled(state));
2578
+ },
2579
+ });
2580
+ startAppListening({
2581
+ actionCreator: rtcManagerCreated,
2582
+ effect: ({ payload: rtcManager }, { getState }) => {
2583
+ if (selectIsAudioOnlyModeEnabled(getState())) {
2584
+ rtcManager.setAudioOnly(true);
2585
+ }
2586
+ },
2587
+ });
2535
2588
  startAppListening({
2536
2589
  actionCreator: rtcEvents.clientConnectionStatusChanged,
2537
2590
  effect: (_, { dispatch, getState }) => {
@@ -2593,6 +2646,9 @@ createReactor([selectShouldDisconnectRtc], ({ dispatch }, shouldDisconnectRtc) =
2593
2646
  dispatch(doDisconnectRtc());
2594
2647
  }
2595
2648
  });
2649
+ createReactor([selectRtcManager, selectRemoteScreenshareVideoTrackIds], (_, rtcManager, remoteScreenshareVideoTrackIds) => {
2650
+ rtcManager === null || rtcManager === void 0 ? void 0 : rtcManager.setRemoteScreenshareVideoTrackIds(remoteScreenshareVideoTrackIds);
2651
+ });
2596
2652
  const selectStreamsToAccept = createSelector(selectRtcStatus, selectRemoteClients, selectBreakoutCurrentId, selectSpotlights, selectAppIgnoreBreakoutGroups, (rtcStatus, remoteParticipants, breakoutCurrentId, spotlights, ignoreBreakoutGroups) => {
2597
2653
  if (rtcStatus !== "ready") {
2598
2654
  return [];
@@ -2665,6 +2721,7 @@ const doStartConnectionMonitor = createAppThunk(() => (dispatch, getState) => {
2665
2721
  return ({
2666
2722
  id: clientView.id,
2667
2723
  clientId: clientView.clientId,
2724
+ isAudioOnlyModeEnabled: clientView.isAudioOnlyModeEnabled,
2668
2725
  isLocalClient: clientView.isLocalClient,
2669
2726
  audio: {
2670
2727
  enabled: clientView.isAudioEnabled,
@@ -3463,6 +3520,386 @@ startAppListening({
3463
3520
  },
3464
3521
  });
3465
3522
 
3523
+ function roomIntegrationContentTagName(integrationName) {
3524
+ return `${integrationName}-integration-contentframe`;
3525
+ }
3526
+
3527
+ function isCustomElementName(value) {
3528
+ return typeof value === "string" && value === value.toLowerCase() && value.includes("-");
3529
+ }
3530
+ function isHttpsUrl(value) {
3531
+ if (typeof value !== "string") {
3532
+ return false;
3533
+ }
3534
+ try {
3535
+ return new URL(value).protocol === "https:";
3536
+ }
3537
+ catch (_a) {
3538
+ return false;
3539
+ }
3540
+ }
3541
+ function isValidProps(value) {
3542
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
3543
+ return false;
3544
+ }
3545
+ return Object.values(value).every((entry) => entry === null || ["string", "number", "boolean"].includes(typeof entry));
3546
+ }
3547
+ function parseMatcher(matcher) {
3548
+ if (typeof matcher !== "string") {
3549
+ return null;
3550
+ }
3551
+ const parts = matcher.match(/^\/([\s\S]*)\/([a-z]*)$/);
3552
+ if (!parts) {
3553
+ return null;
3554
+ }
3555
+ const flags = (parts[2] || "").replace(/[gy]/g, "");
3556
+ try {
3557
+ return new RegExp(parts[1], flags);
3558
+ }
3559
+ catch (_a) {
3560
+ return null;
3561
+ }
3562
+ }
3563
+ function parseRoomIntegration(response) {
3564
+ const { roomIntegrationId, name, title, description, type, icons, link, entrypoint, webview, isEmbeddable } = response || {};
3565
+ const matcher = parseMatcher(response === null || response === void 0 ? void 0 : response.matcher);
3566
+ if (roomIntegrationId === undefined ||
3567
+ roomIntegrationId === null ||
3568
+ !name ||
3569
+ !title ||
3570
+ !type ||
3571
+ !(icons === null || icons === void 0 ? void 0 : icons.small) ||
3572
+ !(icons === null || icons === void 0 ? void 0 : icons.large) ||
3573
+ !entrypoint ||
3574
+ !webview ||
3575
+ !matcher) {
3576
+ console.warn(`Ignoring malformed room integration: ${name || roomIntegrationId}`);
3577
+ return null;
3578
+ }
3579
+ return {
3580
+ roomIntegrationId: String(roomIntegrationId),
3581
+ name,
3582
+ title,
3583
+ description: description || "",
3584
+ type,
3585
+ contentTagName: roomIntegrationContentTagName(name),
3586
+ icons: { small: icons.small, large: icons.large },
3587
+ link: { href: (link === null || link === void 0 ? void 0 : link.href) || "", text: (link === null || link === void 0 ? void 0 : link.text) || "" },
3588
+ entrypoint,
3589
+ webview,
3590
+ matcher,
3591
+ isEmbeddable: isEmbeddable !== null && isEmbeddable !== void 0 ? isEmbeddable : false,
3592
+ };
3593
+ }
3594
+ function parseRoomIntegrationSession(event) {
3595
+ const { roomIntegrationId, roomIntegrationSessionId, breakoutGroupId, tagName, shareUrl, props, clientId, roomIntegrationSessionStartedAt, } = event || {};
3596
+ if (typeof roomIntegrationSessionId !== "string" ||
3597
+ roomIntegrationId === undefined ||
3598
+ roomIntegrationId === null ||
3599
+ typeof clientId !== "string" ||
3600
+ !isCustomElementName(tagName) ||
3601
+ !isHttpsUrl(shareUrl) ||
3602
+ !isValidProps(props)) {
3603
+ console.warn(`Ignoring malformed room integration session: ${roomIntegrationSessionId}`);
3604
+ return null;
3605
+ }
3606
+ return {
3607
+ roomIntegrationSessionId,
3608
+ roomIntegrationId: String(roomIntegrationId),
3609
+ breakoutGroupId: breakoutGroupId || "",
3610
+ tagName,
3611
+ shareUrl,
3612
+ props,
3613
+ clientId,
3614
+ roomIntegrationSessionStartedAt: typeof roomIntegrationSessionStartedAt === "number" && isFinite(roomIntegrationSessionStartedAt)
3615
+ ? roomIntegrationSessionStartedAt
3616
+ : null,
3617
+ };
3618
+ }
3619
+ const SIGNAL_ERROR_MESSAGES = {
3620
+ not_in_a_room: (action) => `Cannot ${action} a room integration: not in a room. The signal connection has a room session, but the server does not consider this client a participant of it.`,
3621
+ forbidden: (action) => `Not allowed to ${action} this room integration (forbidden)`,
3622
+ missing_parameters: (action) => `Could not ${action} the room integration: the request was missing parameters`,
3623
+ invalid_parameters: (action) => `Could not ${action} the room integration: the request had invalid parameters`,
3624
+ internal_server_error: (action) => `The server failed to ${action} the room integration`,
3625
+ };
3626
+ function roomIntegrationSignalError(error, action) {
3627
+ if (!isRoomIntegrationErrorCode(error)) {
3628
+ return { code: "unknown", message: `Could not ${action} the room integration: ${error}` };
3629
+ }
3630
+ return { code: error, message: SIGNAL_ERROR_MESSAGES[error](action) };
3631
+ }
3632
+ const roomIntegrationsSliceInitialState = {
3633
+ available: [],
3634
+ unavailable: [],
3635
+ enabled: [],
3636
+ running: [],
3637
+ isFetching: false,
3638
+ hasFetched: false,
3639
+ error: null,
3640
+ };
3641
+ const roomIntegrationsSlice = createSlice({
3642
+ name: "roomIntegrations",
3643
+ initialState: roomIntegrationsSliceInitialState,
3644
+ reducers: {
3645
+ setRoomIntegrationsError: (state, action) => {
3646
+ state.error = action.payload.error;
3647
+ },
3648
+ },
3649
+ extraReducers: (builder) => {
3650
+ builder.addCase(doFetchRoomIntegrations.pending, (state) => {
3651
+ state.isFetching = true;
3652
+ });
3653
+ builder.addCase(doFetchRoomIntegrations.fulfilled, (state, action) => {
3654
+ const { enabledRoomIntegrations, disabledRoomIntegrations, unavailableRoomIntegrations } = action.payload;
3655
+ const parse = (entries) => entries.map(parseRoomIntegration).filter((entry) => entry !== null);
3656
+ state.isFetching = false;
3657
+ state.hasFetched = true;
3658
+ state.error = null;
3659
+ state.available = [...parse(enabledRoomIntegrations), ...parse(disabledRoomIntegrations)];
3660
+ state.unavailable = parse(unavailableRoomIntegrations);
3661
+ state.enabled = enabledRoomIntegrations.map(({ roomIntegrationId }) => String(roomIntegrationId));
3662
+ });
3663
+ builder.addCase(doFetchRoomIntegrations.rejected, (state, action) => {
3664
+ state.isFetching = false;
3665
+ state.hasFetched = true;
3666
+ state.error = {
3667
+ code: "unknown",
3668
+ message: action.error.message || "Failed to fetch room integrations",
3669
+ };
3670
+ });
3671
+ builder.addCase(signalEvents.roomJoined, (state, action) => {
3672
+ if ("error" in action.payload) {
3673
+ return;
3674
+ }
3675
+ state.running = (action.payload.roomIntegrationSession || [])
3676
+ .map(parseRoomIntegrationSession)
3677
+ .filter((session) => session !== null);
3678
+ });
3679
+ builder.addCase(signalEvents.roomIntegrationStarted, (state, action) => {
3680
+ if ("error" in action.payload) {
3681
+ state.error = roomIntegrationSignalError(action.payload.error, "start");
3682
+ return;
3683
+ }
3684
+ const { roomIntegrationId, roomIntegrationSessionId, breakoutGroupId, roomIntegrationSessionStartedAt } = action.payload;
3685
+ const session = parseRoomIntegrationSession(Object.assign(Object.assign({}, action.payload.state), { roomIntegrationId,
3686
+ roomIntegrationSessionId,
3687
+ breakoutGroupId,
3688
+ roomIntegrationSessionStartedAt }));
3689
+ if (!session) {
3690
+ return;
3691
+ }
3692
+ const existing = state.running.findIndex((running) => running.roomIntegrationSessionId === session.roomIntegrationSessionId);
3693
+ if (existing >= 0) {
3694
+ state.running[existing] = session;
3695
+ return;
3696
+ }
3697
+ state.running.push(session);
3698
+ });
3699
+ builder.addCase(signalEvents.roomIntegrationStopped, (state, action) => {
3700
+ if ("error" in action.payload) {
3701
+ state.error = roomIntegrationSignalError(action.payload.error, "stop");
3702
+ return;
3703
+ }
3704
+ const { roomIntegrationSessionId } = action.payload;
3705
+ state.running = state.running.filter((running) => running.roomIntegrationSessionId !== roomIntegrationSessionId);
3706
+ });
3707
+ builder.addCase(signalEvents.roomIntegrationPropsUpdated, (state, action) => {
3708
+ if ("error" in action.payload) {
3709
+ state.error = roomIntegrationSignalError(action.payload.error, "update the props of");
3710
+ return;
3711
+ }
3712
+ const { roomIntegrationSessionId, props } = action.payload;
3713
+ const session = state.running.find((running) => running.roomIntegrationSessionId === roomIntegrationSessionId);
3714
+ if (!session || !isValidProps(props)) {
3715
+ return;
3716
+ }
3717
+ session.props = Object.assign(Object.assign({}, session.props), props);
3718
+ });
3719
+ builder.addCase(signalEvents.roomIntegrationEnabled, (state, action) => {
3720
+ const roomIntegrationId = String(action.payload.roomIntegrationId);
3721
+ if (!state.enabled.includes(roomIntegrationId)) {
3722
+ state.enabled.push(roomIntegrationId);
3723
+ }
3724
+ });
3725
+ builder.addCase(signalEvents.roomIntegrationDisabled, (state, action) => {
3726
+ const roomIntegrationId = String(action.payload.roomIntegrationId);
3727
+ state.enabled = state.enabled.filter((id) => id !== roomIntegrationId);
3728
+ });
3729
+ },
3730
+ });
3731
+ const { setRoomIntegrationsError } = roomIntegrationsSlice.actions;
3732
+ const doFetchRoomIntegrations = createAppAsyncThunk("roomIntegrations/doFetchRoomIntegrations", (_1, _a) => __awaiter(void 0, [_1, _a], void 0, function* (_, { extra, getState }) {
3733
+ const state = getState();
3734
+ const organizationId = selectOrganizationId(state);
3735
+ const roomName = selectAppRoomName(state);
3736
+ if (!organizationId || !roomName) {
3737
+ throw new Error("Cannot fetch room integrations before the organization and room are known");
3738
+ }
3739
+ return extra.services.roomIntegrationService.findRoomIntegrations({ organizationId, roomName });
3740
+ }));
3741
+ const doStartRoomIntegration = createRoomConnectedThunk((payload) => (dispatch, getState) => {
3742
+ var _a;
3743
+ const state = getState();
3744
+ const { roomIntegrationId, tagName, shareUrl, props = {} } = payload;
3745
+ const integration = selectRoomIntegrationsRaw(state).available.find((entry) => entry.roomIntegrationId === roomIntegrationId);
3746
+ if (!integration) {
3747
+ dispatch(setRoomIntegrationsError({
3748
+ error: {
3749
+ code: "unknown_integration",
3750
+ message: `Unknown room integration: ${roomIntegrationId}`,
3751
+ },
3752
+ }));
3753
+ return;
3754
+ }
3755
+ if (!selectRoomIntegrationsEnabled(state).includes(roomIntegrationId)) {
3756
+ dispatch(setRoomIntegrationsError({
3757
+ error: {
3758
+ code: "integration_not_enabled",
3759
+ message: `Room integration is not enabled for this room: ${integration.name}`,
3760
+ },
3761
+ }));
3762
+ return;
3763
+ }
3764
+ if (!isCustomElementName(tagName)) {
3765
+ dispatch(setRoomIntegrationsError({
3766
+ error: {
3767
+ code: "invalid_content",
3768
+ message: `tagName must be a valid custom element name, got: ${tagName}`,
3769
+ },
3770
+ }));
3771
+ return;
3772
+ }
3773
+ if (!isHttpsUrl(shareUrl)) {
3774
+ dispatch(setRoomIntegrationsError({
3775
+ error: {
3776
+ code: "invalid_content",
3777
+ message: `shareUrl must be an https url, got: ${shareUrl}`,
3778
+ },
3779
+ }));
3780
+ return;
3781
+ }
3782
+ if (!isValidProps(props)) {
3783
+ dispatch(setRoomIntegrationsError({
3784
+ error: {
3785
+ code: "invalid_content",
3786
+ message: "props must be a flat object of primitive values",
3787
+ },
3788
+ }));
3789
+ return;
3790
+ }
3791
+ const clientId = selectSelfId(state);
3792
+ if (!clientId) {
3793
+ return;
3794
+ }
3795
+ dispatch(setRoomIntegrationsError({ error: null }));
3796
+ const request = {
3797
+ roomIntegrationId: Number(roomIntegrationId),
3798
+ breakoutGroupId: selectBreakoutCurrentId(state) || null,
3799
+ state: { tagName, shareUrl, props, clientId },
3800
+ };
3801
+ (_a = selectSignalConnectionRaw(state).socket) === null || _a === void 0 ? void 0 : _a.emit("start_room_integration", request);
3802
+ });
3803
+ const ROOM_INTEGRATION_PICKER_MESSAGES = {
3804
+ FORM_SUBMIT: "whereby:formSubmit",
3805
+ FORM_CLOSE: "whereby:formClose",
3806
+ ERROR: "whereby:bootstrapError",
3807
+ };
3808
+ function roomIntegrationPickerUrl({ integration, parentOrigin, featureSource, }) {
3809
+ const url = new URL("bootstrap.html", integration.webview);
3810
+ url.searchParams.set("parentOrigin", parentOrigin);
3811
+ if (featureSource) {
3812
+ url.searchParams.set("featuresource", featureSource);
3813
+ }
3814
+ return url.href;
3815
+ }
3816
+ const doStopRoomIntegration = createRoomConnectedThunk((payload) => (dispatch, getState) => {
3817
+ var _a;
3818
+ const state = getState();
3819
+ const { roomIntegrationSessionId, intent = "stop" } = payload;
3820
+ const session = selectRunningRoomIntegrations(state).find((running) => running.roomIntegrationSessionId === roomIntegrationSessionId);
3821
+ if (!session) {
3822
+ dispatch(setRoomIntegrationsError({
3823
+ error: {
3824
+ code: "unknown_integration",
3825
+ message: `No running room integration with session id: ${roomIntegrationSessionId}`,
3826
+ },
3827
+ }));
3828
+ return;
3829
+ }
3830
+ if (!session.canStop) {
3831
+ dispatch(setRoomIntegrationsError({
3832
+ error: {
3833
+ code: "not_allowed_to_stop",
3834
+ message: "Only the participant who started a room integration, or a host, can stop it",
3835
+ },
3836
+ }));
3837
+ return;
3838
+ }
3839
+ dispatch(setRoomIntegrationsError({ error: null }));
3840
+ (_a = selectSignalConnectionRaw(state).socket) === null || _a === void 0 ? void 0 : _a.emit("stop_room_integration", { roomIntegrationSessionId, intent });
3841
+ });
3842
+ const doUpdateRoomIntegrationProps = createRoomConnectedThunk((payload) => (dispatch, getState) => {
3843
+ var _a;
3844
+ const state = getState();
3845
+ const { roomIntegrationSessionId, props } = payload;
3846
+ if (!isValidProps(props)) {
3847
+ dispatch(setRoomIntegrationsError({
3848
+ error: {
3849
+ code: "invalid_content",
3850
+ message: "props must be a flat object of primitive values",
3851
+ },
3852
+ }));
3853
+ return;
3854
+ }
3855
+ (_a = selectSignalConnectionRaw(state).socket) === null || _a === void 0 ? void 0 : _a.emit("update_room_integration_props", {
3856
+ roomIntegrationSessionId,
3857
+ props,
3858
+ });
3859
+ });
3860
+ const selectRoomIntegrationsRaw = (state) => state.roomIntegrations;
3861
+ const selectRoomIntegrationsError = (state) => state.roomIntegrations.error;
3862
+ const selectRoomIntegrationsIsFetching = (state) => state.roomIntegrations.isFetching;
3863
+ const selectRoomIntegrationsHasFetched = (state) => state.roomIntegrations.hasFetched;
3864
+ const selectRoomIntegrationsEnabled = (state) => state.roomIntegrations.enabled;
3865
+ const selectAvailableRoomIntegrations = (state) => state.roomIntegrations.available;
3866
+ const selectUnavailableRoomIntegrations = (state) => state.roomIntegrations.unavailable;
3867
+ const selectEnabledRoomIntegrations = createSelector(selectAvailableRoomIntegrations, selectRoomIntegrationsEnabled, (available, enabled) => available.filter((integration) => enabled.includes(integration.roomIntegrationId)));
3868
+ const selectEmbeddableRoomIntegrations = createSelector(selectEnabledRoomIntegrations, (enabled) => enabled.filter((integration) => integration.isEmbeddable));
3869
+ const selectRunningRoomIntegrations = createSelector(selectRoomIntegrationsRaw, selectEnabledRoomIntegrations, selectBreakoutActive, selectBreakoutCurrentId, selectSelfId, selectRemoteParticipants, selectIsAuthorizedToManageRoomIntegration, (raw, enabledIntegrations, breakoutActive, breakoutCurrentId, selfId, remoteParticipants, canManageRoomIntegration) => {
3870
+ const currentGroupId = breakoutActive ? breakoutCurrentId : "";
3871
+ return raw.running.reduce((acc, session) => {
3872
+ var _a;
3873
+ if (session.breakoutGroupId !== currentGroupId) {
3874
+ return acc;
3875
+ }
3876
+ const integration = enabledIntegrations.find((entry) => entry.roomIntegrationId === session.roomIntegrationId);
3877
+ if (!integration) {
3878
+ return acc;
3879
+ }
3880
+ const isPresenter = !!selfId && session.clientId === selfId;
3881
+ acc.push(Object.assign(Object.assign({}, session), { integration,
3882
+ isPresenter, canStop: isPresenter || canManageRoomIntegration, presenterDisplayName: isPresenter
3883
+ ? null
3884
+ : ((_a = remoteParticipants.find((participant) => participant.id === session.clientId)) === null || _a === void 0 ? void 0 : _a.displayName) ||
3885
+ null }));
3886
+ return acc;
3887
+ }, []);
3888
+ });
3889
+ const selectIsRoomIntegrationRunning = createSelector(selectRunningRoomIntegrations, (running) => running.length > 0);
3890
+ const selectRoomIntegrationForUrl = createSelector(selectEmbeddableRoomIntegrations, (integrations) => (url) => integrations.find((integration) => integration.matcher.test(url)) || null);
3891
+ const selectShouldFetchRoomIntegrations = createSelector(selectAppIsActive, selectRoomConnectionStatus, selectOrganizationId, selectAppRoomName, selectRoomIntegrationsRaw, (appIsActive, connectionStatus, organizationId, roomName, raw) => appIsActive &&
3892
+ connectionStatus === "connected" &&
3893
+ !!organizationId &&
3894
+ !!roomName &&
3895
+ !raw.hasFetched &&
3896
+ !raw.isFetching);
3897
+ createReactor([selectShouldFetchRoomIntegrations], ({ dispatch }, shouldFetchRoomIntegrations) => {
3898
+ if (shouldFetchRoomIntegrations) {
3899
+ dispatch(doFetchRoomIntegrations());
3900
+ }
3901
+ });
3902
+
3466
3903
  function createRtcAnalyticsCustomEvent(parameters) {
3467
3904
  return parameters;
3468
3905
  }
@@ -4075,6 +4512,7 @@ const appReducer = combineReducers({
4075
4512
  remoteParticipants: remoteParticipantsSlice.reducer,
4076
4513
  room: roomSlice.reducer,
4077
4514
  roomConnection: roomConnectionSlice.reducer,
4515
+ roomIntegrations: roomIntegrationsSlice.reducer,
4078
4516
  rtcAnalytics: rtcAnalyticsSlice.reducer,
4079
4517
  rtcConnection: rtcConnectionSlice.reducer,
4080
4518
  signalConnection: signalConnectionSlice.reducer,
@@ -4815,6 +5253,40 @@ class OrganizationServiceCache {
4815
5253
  }
4816
5254
  }
4817
5255
 
5256
+ function roomPath(organizationId, roomName, suffix = "") {
5257
+ const encodedRoomName = encodeURIComponent(roomName.replace(/^\//, ""));
5258
+ return `/organizations/${encodeURIComponent(organizationId)}/room/${encodedRoomName}${suffix}`;
5259
+ }
5260
+ function asArray(value) {
5261
+ return Array.isArray(value) ? value : [];
5262
+ }
5263
+ class RoomIntegrationService {
5264
+ constructor({ apiClient }) {
5265
+ this._apiClient = apiClient;
5266
+ }
5267
+ findRoomIntegrations(_a) {
5268
+ return __awaiter(this, arguments, void 0, function* ({ organizationId, roomName, }) {
5269
+ const response = yield this._apiClient.request(roomPath(organizationId, roomName, "/room-integrations"), {
5270
+ method: "GET",
5271
+ });
5272
+ const data = (response.data || {});
5273
+ return {
5274
+ enabledRoomIntegrations: asArray(data.enabledRoomIntegrations),
5275
+ disabledRoomIntegrations: asArray(data.disabledRoomIntegrations),
5276
+ unavailableRoomIntegrations: asArray(data.unavailableRoomIntegrations),
5277
+ };
5278
+ });
5279
+ }
5280
+ toggleRoomIntegration(_a) {
5281
+ return __awaiter(this, arguments, void 0, function* ({ organizationId, roomName, roomIntegrationId, enable, }) {
5282
+ yield this._apiClient.request(roomPath(organizationId, roomName, `/room-integrations/${roomIntegrationId}`), {
5283
+ method: "PUT",
5284
+ data: { enable },
5285
+ });
5286
+ });
5287
+ }
5288
+ }
5289
+
4818
5290
  const API_BASE_URL = "https://api.whereby.dev";
4819
5291
  function createServices() {
4820
5292
  const credentialsService = CredentialsService.create({
@@ -4825,6 +5297,7 @@ function createServices() {
4825
5297
  baseUrl: API_BASE_URL,
4826
5298
  });
4827
5299
  const organizationService = new OrganizationService({ apiClient });
5300
+ const roomIntegrationService = new RoomIntegrationService({ apiClient });
4828
5301
  const fetchOrganizationFromRoomUrl = (roomUrl) => {
4829
5302
  const roomUrlObj = new URL(roomUrl);
4830
5303
  const urls = fromLocation({ host: roomUrlObj.host });
@@ -4838,8 +5311,9 @@ function createServices() {
4838
5311
  credentialsService,
4839
5312
  apiClient,
4840
5313
  organizationService,
5314
+ roomIntegrationService,
4841
5315
  fetchOrganizationFromRoomUrl,
4842
5316
  };
4843
5317
  }
4844
5318
 
4845
- 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, doRequestScreenshareEnable, 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, selectAppInitialMuteStates, 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, selectIsAuthorizedToRequestScreenshareEnable, 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, selectLocalParticipantRaw, selectLocalParticipantStickyReaction, selectLocalParticipantView, selectLocalScreenshareError, selectLocalScreenshareRaw, selectLocalScreenshareStartedAt, 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, selectShouldApplyInitialMuteStates, 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 };
5319
+ export { ACCEPTED_FILE_TYPES, BREAKOUT_GROUPS_MIN_MAX, BREAKOUT_UNAVAILABLE_ERROR, DEFAULT_BREAKOUT_TIMER_DURATION, MAX_FILES_PER_UPLOAD, MAX_FILE_SIZE, ROOM_INTEGRATION_PICKER_MESSAGES, addAppListener, addSpotlight, appSlice, audioOnlyModeToggled, 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, doFetchRoomIntegrations, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doHoldWaitingParticipant, doKickParticipant, doKnockRoom, doLocalStreamEffect, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRemoveChatMessage, doRemoveSpotlight, doRequestAudioEnable, doRequestScreenshareEnable, doRequestVideoEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSendClientMetadata, doSendFiles, doSetDevice, doSetDisplayName, doSetLocalStickyReaction, doSetNotification, doShuffleBreakoutParticipants, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doSpotlightParticipant, doStartBreakoutSession, doStartCloudRecording, doStartConnectionMonitor, doStartLiveCaptions, doStartLiveTranscription, doStartLocalMedia, doStartRoomIntegration, doStartScreenshare, doStopBreakoutSession, doStopBreakoutTimer, doStopCloudRecording, doStopConnectionMonitor, doStopLiveCaptions, doStopLiveTranscription, doStopLocalMedia, doStopRoomIntegration, doStopScreenshare, doSwitchLocalStream, doToggleAudioOnlyMode, doToggleCamera, doTriggerLocalStreamRefresh, doUnassignAllBreakoutParticipants, doUpdateBreakoutSession, doUpdateDeviceList, doUpdateRoomIntegrationProps, 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, parseRoomIntegration, parseRoomIntegrationSession, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, remoteParticipantsSliceInitialState, removeSpotlight, resolutionReported, roomConnectionSlice, roomConnectionSliceInitialState, roomIntegrationPickerUrl, roomIntegrationSignalError, roomIntegrationsSlice, roomIntegrationsSliceInitialState, roomSlice, roomSliceInitialState, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcAnalyticsSliceInitialState, rtcClientConnectionStatusChanged, rtcConnectionSlice, rtcConnectionSliceInitialState, rtcDisconnected, rtcDispatcherCreated, rtcEvents, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAllClientViews, selectAllClientViewsInCurrentGroup, selectAppDisplayName, selectAppExternalId, selectAppIgnoreBreakoutGroups, selectAppInitialConfig, selectAppInitialMuteStates, selectAppIsActive, selectAppIsAssistant, selectAppIsAudioRecorder, selectAppIsDialIn, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAssistantKey, selectAuthorizationRoleName, selectAvailableRoomIntegrations, 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, selectEmbeddableRoomIntegrations, selectEnabledRoomIntegrations, selectFileShareRaw, selectFileShareRequestInFlight, selectFileUploads, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAudioOnlyModeEnabled, selectIsAuthorizedToAskToSpeak, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToManageBreakout, selectIsAuthorizedToManageRoomIntegration, selectIsAuthorizedToRequestAudioEnable, selectIsAuthorizedToRequestScreenshareEnable, selectIsAuthorizedToRequestVideoEnable, selectIsAuthorizedToSpotlight, selectIsCameraEnabled, selectIsCloudRecording, selectIsHDModeEnabled, selectIsLiveCaptions, selectIsLiveTranscription, selectIsLocalMediaStarting, selectIsLocalParticipantSpotlighted, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsRoomIntegrationRunning, 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, selectLocalParticipantRaw, selectLocalParticipantStickyReaction, selectLocalParticipantView, selectLocalScreenshareError, selectLocalScreenshareRaw, selectLocalScreenshareStartedAt, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectNotificationsEmitter, selectNotificationsEvents, selectNotificationsRaw, selectNumClients, selectNumParticipants, selectOrganizationId, selectOrganizationPreferences, selectOrganizationRaw, selectRemoteClientViews, selectRemoteClients, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRemoteScreenshareVideoTrackIds, selectRoomConnectionError, selectRoomConnectionKnockResponse, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIntegrationForUrl, selectRoomIntegrationsEnabled, selectRoomIntegrationsError, selectRoomIntegrationsHasFetched, selectRoomIntegrationsIsFetching, selectRoomIntegrationsRaw, selectRoomIsLocked, selectRoomKey, selectRoomMode, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectRunningRoomIntegrations, selectScreenshares, selectSelfId, selectShouldApplyInitialMuteStates, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldFetchRoomIntegrations, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldStartConnectionMonitor, selectShouldStopConnectionMonitor, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectSpotlightedClientViews, selectSpotlights, selectSpotlightsRaw, selectStopCallbackFunction, selectStreamingRaw, selectStreamsToAccept, selectUnavailableRoomIntegrations, selectWaitingParticipants, selectWaitingParticipantsRaw, setBreakoutError, setBreakoutGroupAssigned, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, setDisplayName, setLocalMediaOptions, setLocalMediaStream, setRoomIntegrationsError, 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 };