@whereby.com/core 1.16.3 → 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 +39 -8
- package/dist/index.d.cts +7 -4
- package/dist/index.d.mts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.mjs +39 -8
- package/dist/legacy-esm.js +39 -8
- package/dist/redux/index.cjs +34 -5
- package/dist/redux/index.d.cts +21 -4
- package/dist/redux/index.d.mts +21 -4
- package/dist/redux/index.d.ts +21 -4
- package/dist/redux/index.js +33 -6
- package/dist/redux/index.mjs +33 -6
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1226,7 +1226,7 @@ const createReactor = (selectors, callback) => {
|
|
|
1226
1226
|
});
|
|
1227
1227
|
};
|
|
1228
1228
|
|
|
1229
|
-
const coreVersion = "1.
|
|
1229
|
+
const coreVersion = "1.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,7 +4240,12 @@ 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
|
},
|
|
@@ -4513,17 +4524,33 @@ const doAcceptWaitingParticipant = createRoomConnectedThunk((payload) => (dispat
|
|
|
4513
4524
|
socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
|
|
4514
4525
|
action: "accept",
|
|
4515
4526
|
clientId: participantId,
|
|
4516
|
-
|
|
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,
|
|
4517
4542
|
});
|
|
4518
4543
|
});
|
|
4519
4544
|
const doRejectWaitingParticipant = createRoomConnectedThunk((payload) => (dispatch, getState) => {
|
|
4520
|
-
const { participantId } = payload;
|
|
4545
|
+
const { participantId, response } = payload;
|
|
4521
4546
|
const state = getState();
|
|
4522
4547
|
const socket = selectSignalConnectionSocket(state);
|
|
4548
|
+
const message = response === null || response === void 0 ? void 0 : response.trim();
|
|
4549
|
+
const knockResponse = message ? { message, sender: {} } : {};
|
|
4523
4550
|
socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
|
|
4524
4551
|
action: "reject",
|
|
4525
4552
|
clientId: participantId,
|
|
4526
|
-
|
|
4553
|
+
knockResponse,
|
|
4527
4554
|
});
|
|
4528
4555
|
});
|
|
4529
4556
|
const selectWaitingParticipants = (state) => state.waitingParticipants.waitingParticipants;
|
|
@@ -5216,7 +5243,7 @@ const SPOTLIGHT_PARTICIPANT_REMOVED = "spotlight:participant-removed";
|
|
|
5216
5243
|
const ROOM_JOINED = "room:joined";
|
|
5217
5244
|
const ROOM_JOINED_ERROR = "room:joined:error";
|
|
5218
5245
|
|
|
5219
|
-
const selectRoomConnectionState = toolkit.createSelector(selectChatMessages, selectFileUploads, selectCloudRecordingRaw, selectBreakoutCurrentGroup, selectBreakoutActive, selectBreakoutGroupedParticipants, selectAllClientViewsInCurrentGroup, selectLiveCaptionsRaw, selectLiveTranscriptionRaw, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectRoomConnectionError, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, selectIsCameraEnabled, selectIsMicrophoneEnabled, (chatMessages, fileUploads, cloudRecording, breakoutCurrentGroup, breakoutActive, breakoutGroupedParticipants, clientViewsInCurrentGroup, liveCaptions, liveTranscription, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, connectionError, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews, isCameraEnabled, isMicrophoneEnabled) => {
|
|
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) => {
|
|
5220
5247
|
const state = {
|
|
5221
5248
|
chatMessages,
|
|
5222
5249
|
fileUploads,
|
|
@@ -5235,6 +5262,7 @@ const selectRoomConnectionState = toolkit.createSelector(selectChatMessages, sel
|
|
|
5235
5262
|
},
|
|
5236
5263
|
connectionStatus,
|
|
5237
5264
|
connectionError,
|
|
5265
|
+
knockResponse,
|
|
5238
5266
|
events: notificationsEmitter,
|
|
5239
5267
|
isCameraEnabled,
|
|
5240
5268
|
isMicrophoneEnabled,
|
|
@@ -5579,8 +5607,11 @@ class RoomConnectionClient extends BaseClient {
|
|
|
5579
5607
|
acceptWaitingParticipant(participantId) {
|
|
5580
5608
|
this.store.dispatch(doAcceptWaitingParticipant({ participantId }));
|
|
5581
5609
|
}
|
|
5582
|
-
|
|
5583
|
-
this.store.dispatch(
|
|
5610
|
+
holdWaitingParticipant(participantId, response) {
|
|
5611
|
+
this.store.dispatch(doHoldWaitingParticipant({ participantId, response }));
|
|
5612
|
+
}
|
|
5613
|
+
rejectWaitingParticipant(participantId, response) {
|
|
5614
|
+
this.store.dispatch(doRejectWaitingParticipant({ participantId, response }));
|
|
5584
5615
|
}
|
|
5585
5616
|
startCloudRecording() {
|
|
5586
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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,7 +4238,12 @@ 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
|
},
|
|
@@ -4511,17 +4522,33 @@ const doAcceptWaitingParticipant = createRoomConnectedThunk((payload) => (dispat
|
|
|
4511
4522
|
socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
|
|
4512
4523
|
action: "accept",
|
|
4513
4524
|
clientId: participantId,
|
|
4514
|
-
|
|
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,
|
|
4515
4540
|
});
|
|
4516
4541
|
});
|
|
4517
4542
|
const doRejectWaitingParticipant = createRoomConnectedThunk((payload) => (dispatch, getState) => {
|
|
4518
|
-
const { participantId } = payload;
|
|
4543
|
+
const { participantId, response } = payload;
|
|
4519
4544
|
const state = getState();
|
|
4520
4545
|
const socket = selectSignalConnectionSocket(state);
|
|
4546
|
+
const message = response === null || response === void 0 ? void 0 : response.trim();
|
|
4547
|
+
const knockResponse = message ? { message, sender: {} } : {};
|
|
4521
4548
|
socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
|
|
4522
4549
|
action: "reject",
|
|
4523
4550
|
clientId: participantId,
|
|
4524
|
-
|
|
4551
|
+
knockResponse,
|
|
4525
4552
|
});
|
|
4526
4553
|
});
|
|
4527
4554
|
const selectWaitingParticipants = (state) => state.waitingParticipants.waitingParticipants;
|
|
@@ -5214,7 +5241,7 @@ const SPOTLIGHT_PARTICIPANT_REMOVED = "spotlight:participant-removed";
|
|
|
5214
5241
|
const ROOM_JOINED = "room:joined";
|
|
5215
5242
|
const ROOM_JOINED_ERROR = "room:joined:error";
|
|
5216
5243
|
|
|
5217
|
-
const selectRoomConnectionState = createSelector(selectChatMessages, selectFileUploads, selectCloudRecordingRaw, selectBreakoutCurrentGroup, selectBreakoutActive, selectBreakoutGroupedParticipants, selectAllClientViewsInCurrentGroup, selectLiveCaptionsRaw, selectLiveTranscriptionRaw, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectRoomConnectionError, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, selectIsCameraEnabled, selectIsMicrophoneEnabled, (chatMessages, fileUploads, cloudRecording, breakoutCurrentGroup, breakoutActive, breakoutGroupedParticipants, clientViewsInCurrentGroup, liveCaptions, liveTranscription, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, connectionError, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews, isCameraEnabled, isMicrophoneEnabled) => {
|
|
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) => {
|
|
5218
5245
|
const state = {
|
|
5219
5246
|
chatMessages,
|
|
5220
5247
|
fileUploads,
|
|
@@ -5233,6 +5260,7 @@ const selectRoomConnectionState = createSelector(selectChatMessages, selectFileU
|
|
|
5233
5260
|
},
|
|
5234
5261
|
connectionStatus,
|
|
5235
5262
|
connectionError,
|
|
5263
|
+
knockResponse,
|
|
5236
5264
|
events: notificationsEmitter,
|
|
5237
5265
|
isCameraEnabled,
|
|
5238
5266
|
isMicrophoneEnabled,
|
|
@@ -5577,8 +5605,11 @@ class RoomConnectionClient extends BaseClient {
|
|
|
5577
5605
|
acceptWaitingParticipant(participantId) {
|
|
5578
5606
|
this.store.dispatch(doAcceptWaitingParticipant({ participantId }));
|
|
5579
5607
|
}
|
|
5580
|
-
|
|
5581
|
-
this.store.dispatch(
|
|
5608
|
+
holdWaitingParticipant(participantId, response) {
|
|
5609
|
+
this.store.dispatch(doHoldWaitingParticipant({ participantId, response }));
|
|
5610
|
+
}
|
|
5611
|
+
rejectWaitingParticipant(participantId, response) {
|
|
5612
|
+
this.store.dispatch(doRejectWaitingParticipant({ participantId, response }));
|
|
5582
5613
|
}
|
|
5583
5614
|
startCloudRecording() {
|
|
5584
5615
|
this.store.dispatch(doStartCloudRecording());
|
package/dist/legacy-esm.js
CHANGED
|
@@ -1224,7 +1224,7 @@ const createReactor = (selectors, callback) => {
|
|
|
1224
1224
|
});
|
|
1225
1225
|
};
|
|
1226
1226
|
|
|
1227
|
-
const coreVersion = "1.
|
|
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,7 +4238,12 @@ 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
|
},
|
|
@@ -4511,17 +4522,33 @@ const doAcceptWaitingParticipant = createRoomConnectedThunk((payload) => (dispat
|
|
|
4511
4522
|
socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
|
|
4512
4523
|
action: "accept",
|
|
4513
4524
|
clientId: participantId,
|
|
4514
|
-
|
|
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,
|
|
4515
4540
|
});
|
|
4516
4541
|
});
|
|
4517
4542
|
const doRejectWaitingParticipant = createRoomConnectedThunk((payload) => (dispatch, getState) => {
|
|
4518
|
-
const { participantId } = payload;
|
|
4543
|
+
const { participantId, response } = payload;
|
|
4519
4544
|
const state = getState();
|
|
4520
4545
|
const socket = selectSignalConnectionSocket(state);
|
|
4546
|
+
const message = response === null || response === void 0 ? void 0 : response.trim();
|
|
4547
|
+
const knockResponse = message ? { message, sender: {} } : {};
|
|
4521
4548
|
socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
|
|
4522
4549
|
action: "reject",
|
|
4523
4550
|
clientId: participantId,
|
|
4524
|
-
|
|
4551
|
+
knockResponse,
|
|
4525
4552
|
});
|
|
4526
4553
|
});
|
|
4527
4554
|
const selectWaitingParticipants = (state) => state.waitingParticipants.waitingParticipants;
|
|
@@ -5214,7 +5241,7 @@ const SPOTLIGHT_PARTICIPANT_REMOVED = "spotlight:participant-removed";
|
|
|
5214
5241
|
const ROOM_JOINED = "room:joined";
|
|
5215
5242
|
const ROOM_JOINED_ERROR = "room:joined:error";
|
|
5216
5243
|
|
|
5217
|
-
const selectRoomConnectionState = createSelector(selectChatMessages, selectFileUploads, selectCloudRecordingRaw, selectBreakoutCurrentGroup, selectBreakoutActive, selectBreakoutGroupedParticipants, selectAllClientViewsInCurrentGroup, selectLiveCaptionsRaw, selectLiveTranscriptionRaw, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectRoomConnectionError, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, selectIsCameraEnabled, selectIsMicrophoneEnabled, (chatMessages, fileUploads, cloudRecording, breakoutCurrentGroup, breakoutActive, breakoutGroupedParticipants, clientViewsInCurrentGroup, liveCaptions, liveTranscription, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, connectionError, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews, isCameraEnabled, isMicrophoneEnabled) => {
|
|
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) => {
|
|
5218
5245
|
const state = {
|
|
5219
5246
|
chatMessages,
|
|
5220
5247
|
fileUploads,
|
|
@@ -5233,6 +5260,7 @@ const selectRoomConnectionState = createSelector(selectChatMessages, selectFileU
|
|
|
5233
5260
|
},
|
|
5234
5261
|
connectionStatus,
|
|
5235
5262
|
connectionError,
|
|
5263
|
+
knockResponse,
|
|
5236
5264
|
events: notificationsEmitter,
|
|
5237
5265
|
isCameraEnabled,
|
|
5238
5266
|
isMicrophoneEnabled,
|
|
@@ -5577,8 +5605,11 @@ class RoomConnectionClient extends BaseClient {
|
|
|
5577
5605
|
acceptWaitingParticipant(participantId) {
|
|
5578
5606
|
this.store.dispatch(doAcceptWaitingParticipant({ participantId }));
|
|
5579
5607
|
}
|
|
5580
|
-
|
|
5581
|
-
this.store.dispatch(
|
|
5608
|
+
holdWaitingParticipant(participantId, response) {
|
|
5609
|
+
this.store.dispatch(doHoldWaitingParticipant({ participantId, response }));
|
|
5610
|
+
}
|
|
5611
|
+
rejectWaitingParticipant(participantId, response) {
|
|
5612
|
+
this.store.dispatch(doRejectWaitingParticipant({ participantId, response }));
|
|
5582
5613
|
}
|
|
5583
5614
|
startCloudRecording() {
|
|
5584
5615
|
this.store.dispatch(doStartCloudRecording());
|
package/dist/redux/index.cjs
CHANGED
|
@@ -76,7 +76,7 @@ const createReactor = (selectors, callback) => {
|
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
const coreVersion = "1.
|
|
79
|
+
const coreVersion = "1.17.0";
|
|
80
80
|
|
|
81
81
|
function decodeRoomName(roomName) {
|
|
82
82
|
if (!roomName) {
|
|
@@ -1277,6 +1277,7 @@ const selectRoomConnectionSession = (state) => state.roomConnection.session;
|
|
|
1277
1277
|
const selectRoomConnectionSessionId = (state) => { var _a; return (_a = state.roomConnection.session) === null || _a === void 0 ? void 0 : _a.id; };
|
|
1278
1278
|
const selectRoomConnectionStatus = (state) => state.roomConnection.status;
|
|
1279
1279
|
const selectRoomConnectionError = (state) => state.roomConnection.error;
|
|
1280
|
+
const selectRoomConnectionKnockResponse = (state) => state.roomConnection.knockResponse;
|
|
1280
1281
|
|
|
1281
1282
|
function createRtcEventAction(name) {
|
|
1282
1283
|
return toolkit.createAction(`rtcConnection/event/${name}`);
|
|
@@ -2991,6 +2992,7 @@ const roomConnectionSliceInitialState = {
|
|
|
2991
2992
|
session: null,
|
|
2992
2993
|
status: "ready",
|
|
2993
2994
|
error: null,
|
|
2995
|
+
knockResponse: null,
|
|
2994
2996
|
};
|
|
2995
2997
|
const roomConnectionSlice = toolkit.createSlice({
|
|
2996
2998
|
name: "roomConnection",
|
|
@@ -2999,6 +3001,9 @@ const roomConnectionSlice = toolkit.createSlice({
|
|
|
2999
3001
|
connectionStatusChanged: (state, action) => {
|
|
3000
3002
|
return Object.assign(Object.assign({}, state), { status: action.payload });
|
|
3001
3003
|
},
|
|
3004
|
+
knockResponseReceived: (state, action) => {
|
|
3005
|
+
return Object.assign(Object.assign({}, state), { knockResponse: action.payload });
|
|
3006
|
+
},
|
|
3002
3007
|
},
|
|
3003
3008
|
extraReducers: (builder) => {
|
|
3004
3009
|
builder.addCase(signalEvents.roomJoined, (state, action) => {
|
|
@@ -3040,7 +3045,7 @@ const roomConnectionSlice = toolkit.createSlice({
|
|
|
3040
3045
|
});
|
|
3041
3046
|
},
|
|
3042
3047
|
});
|
|
3043
|
-
const { connectionStatusChanged } = roomConnectionSlice.actions;
|
|
3048
|
+
const { connectionStatusChanged, knockResponseReceived } = roomConnectionSlice.actions;
|
|
3044
3049
|
const doKnockRoom = createAppThunk(() => (dispatch, getState) => {
|
|
3045
3050
|
const state = getState();
|
|
3046
3051
|
const socket = selectSignalConnectionRaw(state).socket;
|
|
@@ -3133,6 +3138,7 @@ createReactor([selectShouldConnectRoom], ({ dispatch }, shouldConnectRoom) => {
|
|
|
3133
3138
|
startAppListening({
|
|
3134
3139
|
actionCreator: signalEvents.knockHandled,
|
|
3135
3140
|
effect: ({ payload }, { dispatch, getState }) => {
|
|
3141
|
+
var _a, _b;
|
|
3136
3142
|
const { clientId, resolution } = payload;
|
|
3137
3143
|
const state = getState();
|
|
3138
3144
|
const selfId = selectSelfId(state);
|
|
@@ -3143,7 +3149,12 @@ startAppListening({
|
|
|
3143
3149
|
dispatch(setRoomKey(payload.metadata.roomKey));
|
|
3144
3150
|
dispatch(doConnectRoom());
|
|
3145
3151
|
}
|
|
3152
|
+
else if (resolution === "on_hold") {
|
|
3153
|
+
dispatch(knockResponseReceived((_a = payload.knockResponse) !== null && _a !== void 0 ? _a : null));
|
|
3154
|
+
dispatch(connectionStatusChanged("knock_on_hold"));
|
|
3155
|
+
}
|
|
3146
3156
|
else if (resolution === "rejected") {
|
|
3157
|
+
dispatch(knockResponseReceived((_b = payload.knockResponse) !== null && _b !== void 0 ? _b : null));
|
|
3147
3158
|
dispatch(connectionStatusChanged("knock_rejected"));
|
|
3148
3159
|
}
|
|
3149
3160
|
},
|
|
@@ -3422,17 +3433,33 @@ const doAcceptWaitingParticipant = createRoomConnectedThunk((payload) => (dispat
|
|
|
3422
3433
|
socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
|
|
3423
3434
|
action: "accept",
|
|
3424
3435
|
clientId: participantId,
|
|
3425
|
-
|
|
3436
|
+
knockResponse: {},
|
|
3437
|
+
});
|
|
3438
|
+
});
|
|
3439
|
+
const doHoldWaitingParticipant = createRoomConnectedThunk((payload) => (dispatch, getState) => {
|
|
3440
|
+
const { participantId, response } = payload;
|
|
3441
|
+
const state = getState();
|
|
3442
|
+
const socket = selectSignalConnectionSocket(state);
|
|
3443
|
+
const message = response === null || response === void 0 ? void 0 : response.trim();
|
|
3444
|
+
const knockResponse = message
|
|
3445
|
+
? { message, sender: { displayName: selectLocalParticipantDisplayName(state) } }
|
|
3446
|
+
: {};
|
|
3447
|
+
socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
|
|
3448
|
+
action: "hold",
|
|
3449
|
+
clientId: participantId,
|
|
3450
|
+
knockResponse,
|
|
3426
3451
|
});
|
|
3427
3452
|
});
|
|
3428
3453
|
const doRejectWaitingParticipant = createRoomConnectedThunk((payload) => (dispatch, getState) => {
|
|
3429
|
-
const { participantId } = payload;
|
|
3454
|
+
const { participantId, response } = payload;
|
|
3430
3455
|
const state = getState();
|
|
3431
3456
|
const socket = selectSignalConnectionSocket(state);
|
|
3457
|
+
const message = response === null || response === void 0 ? void 0 : response.trim();
|
|
3458
|
+
const knockResponse = message ? { message, sender: {} } : {};
|
|
3432
3459
|
socket === null || socket === void 0 ? void 0 : socket.emit("handle_knock", {
|
|
3433
3460
|
action: "reject",
|
|
3434
3461
|
clientId: participantId,
|
|
3435
|
-
|
|
3462
|
+
knockResponse,
|
|
3436
3463
|
});
|
|
3437
3464
|
});
|
|
3438
3465
|
const selectWaitingParticipantsRaw = (state) => state.waitingParticipants;
|
|
@@ -4586,6 +4613,7 @@ exports.doGetDeviceCredentials = doGetDeviceCredentials;
|
|
|
4586
4613
|
exports.doHandleAcceptStreams = doHandleAcceptStreams;
|
|
4587
4614
|
exports.doHandleStreamingStarted = doHandleStreamingStarted;
|
|
4588
4615
|
exports.doHandleStreamingStopped = doHandleStreamingStopped;
|
|
4616
|
+
exports.doHoldWaitingParticipant = doHoldWaitingParticipant;
|
|
4589
4617
|
exports.doKickParticipant = doKickParticipant;
|
|
4590
4618
|
exports.doKnockRoom = doKnockRoom;
|
|
4591
4619
|
exports.doLocalStreamEffect = doLocalStreamEffect;
|
|
@@ -4793,6 +4821,7 @@ exports.selectRemoteClients = selectRemoteClients;
|
|
|
4793
4821
|
exports.selectRemoteParticipants = selectRemoteParticipants;
|
|
4794
4822
|
exports.selectRemoteParticipantsRaw = selectRemoteParticipantsRaw;
|
|
4795
4823
|
exports.selectRoomConnectionError = selectRoomConnectionError;
|
|
4824
|
+
exports.selectRoomConnectionKnockResponse = selectRoomConnectionKnockResponse;
|
|
4796
4825
|
exports.selectRoomConnectionRaw = selectRoomConnectionRaw;
|
|
4797
4826
|
exports.selectRoomConnectionSession = selectRoomConnectionSession;
|
|
4798
4827
|
exports.selectRoomConnectionSessionId = selectRoomConnectionSessionId;
|