mediasfu-shared 1.0.1 → 1.0.2
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/LICENSE +21 -21
- package/README.md +103 -222
- package/dist/index.cjs +7500 -2163
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4203 -273
- package/dist/index.js +7521 -2184
- package/dist/index.js.map +1 -1
- package/package.json +85 -78
- package/src/ProducerClient/producerClientEmits/joinRoomClient.ts +57 -0
- package/src/ProducerClient/producerClientEmits/updateRoomParametersClient.ts +401 -0
- package/src/consumers/addVideosGrid.ts +3 -2
- package/src/consumers/changeVids.ts +111 -41
- package/src/consumers/checkPermission.ts +35 -1
- package/src/consumers/connectRecvTransport.ts +42 -1
- package/src/consumers/consumerResume.ts +2 -2
- package/src/consumers/dispStreams.ts +83 -37
- package/src/consumers/frameworkConsumerContract.ts +6 -0
- package/src/consumers/generatePageContent.ts +24 -10
- package/src/consumers/getPipedProducersAlt.ts +112 -16
- package/src/consumers/gridLayout/addVideosGrid.engine.ts +42 -0
- package/src/consumers/gridLayout/prepopulateUserMedia.engine.ts +444 -0
- package/src/consumers/mixStreams.ts +45 -14
- package/src/consumers/onScreenChanges.ts +25 -10
- package/src/consumers/prepopulateUserMedia.ts +3 -2
- package/src/consumers/processConsumerTransports.ts +68 -23
- package/src/consumers/processConsumerTransportsAudio.ts +53 -16
- package/src/consumers/reUpdateInter.ts +61 -21
- package/src/consumers/readjust.ts +30 -14
- package/src/consumers/reorderStreams.ts +76 -42
- package/src/consumers/resumePauseAudioStreams.ts +66 -17
- package/src/consumers/resumePauseStreams.ts +53 -10
- package/src/consumers/socketReceiveMethods/joinConsumeRoom.ts +8 -0
- package/src/consumers/socketReceiveMethods/newPipeProducer.ts +114 -0
- package/src/consumers/socketReceiveMethods/producerClosed.ts +13 -0
- package/src/consumers/streamSuccessScreen.ts +2 -2
- package/src/consumers/streamSuccessVideo.ts +5 -0
- package/src/consumers/translationConsumerSwitch.ts +299 -0
- package/src/index.ts +85 -1
- package/src/methods/coHostMethods/modifyCoHostSettings.ts +9 -9
- package/src/methods/displaySettings/modifyDisplaySettings.ts +5 -0
- package/src/methods/index.ts +66 -0
- package/src/methods/message/sendMessage.ts +12 -29
- package/src/methods/panelists/focusPanelists.ts +83 -0
- package/src/methods/panelists/index.ts +3 -0
- package/src/methods/panelists/launchPanelists.ts +13 -0
- package/src/methods/panelists/updatePanelists.ts +135 -0
- package/src/methods/permissions/index.ts +3 -0
- package/src/methods/permissions/launchPermissions.ts +13 -0
- package/src/methods/permissions/updateParticipantPermission.ts +127 -0
- package/src/methods/permissions/updatePermissionConfig.ts +52 -0
- package/src/methods/polls/pollUpdated.ts +88 -0
- package/src/methods/recording/confirmRecording.ts +15 -12
- package/src/methods/recording/recordResumeTimer.ts +2 -2
- package/src/methods/recording/recordStartTimer.ts +2 -2
- package/src/methods/recording/timeLeftRecording.ts +25 -0
- package/src/methods/requests/hostRequestResponse.ts +153 -0
- package/src/methods/settings/modifySettings.ts +17 -17
- package/src/methods/socketReceive/allMembers.ts +450 -0
- package/src/methods/socketReceive/allMembersRest.ts +480 -0
- package/src/methods/socketReceive/allWaitingRoomMembers.ts +35 -0
- package/src/methods/socketReceive/banParticipant.ts +73 -0
- package/src/methods/socketReceive/controlMediaHost.ts +280 -0
- package/src/methods/socketReceive/disconnect.ts +40 -0
- package/src/methods/socketReceive/disconnectUserSelf.ts +56 -0
- package/src/methods/socketReceive/getDomains.ts +112 -0
- package/src/methods/socketReceive/meetingEnded.ts +49 -0
- package/src/methods/socketReceive/meetingStillThere.ts +26 -0
- package/src/methods/socketReceive/panelistReceiveMethods.ts +195 -0
- package/src/methods/socketReceive/participantRequested.ts +48 -0
- package/src/methods/socketReceive/permissionReceiveMethods.ts +59 -0
- package/src/methods/socketReceive/personJoined.ts +35 -0
- package/src/methods/socketReceive/producerMediaClosed.ts +223 -0
- package/src/methods/socketReceive/producerMediaPaused.ts +267 -0
- package/src/methods/socketReceive/producerMediaResumed.ts +157 -0
- package/src/methods/socketReceive/reInitiateRecording.ts +53 -0
- package/src/methods/socketReceive/receiveMessage.ts +117 -0
- package/src/methods/socketReceive/recordingNotice.ts +286 -0
- package/src/methods/socketReceive/roomRecordParams.ts +122 -0
- package/src/methods/socketReceive/screenProducerId.ts +61 -0
- package/src/methods/socketReceive/startRecords.ts +46 -0
- package/src/methods/socketReceive/stoppedRecording.ts +44 -0
- package/src/methods/socketReceive/translationReceiveMethods.ts +581 -0
- package/src/methods/socketReceive/updateConsumingDomains.ts +128 -0
- package/src/methods/socketReceive/updateMediaSettings.ts +45 -0
- package/src/methods/socketReceive/updatedCoHost.ts +75 -0
- package/src/methods/socketReceive/userWaiting.ts +45 -0
- package/src/methods/stream/clickAudio.ts +380 -0
- package/src/methods/stream/clickChat.ts +36 -0
- package/src/methods/stream/clickScreenShare.ts +173 -0
- package/src/methods/stream/clickVideo.ts +22 -5
- package/src/methods/stream/index.ts +1 -0
- package/src/methods/utils/SoundPlayer.ts +31 -0
- package/src/methods/utils/checkLimitsAndMakeRequest.ts +156 -2
- package/src/methods/utils/createResponseJoinRoom.ts +47 -0
- package/src/methods/utils/createRoomOnMediaSFU.ts +160 -0
- package/src/methods/utils/formatNumber.ts +42 -0
- package/src/methods/utils/generateRandomMessages.ts +70 -0
- package/src/methods/utils/generateRandomParticipants.ts +100 -0
- package/src/methods/utils/generateRandomPolls.ts +43 -0
- package/src/methods/utils/generateRandomRequestList.ts +51 -0
- package/src/methods/utils/generateRandomWaitingRoomList.ts +17 -0
- package/src/methods/utils/getModalPosition.ts +23 -0
- package/src/methods/utils/getOverlayPosition.ts +37 -0
- package/src/methods/utils/initialValuesState.ts +405 -0
- package/src/methods/utils/joinRoomOnMediaSFU.ts +124 -0
- package/src/methods/utils/liveSubtitle.ts +107 -0
- package/src/methods/utils/meetingTimeRemaining.ts +33 -0
- package/src/methods/utils/meetingTimer/startMeetingProgressTimer.ts +72 -0
- package/src/methods/utils/producer/aParams.ts +10 -0
- package/src/methods/utils/producer/hParams.ts +26 -0
- package/src/methods/utils/producer/screenParams.ts +13 -0
- package/src/methods/utils/producer/vParams.ts +26 -0
- package/src/methods/utils/producer/videoCaptureConstraints.ts +65 -0
- package/src/methods/utils/resolveMediaSFURoomApi.ts +16 -0
- package/src/methods/utils/sleep.ts +24 -0
- package/src/methods/utils/translationLanguages.ts +308 -0
- package/src/methods/utils/webrtc.ts +44 -0
- package/src/methods/welcome/handleWelcomeRequest.ts +11 -2
- package/src/methods/welcome/index.ts +5 -1
- package/src/methods/whiteboard/captureCanvasStream.ts +128 -0
- package/src/producers/producerEmits/joinConRoom.ts +2 -2
- package/src/producers/producerEmits/joinLocalRoom.ts +240 -0
- package/src/producers/producerEmits/joinRoom.ts +129 -0
- package/src/types/shared-base-types.ts +14 -3
- package/src/types/types.ts +255 -0
|
@@ -50,6 +50,10 @@ export interface ConfirmRecordingOptions {
|
|
|
50
50
|
|
|
51
51
|
export type ConfirmRecordingType = (options: ConfirmRecordingOptions) => Promise<void>
|
|
52
52
|
|
|
53
|
+
const ALERT_DURATION = 6000
|
|
54
|
+
const FULL_PARTICIPANT_RECORDING_ALERT_MESSAGE =
|
|
55
|
+
'You are not allowed to record videos of all participants while the meeting display is set to All. Switch the meeting display to Media and try again.'
|
|
56
|
+
|
|
53
57
|
/**
|
|
54
58
|
* Confirms the recording settings based on the provided parameters and updates the recording state.
|
|
55
59
|
*/
|
|
@@ -100,10 +104,9 @@ export const confirmRecording: ConfirmRecordingType = async ({
|
|
|
100
104
|
) {
|
|
101
105
|
if (meetingDisplayType === 'all' && !(breakOutRoomStarted && !breakOutRoomEnded)) {
|
|
102
106
|
showAlert?.({
|
|
103
|
-
message:
|
|
104
|
-
'You are not allowed to record videos of all participants; change the meeting display type to video or video optimized.',
|
|
107
|
+
message: FULL_PARTICIPANT_RECORDING_ALERT_MESSAGE,
|
|
105
108
|
type: 'danger',
|
|
106
|
-
duration:
|
|
109
|
+
duration: ALERT_DURATION,
|
|
107
110
|
})
|
|
108
111
|
return
|
|
109
112
|
}
|
|
@@ -113,7 +116,7 @@ export const confirmRecording: ConfirmRecordingType = async ({
|
|
|
113
116
|
showAlert?.({
|
|
114
117
|
message: 'You are only allowed to record yourself.',
|
|
115
118
|
type: 'danger',
|
|
116
|
-
duration:
|
|
119
|
+
duration: ALERT_DURATION,
|
|
117
120
|
})
|
|
118
121
|
return
|
|
119
122
|
}
|
|
@@ -122,7 +125,7 @@ export const confirmRecording: ConfirmRecordingType = async ({
|
|
|
122
125
|
showAlert?.({
|
|
123
126
|
message: 'You are not allowed to record other video participants.',
|
|
124
127
|
type: 'danger',
|
|
125
|
-
duration:
|
|
128
|
+
duration: ALERT_DURATION,
|
|
126
129
|
})
|
|
127
130
|
return
|
|
128
131
|
}
|
|
@@ -131,7 +134,7 @@ export const confirmRecording: ConfirmRecordingType = async ({
|
|
|
131
134
|
showAlert?.({
|
|
132
135
|
message: 'You are not allowed to record all orientations.',
|
|
133
136
|
type: 'danger',
|
|
134
|
-
duration:
|
|
137
|
+
duration: ALERT_DURATION,
|
|
135
138
|
})
|
|
136
139
|
return
|
|
137
140
|
}
|
|
@@ -144,7 +147,7 @@ export const confirmRecording: ConfirmRecordingType = async ({
|
|
|
144
147
|
showAlert?.({
|
|
145
148
|
message: 'You are not allowed to record this orientation.',
|
|
146
149
|
type: 'danger',
|
|
147
|
-
duration:
|
|
150
|
+
duration: ALERT_DURATION,
|
|
148
151
|
})
|
|
149
152
|
return
|
|
150
153
|
}
|
|
@@ -154,7 +157,7 @@ export const confirmRecording: ConfirmRecordingType = async ({
|
|
|
154
157
|
showAlert?.({
|
|
155
158
|
message: 'You are not allowed to record all formats.',
|
|
156
159
|
type: 'danger',
|
|
157
|
-
duration:
|
|
160
|
+
duration: ALERT_DURATION,
|
|
158
161
|
})
|
|
159
162
|
return
|
|
160
163
|
}
|
|
@@ -166,7 +169,7 @@ export const confirmRecording: ConfirmRecordingType = async ({
|
|
|
166
169
|
message:
|
|
167
170
|
'Recording display type can be either video, video optimized, or media when meeting display type is media.',
|
|
168
171
|
type: 'danger',
|
|
169
|
-
duration:
|
|
172
|
+
duration: ALERT_DURATION,
|
|
170
173
|
})
|
|
171
174
|
updateRecordingDisplayType(meetingDisplayType as 'video' | 'media' | 'all')
|
|
172
175
|
return
|
|
@@ -178,7 +181,7 @@ export const confirmRecording: ConfirmRecordingType = async ({
|
|
|
178
181
|
message:
|
|
179
182
|
'Recording display type can be either video or video optimized when meeting display type is video.',
|
|
180
183
|
type: 'danger',
|
|
181
|
-
duration:
|
|
184
|
+
duration: ALERT_DURATION,
|
|
182
185
|
})
|
|
183
186
|
updateRecordingDisplayType(meetingDisplayType as 'video' | 'media' | 'all')
|
|
184
187
|
return
|
|
@@ -189,7 +192,7 @@ export const confirmRecording: ConfirmRecordingType = async ({
|
|
|
189
192
|
message:
|
|
190
193
|
'Recording display type can only be video optimized when meeting display type is video optimized.',
|
|
191
194
|
type: 'danger',
|
|
192
|
-
duration:
|
|
195
|
+
duration: ALERT_DURATION,
|
|
193
196
|
})
|
|
194
197
|
updateRecordingVideoOptimized(meetingVideoOptimized)
|
|
195
198
|
return
|
|
@@ -205,7 +208,7 @@ export const confirmRecording: ConfirmRecordingType = async ({
|
|
|
205
208
|
showAlert?.({
|
|
206
209
|
message: 'You can only record all participants with media.',
|
|
207
210
|
type: 'danger',
|
|
208
|
-
duration:
|
|
211
|
+
duration: ALERT_DURATION,
|
|
209
212
|
})
|
|
210
213
|
return
|
|
211
214
|
}
|
|
@@ -6,13 +6,13 @@ export interface RecordResumeTimerParameters {
|
|
|
6
6
|
canPauseResume: boolean
|
|
7
7
|
recordElapsedTime: number
|
|
8
8
|
recordStartTime: number
|
|
9
|
-
recordTimerInterval?:
|
|
9
|
+
recordTimerInterval?: ReturnType<typeof setInterval> | null
|
|
10
10
|
showAlert?: ShowAlert
|
|
11
11
|
recordPaused: boolean
|
|
12
12
|
recordStopped: boolean
|
|
13
13
|
roomName: string | null
|
|
14
14
|
updateRecordStartTime: (time: number) => void
|
|
15
|
-
updateRecordTimerInterval: (interval:
|
|
15
|
+
updateRecordTimerInterval: (interval: ReturnType<typeof setInterval> | null) => void
|
|
16
16
|
updateIsTimerRunning: (isRunning: boolean) => void
|
|
17
17
|
updateCanPauseResume: (canPause: boolean) => void
|
|
18
18
|
updateRecordElapsedTime: (elapsed: number) => void
|
|
@@ -2,7 +2,7 @@ import { recordUpdateTimer } from './recordUpdateTimer'
|
|
|
2
2
|
|
|
3
3
|
export interface RecordStartTimerParameters {
|
|
4
4
|
recordStartTime: number
|
|
5
|
-
recordTimerInterval?:
|
|
5
|
+
recordTimerInterval?: ReturnType<typeof setInterval> | null
|
|
6
6
|
isTimerRunning: boolean
|
|
7
7
|
canPauseResume: boolean
|
|
8
8
|
recordChangeSeconds: number
|
|
@@ -10,7 +10,7 @@ export interface RecordStartTimerParameters {
|
|
|
10
10
|
recordStopped: boolean
|
|
11
11
|
roomName: string | null
|
|
12
12
|
updateRecordStartTime: (time: number) => void
|
|
13
|
-
updateRecordTimerInterval: (interval:
|
|
13
|
+
updateRecordTimerInterval: (interval: ReturnType<typeof setInterval> | null) => void
|
|
14
14
|
updateIsTimerRunning: (isRunning: boolean) => void
|
|
15
15
|
updateCanPauseResume: (canPause: boolean) => void
|
|
16
16
|
recordElapsedTime: number
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ShowAlert } from '../../types/types';
|
|
2
|
+
|
|
3
|
+
export interface TimeLeftRecordingOptions {
|
|
4
|
+
timeLeft: number;
|
|
5
|
+
showAlert?: ShowAlert;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type TimeLeftRecordingType = (options: TimeLeftRecordingOptions) => void;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Shows a short warning that the current recording session is about to end.
|
|
12
|
+
*
|
|
13
|
+
* @param options Function options including the remaining recording time in seconds.
|
|
14
|
+
*/
|
|
15
|
+
export const timeLeftRecording = ({ timeLeft, showAlert }: TimeLeftRecordingOptions): void => {
|
|
16
|
+
try {
|
|
17
|
+
showAlert?.({
|
|
18
|
+
message: `The recording will stop in less than ${timeLeft} seconds.`,
|
|
19
|
+
duration: 3000,
|
|
20
|
+
type: 'danger',
|
|
21
|
+
});
|
|
22
|
+
} catch (error) {
|
|
23
|
+
console.log('Error in timeLeftRecording: ', error);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import type { Request, RequestResponse, ShowAlert } from '../../types/types';
|
|
2
|
+
|
|
3
|
+
export interface HostRequestResponseOptions {
|
|
4
|
+
requestResponse: RequestResponse;
|
|
5
|
+
showAlert?: ShowAlert;
|
|
6
|
+
requestList: Request[];
|
|
7
|
+
updateRequestList: (requestList: Request[]) => void;
|
|
8
|
+
updateMicAction: (action: boolean) => void;
|
|
9
|
+
updateVideoAction: (action: boolean) => void;
|
|
10
|
+
updateScreenAction: (action: boolean) => void;
|
|
11
|
+
updateChatAction: (action: boolean) => void;
|
|
12
|
+
updateAudioRequestState: (state: string | null) => void;
|
|
13
|
+
updateVideoRequestState: (state: string | null) => void;
|
|
14
|
+
updateScreenRequestState: (state: string | null) => void;
|
|
15
|
+
updateChatRequestState: (state: string | null) => void;
|
|
16
|
+
updateAudioRequestTime: (time: number) => void;
|
|
17
|
+
updateVideoRequestTime: (time: number) => void;
|
|
18
|
+
updateScreenRequestTime: (time: number) => void;
|
|
19
|
+
updateChatRequestTime: (time: number) => void;
|
|
20
|
+
updateRequestIntervalSeconds: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type HostRequestResponseType = (options: HostRequestResponseOptions) => Promise<void>;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Applies a host's response to a pending participant request.
|
|
27
|
+
*
|
|
28
|
+
* This helper removes the resolved request from the pending list, updates the
|
|
29
|
+
* caller's relevant request state, and triggers acceptance or rejection alerts
|
|
30
|
+
* with the correct retry cooldown timestamps.
|
|
31
|
+
*
|
|
32
|
+
* @param options Function options for processing the host response.
|
|
33
|
+
* @returns A promise that resolves after request state has been updated.
|
|
34
|
+
*/
|
|
35
|
+
export const hostRequestResponse = async ({
|
|
36
|
+
requestResponse,
|
|
37
|
+
showAlert,
|
|
38
|
+
requestList,
|
|
39
|
+
updateRequestList,
|
|
40
|
+
updateMicAction,
|
|
41
|
+
updateVideoAction,
|
|
42
|
+
updateScreenAction,
|
|
43
|
+
updateChatAction,
|
|
44
|
+
updateAudioRequestState,
|
|
45
|
+
updateVideoRequestState,
|
|
46
|
+
updateScreenRequestState,
|
|
47
|
+
updateChatRequestState,
|
|
48
|
+
updateAudioRequestTime,
|
|
49
|
+
updateVideoRequestTime,
|
|
50
|
+
updateScreenRequestTime,
|
|
51
|
+
updateChatRequestTime,
|
|
52
|
+
updateRequestIntervalSeconds,
|
|
53
|
+
}: HostRequestResponseOptions): Promise<void> => {
|
|
54
|
+
const filteredRequests = requestList.filter(
|
|
55
|
+
(request) =>
|
|
56
|
+
request.id !== requestResponse.id &&
|
|
57
|
+
request.icon !== requestResponse.type &&
|
|
58
|
+
request.name !== requestResponse.name &&
|
|
59
|
+
request.username !== requestResponse.username,
|
|
60
|
+
);
|
|
61
|
+
updateRequestList(filteredRequests);
|
|
62
|
+
|
|
63
|
+
const requestType = requestResponse.type;
|
|
64
|
+
|
|
65
|
+
if (requestResponse.action === 'accepted') {
|
|
66
|
+
switch (requestType) {
|
|
67
|
+
case 'fa-microphone':
|
|
68
|
+
showAlert?.({
|
|
69
|
+
message: 'Unmute request was accepted; click the mic button again to begin.',
|
|
70
|
+
type: 'success',
|
|
71
|
+
duration: 10000,
|
|
72
|
+
});
|
|
73
|
+
updateMicAction(true);
|
|
74
|
+
updateAudioRequestState('accepted');
|
|
75
|
+
break;
|
|
76
|
+
case 'fa-video':
|
|
77
|
+
showAlert?.({
|
|
78
|
+
message: 'Video request was accepted; click the video button again to begin.',
|
|
79
|
+
type: 'success',
|
|
80
|
+
duration: 10000,
|
|
81
|
+
});
|
|
82
|
+
updateVideoAction(true);
|
|
83
|
+
updateVideoRequestState('accepted');
|
|
84
|
+
break;
|
|
85
|
+
case 'fa-desktop':
|
|
86
|
+
showAlert?.({
|
|
87
|
+
message: 'Screenshare request was accepted; click the screen button again to begin.',
|
|
88
|
+
type: 'success',
|
|
89
|
+
duration: 10000,
|
|
90
|
+
});
|
|
91
|
+
updateScreenAction(true);
|
|
92
|
+
updateScreenRequestState('accepted');
|
|
93
|
+
break;
|
|
94
|
+
case 'fa-comments':
|
|
95
|
+
showAlert?.({
|
|
96
|
+
message: 'Chat request was accepted; click the chat button again to begin.',
|
|
97
|
+
type: 'success',
|
|
98
|
+
duration: 10000,
|
|
99
|
+
});
|
|
100
|
+
updateChatAction(true);
|
|
101
|
+
updateChatRequestState('accepted');
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
} else {
|
|
105
|
+
let timerDate: Date;
|
|
106
|
+
switch (requestType) {
|
|
107
|
+
case 'fa-microphone':
|
|
108
|
+
showAlert?.({
|
|
109
|
+
message: 'Unmute request was not accepted',
|
|
110
|
+
type: 'danger',
|
|
111
|
+
duration: 10000,
|
|
112
|
+
});
|
|
113
|
+
updateAudioRequestState('rejected');
|
|
114
|
+
timerDate = new Date();
|
|
115
|
+
timerDate.setSeconds(timerDate.getSeconds() + updateRequestIntervalSeconds);
|
|
116
|
+
updateAudioRequestTime(timerDate.getTime());
|
|
117
|
+
break;
|
|
118
|
+
case 'fa-video':
|
|
119
|
+
showAlert?.({
|
|
120
|
+
message: 'Video request was not accepted',
|
|
121
|
+
type: 'danger',
|
|
122
|
+
duration: 10000,
|
|
123
|
+
});
|
|
124
|
+
updateVideoRequestState('rejected');
|
|
125
|
+
timerDate = new Date();
|
|
126
|
+
timerDate.setSeconds(timerDate.getSeconds() + updateRequestIntervalSeconds);
|
|
127
|
+
updateVideoRequestTime(timerDate.getTime());
|
|
128
|
+
break;
|
|
129
|
+
case 'fa-desktop':
|
|
130
|
+
showAlert?.({
|
|
131
|
+
message: 'Screenshare request was not accepted',
|
|
132
|
+
type: 'danger',
|
|
133
|
+
duration: 10000,
|
|
134
|
+
});
|
|
135
|
+
updateScreenRequestState('rejected');
|
|
136
|
+
timerDate = new Date();
|
|
137
|
+
timerDate.setSeconds(timerDate.getSeconds() + updateRequestIntervalSeconds);
|
|
138
|
+
updateScreenRequestTime(timerDate.getTime());
|
|
139
|
+
break;
|
|
140
|
+
case 'fa-comments':
|
|
141
|
+
showAlert?.({
|
|
142
|
+
message: 'Chat request was not accepted',
|
|
143
|
+
type: 'danger',
|
|
144
|
+
duration: 10000,
|
|
145
|
+
});
|
|
146
|
+
updateChatRequestState('rejected');
|
|
147
|
+
timerDate = new Date();
|
|
148
|
+
timerDate.setSeconds(timerDate.getSeconds() + updateRequestIntervalSeconds);
|
|
149
|
+
updateChatRequestTime(timerDate.getTime());
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
};
|
|
@@ -46,7 +46,7 @@ export type ModifySettingsType = (options: ModifySettingsOptions) => Promise<voi
|
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
48
|
export async function modifySettings({
|
|
49
|
-
showAlert,
|
|
49
|
+
// showAlert,
|
|
50
50
|
roomName,
|
|
51
51
|
audioSet,
|
|
52
52
|
videoSet,
|
|
@@ -59,23 +59,23 @@ export async function modifySettings({
|
|
|
59
59
|
updateChatSetting,
|
|
60
60
|
updateIsSettingsModalVisible,
|
|
61
61
|
}: ModifySettingsOptions): Promise<void> {
|
|
62
|
-
if (roomName.toLowerCase().startsWith('d')) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
62
|
+
// if (roomName.toLowerCase().startsWith('d')) {
|
|
63
|
+
// // none should be approval
|
|
64
|
+
// if (
|
|
65
|
+
// audioSet === 'approval' ||
|
|
66
|
+
// videoSet === 'approval' ||
|
|
67
|
+
// screenshareSet === 'approval' ||
|
|
68
|
+
// chatSet === 'approval'
|
|
69
|
+
// ) {
|
|
70
|
+
// showAlert?.({
|
|
71
|
+
// message: 'You cannot set approval for demo mode.',
|
|
72
|
+
// type: 'danger',
|
|
73
|
+
// duration: 3000,
|
|
74
|
+
// });
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
76
|
+
// return;
|
|
77
|
+
// }
|
|
78
|
+
// }
|
|
79
79
|
|
|
80
80
|
// Check and update state variables based on the provided logic
|
|
81
81
|
if (audioSet) {
|