@whereby.com/core 1.16.2 → 1.17.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 CHANGED
@@ -1226,7 +1226,7 @@ const createReactor = (selectors, callback) => {
1226
1226
  });
1227
1227
  };
1228
1228
 
1229
- const coreVersion = "1.16.2";
1229
+ const coreVersion = "1.17.0";
1230
1230
 
1231
1231
  function decodeRoomName(roomName) {
1232
1232
  if (!roomName) {
@@ -2401,6 +2401,7 @@ const selectCloudRecordingIsInitiator = (state) => state.cloudRecording.isInitia
2401
2401
  const selectRoomConnectionSessionId = (state) => { var _a; return (_a = state.roomConnection.session) === null || _a === void 0 ? void 0 : _a.id; };
2402
2402
  const selectRoomConnectionStatus = (state) => state.roomConnection.status;
2403
2403
  const selectRoomConnectionError = (state) => state.roomConnection.error;
2404
+ const selectRoomConnectionKnockResponse = (state) => state.roomConnection.knockResponse;
2404
2405
 
2405
2406
  function createRtcEventAction(name) {
2406
2407
  return toolkit.createAction(`rtcConnection/event/${name}`);
@@ -4082,6 +4083,7 @@ const roomConnectionSliceInitialState = {
4082
4083
  session: null,
4083
4084
  status: "ready",
4084
4085
  error: null,
4086
+ knockResponse: null,
4085
4087
  };
4086
4088
  const roomConnectionSlice = toolkit.createSlice({
4087
4089
  name: "roomConnection",
@@ -4090,6 +4092,9 @@ const roomConnectionSlice = toolkit.createSlice({
4090
4092
  connectionStatusChanged: (state, action) => {
4091
4093
  return Object.assign(Object.assign({}, state), { status: action.payload });
4092
4094
  },
4095
+ knockResponseReceived: (state, action) => {
4096
+ return Object.assign(Object.assign({}, state), { knockResponse: action.payload });
4097
+ },
4093
4098
  },
4094
4099
  extraReducers: (builder) => {
4095
4100
  builder.addCase(signalEvents.roomJoined, (state, action) => {
@@ -4131,7 +4136,7 @@ const roomConnectionSlice = toolkit.createSlice({
4131
4136
  });
4132
4137
  },
4133
4138
  });
4134
- const { connectionStatusChanged } = roomConnectionSlice.actions;
4139
+ const { connectionStatusChanged, knockResponseReceived } = roomConnectionSlice.actions;
4135
4140
  const doKnockRoom = createAppThunk(() => (dispatch, getState) => {
4136
4141
  const state = getState();
4137
4142
  const socket = selectSignalConnectionRaw(state).socket;
@@ -4224,6 +4229,7 @@ createReactor([selectShouldConnectRoom], ({ dispatch }, shouldConnectRoom) => {
4224
4229
  startAppListening({
4225
4230
  actionCreator: signalEvents.knockHandled,
4226
4231
  effect: ({ payload }, { dispatch, getState }) => {
4232
+ var _a, _b;
4227
4233
  const { clientId, resolution } = payload;
4228
4234
  const state = getState();
4229
4235
  const selfId = selectSelfId(state);
@@ -4234,11 +4240,22 @@ startAppListening({
4234
4240
  dispatch(setRoomKey(payload.metadata.roomKey));
4235
4241
  dispatch(doConnectRoom());
4236
4242
  }
4243
+ else if (resolution === "on_hold") {
4244
+ dispatch(knockResponseReceived((_a = payload.knockResponse) !== null && _a !== void 0 ? _a : null));
4245
+ dispatch(connectionStatusChanged("knock_on_hold"));
4246
+ }
4237
4247
  else if (resolution === "rejected") {
4248
+ dispatch(knockResponseReceived((_b = payload.knockResponse) !== null && _b !== void 0 ? _b : null));
4238
4249
  dispatch(connectionStatusChanged("knock_rejected"));
4239
4250
  }
4240
4251
  },
4241
4252
  });
4253
+ startAppListening({
4254
+ actionCreator: signalEvents.clientKicked,
4255
+ effect: (_, { dispatch }) => {
4256
+ dispatch(doAppStop());
4257
+ },
4258
+ });
4242
4259
  startAppListening({
4243
4260
  actionCreator: doAppStop,
4244
4261
  effect: (_, { dispatch, getState }) => {
@@ -4507,17 +4524,33 @@ const doAcceptWaitingParticipant = createRoomConnectedThunk((payload) => (dispat
4507
4524
  socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
4508
4525
  action: "accept",
4509
4526
  clientId: participantId,
4510
- response: {},
4527
+ knockResponse: {},
4528
+ });
4529
+ });
4530
+ const doHoldWaitingParticipant = createRoomConnectedThunk((payload) => (dispatch, getState) => {
4531
+ const { participantId, response } = payload;
4532
+ const state = getState();
4533
+ const socket = selectSignalConnectionSocket(state);
4534
+ const message = response === null || response === void 0 ? void 0 : response.trim();
4535
+ const knockResponse = message
4536
+ ? { message, sender: { displayName: selectLocalParticipantDisplayName(state) } }
4537
+ : {};
4538
+ socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
4539
+ action: "hold",
4540
+ clientId: participantId,
4541
+ knockResponse,
4511
4542
  });
4512
4543
  });
4513
4544
  const doRejectWaitingParticipant = createRoomConnectedThunk((payload) => (dispatch, getState) => {
4514
- const { participantId } = payload;
4545
+ const { participantId, response } = payload;
4515
4546
  const state = getState();
4516
4547
  const socket = selectSignalConnectionSocket(state);
4548
+ const message = response === null || response === void 0 ? void 0 : response.trim();
4549
+ const knockResponse = message ? { message, sender: {} } : {};
4517
4550
  socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
4518
4551
  action: "reject",
4519
4552
  clientId: participantId,
4520
- response: {},
4553
+ knockResponse,
4521
4554
  });
4522
4555
  });
4523
4556
  const selectWaitingParticipants = (state) => state.waitingParticipants.waitingParticipants;
@@ -5210,7 +5243,7 @@ const SPOTLIGHT_PARTICIPANT_REMOVED = "spotlight:participant-removed";
5210
5243
  const ROOM_JOINED = "room:joined";
5211
5244
  const ROOM_JOINED_ERROR = "room:joined:error";
5212
5245
 
5213
- const selectRoomConnectionState = toolkit.createSelector(selectChatMessages, selectFileUploads, selectCloudRecordingRaw, selectBreakoutCurrentGroup, selectBreakoutActive, selectBreakoutGroupedParticipants, selectAllClientViewsInCurrentGroup, selectLiveCaptionsRaw, selectLiveTranscriptionRaw, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectRoomConnectionError, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, selectIsCameraEnabled, selectIsMicrophoneEnabled, (chatMessages, fileUploads, cloudRecording, breakoutCurrentGroup, breakoutActive, breakoutGroupedParticipants, clientViewsInCurrentGroup, liveCaptions, liveTranscription, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, connectionError, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews, isCameraEnabled, isMicrophoneEnabled) => {
5246
+ const selectRoomConnectionState = toolkit.createSelector(selectChatMessages, selectFileUploads, selectCloudRecordingRaw, selectBreakoutCurrentGroup, selectBreakoutActive, selectBreakoutGroupedParticipants, selectAllClientViewsInCurrentGroup, selectLiveCaptionsRaw, selectLiveTranscriptionRaw, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectRoomConnectionError, selectRoomConnectionKnockResponse, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, selectIsCameraEnabled, selectIsMicrophoneEnabled, (chatMessages, fileUploads, cloudRecording, breakoutCurrentGroup, breakoutActive, breakoutGroupedParticipants, clientViewsInCurrentGroup, liveCaptions, liveTranscription, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, connectionError, knockResponse, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews, isCameraEnabled, isMicrophoneEnabled) => {
5214
5247
  const state = {
5215
5248
  chatMessages,
5216
5249
  fileUploads,
@@ -5229,6 +5262,7 @@ const selectRoomConnectionState = toolkit.createSelector(selectChatMessages, sel
5229
5262
  },
5230
5263
  connectionStatus,
5231
5264
  connectionError,
5265
+ knockResponse,
5232
5266
  events: notificationsEmitter,
5233
5267
  isCameraEnabled,
5234
5268
  isMicrophoneEnabled,
@@ -5573,8 +5607,11 @@ class RoomConnectionClient extends BaseClient {
5573
5607
  acceptWaitingParticipant(participantId) {
5574
5608
  this.store.dispatch(doAcceptWaitingParticipant({ participantId }));
5575
5609
  }
5576
- rejectWaitingParticipant(participantId) {
5577
- this.store.dispatch(doRejectWaitingParticipant({ participantId }));
5610
+ holdWaitingParticipant(participantId, response) {
5611
+ this.store.dispatch(doHoldWaitingParticipant({ participantId, response }));
5612
+ }
5613
+ rejectWaitingParticipant(participantId, response) {
5614
+ this.store.dispatch(doRejectWaitingParticipant({ participantId, response }));
5578
5615
  }
5579
5616
  startCloudRecording() {
5580
5617
  this.store.dispatch(doStartCloudRecording());
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
2
  import { EventEmitter } from 'events';
3
- import { LiveCaptionEvent, RoleName, ChatMessage as ChatMessage$2, ChatFileShare, FileShareErrorCode, BreakoutConfig, RtcManager, RtcManagerDispatcher, ServerSocket, RoomJoinedErrors, RoomJoinedSuccess } from '@whereby.com/media';
4
- export { ChatFileShare, RoomJoinedSuccess } from '@whereby.com/media';
3
+ import { LiveCaptionEvent, RoleName, ChatMessage as ChatMessage$2, ChatFileShare, FileShareErrorCode, BreakoutConfig, KnockResponse, RtcManager, RtcManagerDispatcher, ServerSocket, RoomJoinedErrors, RoomJoinedSuccess } from '@whereby.com/media';
4
+ export { ChatFileShare, KnockResponse, KnockResponseSender, RoomJoinedSuccess } from '@whereby.com/media';
5
5
  import * as redux_thunk from 'redux-thunk';
6
6
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
7
7
  import * as redux from 'redux';
@@ -781,7 +781,7 @@ interface AppState {
781
781
  userAgent: string | null;
782
782
  }
783
783
 
784
- type ConnectionStatus = "ready" | "connecting" | "connected" | "room_locked" | "knocking" | "knock_rejected" | "kicked" | "leaving" | "left" | "disconnected" | "reconnecting";
784
+ type ConnectionStatus = "ready" | "connecting" | "connected" | "room_locked" | "knocking" | "knock_on_hold" | "knock_rejected" | "kicked" | "leaving" | "left" | "disconnected" | "reconnecting";
785
785
  interface RoomConnectionState$1 {
786
786
  session: {
787
787
  createdAt: string;
@@ -789,6 +789,7 @@ interface RoomConnectionState$1 {
789
789
  } | null;
790
790
  status: ConnectionStatus;
791
791
  error: string | null;
792
+ knockResponse: KnockResponse | null;
792
793
  }
793
794
 
794
795
  interface StreamResolutionUpdate {
@@ -1172,6 +1173,7 @@ type BreakoutState = {
1172
1173
  interface RoomConnectionState {
1173
1174
  connectionStatus: ConnectionStatus;
1174
1175
  connectionError: string | null;
1176
+ knockResponse: KnockResponse | null;
1175
1177
  chatMessages: ChatMessage[];
1176
1178
  fileUploads: FileUpload[];
1177
1179
  cloudRecording?: CloudRecordingState;
@@ -1304,7 +1306,8 @@ declare class RoomConnectionClient extends BaseClient<RoomConnectionState, RoomC
1304
1306
  askToSpeak(participantId: string): void;
1305
1307
  askToTurnOnCamera(participantId: string): void;
1306
1308
  acceptWaitingParticipant(participantId: string): void;
1307
- rejectWaitingParticipant(participantId: string): void;
1309
+ holdWaitingParticipant(participantId: string, response?: string): void;
1310
+ rejectWaitingParticipant(participantId: string, response?: string): void;
1308
1311
  startCloudRecording(): void;
1309
1312
  stopCloudRecording(): void;
1310
1313
  startLiveTranscription(): void;
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
2
  import { EventEmitter } from 'events';
3
- import { LiveCaptionEvent, RoleName, ChatMessage as ChatMessage$2, ChatFileShare, FileShareErrorCode, BreakoutConfig, RtcManager, RtcManagerDispatcher, ServerSocket, RoomJoinedErrors, RoomJoinedSuccess } from '@whereby.com/media';
4
- export { ChatFileShare, RoomJoinedSuccess } from '@whereby.com/media';
3
+ import { LiveCaptionEvent, RoleName, ChatMessage as ChatMessage$2, ChatFileShare, FileShareErrorCode, BreakoutConfig, KnockResponse, RtcManager, RtcManagerDispatcher, ServerSocket, RoomJoinedErrors, RoomJoinedSuccess } from '@whereby.com/media';
4
+ export { ChatFileShare, KnockResponse, KnockResponseSender, RoomJoinedSuccess } from '@whereby.com/media';
5
5
  import * as redux_thunk from 'redux-thunk';
6
6
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
7
7
  import * as redux from 'redux';
@@ -781,7 +781,7 @@ interface AppState {
781
781
  userAgent: string | null;
782
782
  }
783
783
 
784
- type ConnectionStatus = "ready" | "connecting" | "connected" | "room_locked" | "knocking" | "knock_rejected" | "kicked" | "leaving" | "left" | "disconnected" | "reconnecting";
784
+ type ConnectionStatus = "ready" | "connecting" | "connected" | "room_locked" | "knocking" | "knock_on_hold" | "knock_rejected" | "kicked" | "leaving" | "left" | "disconnected" | "reconnecting";
785
785
  interface RoomConnectionState$1 {
786
786
  session: {
787
787
  createdAt: string;
@@ -789,6 +789,7 @@ interface RoomConnectionState$1 {
789
789
  } | null;
790
790
  status: ConnectionStatus;
791
791
  error: string | null;
792
+ knockResponse: KnockResponse | null;
792
793
  }
793
794
 
794
795
  interface StreamResolutionUpdate {
@@ -1172,6 +1173,7 @@ type BreakoutState = {
1172
1173
  interface RoomConnectionState {
1173
1174
  connectionStatus: ConnectionStatus;
1174
1175
  connectionError: string | null;
1176
+ knockResponse: KnockResponse | null;
1175
1177
  chatMessages: ChatMessage[];
1176
1178
  fileUploads: FileUpload[];
1177
1179
  cloudRecording?: CloudRecordingState;
@@ -1304,7 +1306,8 @@ declare class RoomConnectionClient extends BaseClient<RoomConnectionState, RoomC
1304
1306
  askToSpeak(participantId: string): void;
1305
1307
  askToTurnOnCamera(participantId: string): void;
1306
1308
  acceptWaitingParticipant(participantId: string): void;
1307
- rejectWaitingParticipant(participantId: string): void;
1309
+ holdWaitingParticipant(participantId: string, response?: string): void;
1310
+ rejectWaitingParticipant(participantId: string, response?: string): void;
1308
1311
  startCloudRecording(): void;
1309
1312
  stopCloudRecording(): void;
1310
1313
  startLiveTranscription(): void;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
2
  import { EventEmitter } from 'events';
3
- import { LiveCaptionEvent, RoleName, ChatMessage as ChatMessage$2, ChatFileShare, FileShareErrorCode, BreakoutConfig, RtcManager, RtcManagerDispatcher, ServerSocket, RoomJoinedErrors, RoomJoinedSuccess } from '@whereby.com/media';
4
- export { ChatFileShare, RoomJoinedSuccess } from '@whereby.com/media';
3
+ import { LiveCaptionEvent, RoleName, ChatMessage as ChatMessage$2, ChatFileShare, FileShareErrorCode, BreakoutConfig, KnockResponse, RtcManager, RtcManagerDispatcher, ServerSocket, RoomJoinedErrors, RoomJoinedSuccess } from '@whereby.com/media';
4
+ export { ChatFileShare, KnockResponse, KnockResponseSender, RoomJoinedSuccess } from '@whereby.com/media';
5
5
  import * as redux_thunk from 'redux-thunk';
6
6
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
7
7
  import * as redux from 'redux';
@@ -781,7 +781,7 @@ interface AppState {
781
781
  userAgent: string | null;
782
782
  }
783
783
 
784
- type ConnectionStatus = "ready" | "connecting" | "connected" | "room_locked" | "knocking" | "knock_rejected" | "kicked" | "leaving" | "left" | "disconnected" | "reconnecting";
784
+ type ConnectionStatus = "ready" | "connecting" | "connected" | "room_locked" | "knocking" | "knock_on_hold" | "knock_rejected" | "kicked" | "leaving" | "left" | "disconnected" | "reconnecting";
785
785
  interface RoomConnectionState$1 {
786
786
  session: {
787
787
  createdAt: string;
@@ -789,6 +789,7 @@ interface RoomConnectionState$1 {
789
789
  } | null;
790
790
  status: ConnectionStatus;
791
791
  error: string | null;
792
+ knockResponse: KnockResponse | null;
792
793
  }
793
794
 
794
795
  interface StreamResolutionUpdate {
@@ -1172,6 +1173,7 @@ type BreakoutState = {
1172
1173
  interface RoomConnectionState {
1173
1174
  connectionStatus: ConnectionStatus;
1174
1175
  connectionError: string | null;
1176
+ knockResponse: KnockResponse | null;
1175
1177
  chatMessages: ChatMessage[];
1176
1178
  fileUploads: FileUpload[];
1177
1179
  cloudRecording?: CloudRecordingState;
@@ -1304,7 +1306,8 @@ declare class RoomConnectionClient extends BaseClient<RoomConnectionState, RoomC
1304
1306
  askToSpeak(participantId: string): void;
1305
1307
  askToTurnOnCamera(participantId: string): void;
1306
1308
  acceptWaitingParticipant(participantId: string): void;
1307
- rejectWaitingParticipant(participantId: string): void;
1309
+ holdWaitingParticipant(participantId: string, response?: string): void;
1310
+ rejectWaitingParticipant(participantId: string, response?: string): void;
1308
1311
  startCloudRecording(): void;
1309
1312
  stopCloudRecording(): void;
1310
1313
  startLiveTranscription(): void;
package/dist/index.mjs CHANGED
@@ -1224,7 +1224,7 @@ const createReactor = (selectors, callback) => {
1224
1224
  });
1225
1225
  };
1226
1226
 
1227
- const coreVersion = "1.16.2";
1227
+ const coreVersion = "1.17.0";
1228
1228
 
1229
1229
  function decodeRoomName(roomName) {
1230
1230
  if (!roomName) {
@@ -2399,6 +2399,7 @@ const selectCloudRecordingIsInitiator = (state) => state.cloudRecording.isInitia
2399
2399
  const selectRoomConnectionSessionId = (state) => { var _a; return (_a = state.roomConnection.session) === null || _a === void 0 ? void 0 : _a.id; };
2400
2400
  const selectRoomConnectionStatus = (state) => state.roomConnection.status;
2401
2401
  const selectRoomConnectionError = (state) => state.roomConnection.error;
2402
+ const selectRoomConnectionKnockResponse = (state) => state.roomConnection.knockResponse;
2402
2403
 
2403
2404
  function createRtcEventAction(name) {
2404
2405
  return createAction(`rtcConnection/event/${name}`);
@@ -4080,6 +4081,7 @@ const roomConnectionSliceInitialState = {
4080
4081
  session: null,
4081
4082
  status: "ready",
4082
4083
  error: null,
4084
+ knockResponse: null,
4083
4085
  };
4084
4086
  const roomConnectionSlice = createSlice({
4085
4087
  name: "roomConnection",
@@ -4088,6 +4090,9 @@ const roomConnectionSlice = createSlice({
4088
4090
  connectionStatusChanged: (state, action) => {
4089
4091
  return Object.assign(Object.assign({}, state), { status: action.payload });
4090
4092
  },
4093
+ knockResponseReceived: (state, action) => {
4094
+ return Object.assign(Object.assign({}, state), { knockResponse: action.payload });
4095
+ },
4091
4096
  },
4092
4097
  extraReducers: (builder) => {
4093
4098
  builder.addCase(signalEvents.roomJoined, (state, action) => {
@@ -4129,7 +4134,7 @@ const roomConnectionSlice = createSlice({
4129
4134
  });
4130
4135
  },
4131
4136
  });
4132
- const { connectionStatusChanged } = roomConnectionSlice.actions;
4137
+ const { connectionStatusChanged, knockResponseReceived } = roomConnectionSlice.actions;
4133
4138
  const doKnockRoom = createAppThunk(() => (dispatch, getState) => {
4134
4139
  const state = getState();
4135
4140
  const socket = selectSignalConnectionRaw(state).socket;
@@ -4222,6 +4227,7 @@ createReactor([selectShouldConnectRoom], ({ dispatch }, shouldConnectRoom) => {
4222
4227
  startAppListening({
4223
4228
  actionCreator: signalEvents.knockHandled,
4224
4229
  effect: ({ payload }, { dispatch, getState }) => {
4230
+ var _a, _b;
4225
4231
  const { clientId, resolution } = payload;
4226
4232
  const state = getState();
4227
4233
  const selfId = selectSelfId(state);
@@ -4232,11 +4238,22 @@ startAppListening({
4232
4238
  dispatch(setRoomKey(payload.metadata.roomKey));
4233
4239
  dispatch(doConnectRoom());
4234
4240
  }
4241
+ else if (resolution === "on_hold") {
4242
+ dispatch(knockResponseReceived((_a = payload.knockResponse) !== null && _a !== void 0 ? _a : null));
4243
+ dispatch(connectionStatusChanged("knock_on_hold"));
4244
+ }
4235
4245
  else if (resolution === "rejected") {
4246
+ dispatch(knockResponseReceived((_b = payload.knockResponse) !== null && _b !== void 0 ? _b : null));
4236
4247
  dispatch(connectionStatusChanged("knock_rejected"));
4237
4248
  }
4238
4249
  },
4239
4250
  });
4251
+ startAppListening({
4252
+ actionCreator: signalEvents.clientKicked,
4253
+ effect: (_, { dispatch }) => {
4254
+ dispatch(doAppStop());
4255
+ },
4256
+ });
4240
4257
  startAppListening({
4241
4258
  actionCreator: doAppStop,
4242
4259
  effect: (_, { dispatch, getState }) => {
@@ -4505,17 +4522,33 @@ const doAcceptWaitingParticipant = createRoomConnectedThunk((payload) => (dispat
4505
4522
  socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
4506
4523
  action: "accept",
4507
4524
  clientId: participantId,
4508
- response: {},
4525
+ knockResponse: {},
4526
+ });
4527
+ });
4528
+ const doHoldWaitingParticipant = createRoomConnectedThunk((payload) => (dispatch, getState) => {
4529
+ const { participantId, response } = payload;
4530
+ const state = getState();
4531
+ const socket = selectSignalConnectionSocket(state);
4532
+ const message = response === null || response === void 0 ? void 0 : response.trim();
4533
+ const knockResponse = message
4534
+ ? { message, sender: { displayName: selectLocalParticipantDisplayName(state) } }
4535
+ : {};
4536
+ socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
4537
+ action: "hold",
4538
+ clientId: participantId,
4539
+ knockResponse,
4509
4540
  });
4510
4541
  });
4511
4542
  const doRejectWaitingParticipant = createRoomConnectedThunk((payload) => (dispatch, getState) => {
4512
- const { participantId } = payload;
4543
+ const { participantId, response } = payload;
4513
4544
  const state = getState();
4514
4545
  const socket = selectSignalConnectionSocket(state);
4546
+ const message = response === null || response === void 0 ? void 0 : response.trim();
4547
+ const knockResponse = message ? { message, sender: {} } : {};
4515
4548
  socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
4516
4549
  action: "reject",
4517
4550
  clientId: participantId,
4518
- response: {},
4551
+ knockResponse,
4519
4552
  });
4520
4553
  });
4521
4554
  const selectWaitingParticipants = (state) => state.waitingParticipants.waitingParticipants;
@@ -5208,7 +5241,7 @@ const SPOTLIGHT_PARTICIPANT_REMOVED = "spotlight:participant-removed";
5208
5241
  const ROOM_JOINED = "room:joined";
5209
5242
  const ROOM_JOINED_ERROR = "room:joined:error";
5210
5243
 
5211
- const selectRoomConnectionState = createSelector(selectChatMessages, selectFileUploads, selectCloudRecordingRaw, selectBreakoutCurrentGroup, selectBreakoutActive, selectBreakoutGroupedParticipants, selectAllClientViewsInCurrentGroup, selectLiveCaptionsRaw, selectLiveTranscriptionRaw, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectRoomConnectionError, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, selectIsCameraEnabled, selectIsMicrophoneEnabled, (chatMessages, fileUploads, cloudRecording, breakoutCurrentGroup, breakoutActive, breakoutGroupedParticipants, clientViewsInCurrentGroup, liveCaptions, liveTranscription, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, connectionError, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews, isCameraEnabled, isMicrophoneEnabled) => {
5244
+ const selectRoomConnectionState = createSelector(selectChatMessages, selectFileUploads, selectCloudRecordingRaw, selectBreakoutCurrentGroup, selectBreakoutActive, selectBreakoutGroupedParticipants, selectAllClientViewsInCurrentGroup, selectLiveCaptionsRaw, selectLiveTranscriptionRaw, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectRoomConnectionError, selectRoomConnectionKnockResponse, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, selectIsCameraEnabled, selectIsMicrophoneEnabled, (chatMessages, fileUploads, cloudRecording, breakoutCurrentGroup, breakoutActive, breakoutGroupedParticipants, clientViewsInCurrentGroup, liveCaptions, liveTranscription, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, connectionError, knockResponse, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews, isCameraEnabled, isMicrophoneEnabled) => {
5212
5245
  const state = {
5213
5246
  chatMessages,
5214
5247
  fileUploads,
@@ -5227,6 +5260,7 @@ const selectRoomConnectionState = createSelector(selectChatMessages, selectFileU
5227
5260
  },
5228
5261
  connectionStatus,
5229
5262
  connectionError,
5263
+ knockResponse,
5230
5264
  events: notificationsEmitter,
5231
5265
  isCameraEnabled,
5232
5266
  isMicrophoneEnabled,
@@ -5571,8 +5605,11 @@ class RoomConnectionClient extends BaseClient {
5571
5605
  acceptWaitingParticipant(participantId) {
5572
5606
  this.store.dispatch(doAcceptWaitingParticipant({ participantId }));
5573
5607
  }
5574
- rejectWaitingParticipant(participantId) {
5575
- this.store.dispatch(doRejectWaitingParticipant({ participantId }));
5608
+ holdWaitingParticipant(participantId, response) {
5609
+ this.store.dispatch(doHoldWaitingParticipant({ participantId, response }));
5610
+ }
5611
+ rejectWaitingParticipant(participantId, response) {
5612
+ this.store.dispatch(doRejectWaitingParticipant({ participantId, response }));
5576
5613
  }
5577
5614
  startCloudRecording() {
5578
5615
  this.store.dispatch(doStartCloudRecording());
@@ -1224,7 +1224,7 @@ const createReactor = (selectors, callback) => {
1224
1224
  });
1225
1225
  };
1226
1226
 
1227
- const coreVersion = "1.16.2";
1227
+ const coreVersion = "1.17.0";
1228
1228
 
1229
1229
  function decodeRoomName(roomName) {
1230
1230
  if (!roomName) {
@@ -2399,6 +2399,7 @@ const selectCloudRecordingIsInitiator = (state) => state.cloudRecording.isInitia
2399
2399
  const selectRoomConnectionSessionId = (state) => { var _a; return (_a = state.roomConnection.session) === null || _a === void 0 ? void 0 : _a.id; };
2400
2400
  const selectRoomConnectionStatus = (state) => state.roomConnection.status;
2401
2401
  const selectRoomConnectionError = (state) => state.roomConnection.error;
2402
+ const selectRoomConnectionKnockResponse = (state) => state.roomConnection.knockResponse;
2402
2403
 
2403
2404
  function createRtcEventAction(name) {
2404
2405
  return createAction(`rtcConnection/event/${name}`);
@@ -4080,6 +4081,7 @@ const roomConnectionSliceInitialState = {
4080
4081
  session: null,
4081
4082
  status: "ready",
4082
4083
  error: null,
4084
+ knockResponse: null,
4083
4085
  };
4084
4086
  const roomConnectionSlice = createSlice({
4085
4087
  name: "roomConnection",
@@ -4088,6 +4090,9 @@ const roomConnectionSlice = createSlice({
4088
4090
  connectionStatusChanged: (state, action) => {
4089
4091
  return Object.assign(Object.assign({}, state), { status: action.payload });
4090
4092
  },
4093
+ knockResponseReceived: (state, action) => {
4094
+ return Object.assign(Object.assign({}, state), { knockResponse: action.payload });
4095
+ },
4091
4096
  },
4092
4097
  extraReducers: (builder) => {
4093
4098
  builder.addCase(signalEvents.roomJoined, (state, action) => {
@@ -4129,7 +4134,7 @@ const roomConnectionSlice = createSlice({
4129
4134
  });
4130
4135
  },
4131
4136
  });
4132
- const { connectionStatusChanged } = roomConnectionSlice.actions;
4137
+ const { connectionStatusChanged, knockResponseReceived } = roomConnectionSlice.actions;
4133
4138
  const doKnockRoom = createAppThunk(() => (dispatch, getState) => {
4134
4139
  const state = getState();
4135
4140
  const socket = selectSignalConnectionRaw(state).socket;
@@ -4222,6 +4227,7 @@ createReactor([selectShouldConnectRoom], ({ dispatch }, shouldConnectRoom) => {
4222
4227
  startAppListening({
4223
4228
  actionCreator: signalEvents.knockHandled,
4224
4229
  effect: ({ payload }, { dispatch, getState }) => {
4230
+ var _a, _b;
4225
4231
  const { clientId, resolution } = payload;
4226
4232
  const state = getState();
4227
4233
  const selfId = selectSelfId(state);
@@ -4232,11 +4238,22 @@ startAppListening({
4232
4238
  dispatch(setRoomKey(payload.metadata.roomKey));
4233
4239
  dispatch(doConnectRoom());
4234
4240
  }
4241
+ else if (resolution === "on_hold") {
4242
+ dispatch(knockResponseReceived((_a = payload.knockResponse) !== null && _a !== void 0 ? _a : null));
4243
+ dispatch(connectionStatusChanged("knock_on_hold"));
4244
+ }
4235
4245
  else if (resolution === "rejected") {
4246
+ dispatch(knockResponseReceived((_b = payload.knockResponse) !== null && _b !== void 0 ? _b : null));
4236
4247
  dispatch(connectionStatusChanged("knock_rejected"));
4237
4248
  }
4238
4249
  },
4239
4250
  });
4251
+ startAppListening({
4252
+ actionCreator: signalEvents.clientKicked,
4253
+ effect: (_, { dispatch }) => {
4254
+ dispatch(doAppStop());
4255
+ },
4256
+ });
4240
4257
  startAppListening({
4241
4258
  actionCreator: doAppStop,
4242
4259
  effect: (_, { dispatch, getState }) => {
@@ -4505,17 +4522,33 @@ const doAcceptWaitingParticipant = createRoomConnectedThunk((payload) => (dispat
4505
4522
  socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
4506
4523
  action: "accept",
4507
4524
  clientId: participantId,
4508
- response: {},
4525
+ knockResponse: {},
4526
+ });
4527
+ });
4528
+ const doHoldWaitingParticipant = createRoomConnectedThunk((payload) => (dispatch, getState) => {
4529
+ const { participantId, response } = payload;
4530
+ const state = getState();
4531
+ const socket = selectSignalConnectionSocket(state);
4532
+ const message = response === null || response === void 0 ? void 0 : response.trim();
4533
+ const knockResponse = message
4534
+ ? { message, sender: { displayName: selectLocalParticipantDisplayName(state) } }
4535
+ : {};
4536
+ socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
4537
+ action: "hold",
4538
+ clientId: participantId,
4539
+ knockResponse,
4509
4540
  });
4510
4541
  });
4511
4542
  const doRejectWaitingParticipant = createRoomConnectedThunk((payload) => (dispatch, getState) => {
4512
- const { participantId } = payload;
4543
+ const { participantId, response } = payload;
4513
4544
  const state = getState();
4514
4545
  const socket = selectSignalConnectionSocket(state);
4546
+ const message = response === null || response === void 0 ? void 0 : response.trim();
4547
+ const knockResponse = message ? { message, sender: {} } : {};
4515
4548
  socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
4516
4549
  action: "reject",
4517
4550
  clientId: participantId,
4518
- response: {},
4551
+ knockResponse,
4519
4552
  });
4520
4553
  });
4521
4554
  const selectWaitingParticipants = (state) => state.waitingParticipants.waitingParticipants;
@@ -5208,7 +5241,7 @@ const SPOTLIGHT_PARTICIPANT_REMOVED = "spotlight:participant-removed";
5208
5241
  const ROOM_JOINED = "room:joined";
5209
5242
  const ROOM_JOINED_ERROR = "room:joined:error";
5210
5243
 
5211
- const selectRoomConnectionState = createSelector(selectChatMessages, selectFileUploads, selectCloudRecordingRaw, selectBreakoutCurrentGroup, selectBreakoutActive, selectBreakoutGroupedParticipants, selectAllClientViewsInCurrentGroup, selectLiveCaptionsRaw, selectLiveTranscriptionRaw, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectRoomConnectionError, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, selectIsCameraEnabled, selectIsMicrophoneEnabled, (chatMessages, fileUploads, cloudRecording, breakoutCurrentGroup, breakoutActive, breakoutGroupedParticipants, clientViewsInCurrentGroup, liveCaptions, liveTranscription, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, connectionError, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews, isCameraEnabled, isMicrophoneEnabled) => {
5244
+ const selectRoomConnectionState = createSelector(selectChatMessages, selectFileUploads, selectCloudRecordingRaw, selectBreakoutCurrentGroup, selectBreakoutActive, selectBreakoutGroupedParticipants, selectAllClientViewsInCurrentGroup, selectLiveCaptionsRaw, selectLiveTranscriptionRaw, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectRoomConnectionError, selectRoomConnectionKnockResponse, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, selectIsCameraEnabled, selectIsMicrophoneEnabled, (chatMessages, fileUploads, cloudRecording, breakoutCurrentGroup, breakoutActive, breakoutGroupedParticipants, clientViewsInCurrentGroup, liveCaptions, liveTranscription, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, connectionError, knockResponse, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews, isCameraEnabled, isMicrophoneEnabled) => {
5212
5245
  const state = {
5213
5246
  chatMessages,
5214
5247
  fileUploads,
@@ -5227,6 +5260,7 @@ const selectRoomConnectionState = createSelector(selectChatMessages, selectFileU
5227
5260
  },
5228
5261
  connectionStatus,
5229
5262
  connectionError,
5263
+ knockResponse,
5230
5264
  events: notificationsEmitter,
5231
5265
  isCameraEnabled,
5232
5266
  isMicrophoneEnabled,
@@ -5571,8 +5605,11 @@ class RoomConnectionClient extends BaseClient {
5571
5605
  acceptWaitingParticipant(participantId) {
5572
5606
  this.store.dispatch(doAcceptWaitingParticipant({ participantId }));
5573
5607
  }
5574
- rejectWaitingParticipant(participantId) {
5575
- this.store.dispatch(doRejectWaitingParticipant({ participantId }));
5608
+ holdWaitingParticipant(participantId, response) {
5609
+ this.store.dispatch(doHoldWaitingParticipant({ participantId, response }));
5610
+ }
5611
+ rejectWaitingParticipant(participantId, response) {
5612
+ this.store.dispatch(doRejectWaitingParticipant({ participantId, response }));
5576
5613
  }
5577
5614
  startCloudRecording() {
5578
5615
  this.store.dispatch(doStartCloudRecording());