mediasfu-shared 1.0.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/LICENSE +21 -0
- package/README.md +228 -0
- package/dist/index.cjs +7707 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +7285 -0
- package/dist/index.js +7690 -0
- package/dist/index.js.map +1 -0
- package/package.json +78 -0
- package/src/ProducerClient/producerClientEmits/createDeviceClient.ts +68 -0
- package/src/consumers/addVideosGrid.ts +18 -0
- package/src/consumers/autoAdjust.ts +100 -0
- package/src/consumers/calculateRowsAndColumns.ts +51 -0
- package/src/consumers/changeVids.ts +753 -0
- package/src/consumers/checkGrid.ts +100 -0
- package/src/consumers/checkPermission.ts +89 -0
- package/src/consumers/checkScreenShare.ts +114 -0
- package/src/consumers/closeAndResize.ts +401 -0
- package/src/consumers/compareActiveNames.ts +122 -0
- package/src/consumers/compareScreenStates.ts +117 -0
- package/src/consumers/connectIps.ts +175 -0
- package/src/consumers/connectLocalIps.ts +103 -0
- package/src/consumers/connectRecvTransport.ts +158 -0
- package/src/consumers/connectSendTransport.ts +150 -0
- package/src/consumers/connectSendTransportAudio.ts +161 -0
- package/src/consumers/connectSendTransportScreen.ts +169 -0
- package/src/consumers/connectSendTransportVideo.ts +149 -0
- package/src/consumers/consumerResume.ts +25 -0
- package/src/consumers/controlMedia.ts +118 -0
- package/src/consumers/createSendTransport.ts +312 -0
- package/src/consumers/disconnectSendTransportAudio.ts +170 -0
- package/src/consumers/disconnectSendTransportScreen.ts +130 -0
- package/src/consumers/disconnectSendTransportVideo.ts +161 -0
- package/src/consumers/dispStreams.ts +694 -0
- package/src/consumers/generatePageContent.ts +118 -0
- package/src/consumers/getEstimate.ts +124 -0
- package/src/consumers/getPipedProducersAlt.ts +96 -0
- package/src/consumers/getProducersPiped.ts +89 -0
- package/src/consumers/getVideos.ts +107 -0
- package/src/consumers/mixStreams.ts +97 -0
- package/src/consumers/onScreenChanges.ts +106 -0
- package/src/consumers/prepopulateUserMedia.ts +18 -0
- package/src/consumers/processConsumerTransports.ts +157 -0
- package/src/consumers/processConsumerTransportsAudio.ts +121 -0
- package/src/consumers/rePort.ts +123 -0
- package/src/consumers/reUpdateInter.ts +289 -0
- package/src/consumers/readjust.ts +170 -0
- package/src/consumers/receiveAllPipedTransports.ts +77 -0
- package/src/consumers/receiveRoomMessages.ts +55 -0
- package/src/consumers/reorderStreams.ts +246 -0
- package/src/consumers/requestScreenShare.ts +103 -0
- package/src/consumers/resumePauseAudioStreams.ts +174 -0
- package/src/consumers/resumePauseStreams.ts +110 -0
- package/src/consumers/resumeSendTransportAudio.ts +143 -0
- package/src/consumers/signalNewConsumerTransport.ts +179 -0
- package/src/consumers/socketReceiveMethods/joinConsumeRoom.ts +130 -0
- package/src/consumers/socketReceiveMethods/newPipeProducer.ts +138 -0
- package/src/consumers/socketReceiveMethods/producerClosed.ts +102 -0
- package/src/consumers/startShareScreen.ts +124 -0
- package/src/consumers/stopShareScreen.ts +241 -0
- package/src/consumers/streamSuccessAudio.ts +297 -0
- package/src/consumers/streamSuccessAudioSwitch.ts +315 -0
- package/src/consumers/streamSuccessScreen.ts +255 -0
- package/src/consumers/streamSuccessVideo.ts +373 -0
- package/src/consumers/switchUserAudio.ts +140 -0
- package/src/consumers/switchUserVideo.ts +201 -0
- package/src/consumers/switchUserVideoAlt.ts +331 -0
- package/src/consumers/trigger.ts +250 -0
- package/src/consumers/updateMiniCardsGrid.ts +150 -0
- package/src/consumers/updateParticipantAudioDecibels.ts +56 -0
- package/src/index.ts +119 -0
- package/src/methods/background/launchBackground.ts +16 -0
- package/src/methods/breakoutRooms/breakoutRoomUpdated.ts +161 -0
- package/src/methods/breakoutRooms/handleStartBreakout.ts +96 -0
- package/src/methods/breakoutRooms/handleStopBreakout.ts +72 -0
- package/src/methods/breakoutRooms/index.ts +4 -0
- package/src/methods/breakoutRooms/launchBreakoutRooms.ts +31 -0
- package/src/methods/coHost/launchCoHost.ts +28 -0
- package/src/methods/coHostMethods/index.ts +2 -0
- package/src/methods/coHostMethods/modifyCoHostSettings.ts +94 -0
- package/src/methods/displaySettings/index.ts +1 -0
- package/src/methods/displaySettings/launchDisplaySettings.ts +31 -0
- package/src/methods/displaySettings/modifyDisplaySettings.ts +242 -0
- package/src/methods/exit/confirmExit.ts +60 -0
- package/src/methods/exit/index.ts +2 -0
- package/src/methods/exit/launchConfirmExit.ts +29 -0
- package/src/methods/index.ts +5 -0
- package/src/methods/mediaSettings/launchMediaSettings.ts +61 -0
- package/src/methods/menu/launchMenuModal.ts +28 -0
- package/src/methods/message/index.ts +1 -0
- package/src/methods/message/launchMessages.ts +27 -0
- package/src/methods/message/sendMessage.ts +175 -0
- package/src/methods/participants/index.ts +3 -0
- package/src/methods/participants/launchParticipants.ts +25 -0
- package/src/methods/participants/messageParticipants.ts +78 -0
- package/src/methods/participants/muteParticipants.ts +79 -0
- package/src/methods/participants/removeParticipants.ts +97 -0
- package/src/methods/polls/handleCreatePoll.ts +66 -0
- package/src/methods/polls/handleEndPoll.ts +64 -0
- package/src/methods/polls/handleVotePoll.ts +76 -0
- package/src/methods/polls/index.ts +3 -0
- package/src/methods/polls/launchPoll.ts +25 -0
- package/src/methods/prejoin/handleCreateRoom.ts +441 -0
- package/src/methods/prejoin/handleJoinRoom.ts +153 -0
- package/src/methods/prejoin/index.ts +14 -0
- package/src/methods/recording/checkPauseState.ts +57 -0
- package/src/methods/recording/checkResumeState.ts +42 -0
- package/src/methods/recording/confirmRecording.ts +241 -0
- package/src/methods/recording/launchRecording.ts +114 -0
- package/src/methods/recording/recordPauseTimer.ts +52 -0
- package/src/methods/recording/recordResumeTimer.ts +92 -0
- package/src/methods/recording/recordStartTimer.ts +106 -0
- package/src/methods/recording/recordUpdateTimer.ts +49 -0
- package/src/methods/recording/startRecording.ts +268 -0
- package/src/methods/recording/stopRecording.ts +124 -0
- package/src/methods/recording/updateRecording.ts +245 -0
- package/src/methods/requests/index.ts +1 -0
- package/src/methods/requests/launchRequests.ts +25 -0
- package/src/methods/requests/respondToRequests.ts +108 -0
- package/src/methods/settings/index.ts +2 -0
- package/src/methods/settings/launchSettings.ts +25 -0
- package/src/methods/settings/modifySettings.ts +99 -0
- package/src/methods/stream/clickVideo.ts +337 -0
- package/src/methods/stream/index.ts +3 -0
- package/src/methods/stream/switchAudio.ts +73 -0
- package/src/methods/stream/switchVideo.ts +148 -0
- package/src/methods/stream/switchVideoAlt.ts +152 -0
- package/src/methods/utils/checkLimitsAndMakeRequest.ts +103 -0
- package/src/methods/utils/validateAlphanumeric.ts +41 -0
- package/src/methods/waiting/index.ts +1 -0
- package/src/methods/waiting/launchWaiting.ts +26 -0
- package/src/methods/waiting/respondToWaiting.ts +82 -0
- package/src/methods/welcome/handleWelcomeRequest.ts +189 -0
- package/src/methods/welcome/index.ts +5 -0
- package/src/methods/whiteboard/handleStartWhiteboard.ts +65 -0
- package/src/methods/whiteboard/handleStopWhiteboard.ts +48 -0
- package/src/methods/whiteboard/index.ts +4 -0
- package/src/methods/whiteboard/launchConfigureWhiteboard.ts +29 -0
- package/src/producers/producerEmits/joinConRoom.ts +153 -0
- package/src/sockets/SocketManager.ts +232 -0
- package/src/types/shared-base-types.ts +752 -0
- package/src/types/types.ts +84 -0
|
@@ -0,0 +1,752 @@
|
|
|
1
|
+
import { Socket } from 'socket.io-client';
|
|
2
|
+
import type { Consumer, DtlsParameters, IceCandidate, IceParameters, ProducerCodecOptions, RtpCapabilities } from 'mediasoup-client/lib/types';
|
|
3
|
+
import type { RtpEncodingParameters } from 'mediasoup-client/lib/types';
|
|
4
|
+
|
|
5
|
+
export interface Participant {
|
|
6
|
+
id?: string;
|
|
7
|
+
audioID: string;
|
|
8
|
+
videoID: string;
|
|
9
|
+
ScreenID?: string;
|
|
10
|
+
ScreenOn?: boolean;
|
|
11
|
+
islevel?: string;
|
|
12
|
+
isAdmin?: boolean;
|
|
13
|
+
isHost?: boolean;
|
|
14
|
+
name: string;
|
|
15
|
+
muted?: boolean;
|
|
16
|
+
isBanned?: boolean;
|
|
17
|
+
isSuspended?: boolean;
|
|
18
|
+
useBoard?: boolean;
|
|
19
|
+
breakRoom?: number | null;
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface Stream {
|
|
24
|
+
producerId: string;
|
|
25
|
+
muted?: boolean;
|
|
26
|
+
stream?: MediaStream;
|
|
27
|
+
socket_?: Socket;
|
|
28
|
+
name?: string;
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface Request {
|
|
33
|
+
id: string;
|
|
34
|
+
icon: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
username?: string;
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface RequestResponse {
|
|
41
|
+
id: string;
|
|
42
|
+
icon?: string;
|
|
43
|
+
name?: string;
|
|
44
|
+
username?: string;
|
|
45
|
+
action?: string;
|
|
46
|
+
type?: string;
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface Transport {
|
|
51
|
+
producerId: string;
|
|
52
|
+
consumer: Consumer;
|
|
53
|
+
socket_: Socket;
|
|
54
|
+
serverConsumerTransportId: string;
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ScreenState {
|
|
59
|
+
mainScreenPerson?: string;
|
|
60
|
+
mainScreenProducerId?: string;
|
|
61
|
+
mainScreenFilled: boolean;
|
|
62
|
+
adminOnMainScreen: boolean;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface GridSizes {
|
|
66
|
+
gridWidth?: number;
|
|
67
|
+
gridHeight?: number;
|
|
68
|
+
altGridWidth?: number;
|
|
69
|
+
altGridHeight?: number;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface ComponentSizes {
|
|
73
|
+
mainWidth: number;
|
|
74
|
+
mainHeight: number;
|
|
75
|
+
otherWidth: number;
|
|
76
|
+
otherHeight: number;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface AudioDecibels {
|
|
80
|
+
name: string;
|
|
81
|
+
averageLoudness: number;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type ShowAlert = (options: { message: string; type: 'success' | 'danger'; duration?: number }) => void;
|
|
85
|
+
|
|
86
|
+
export interface CoHostResponsibility {
|
|
87
|
+
name: string;
|
|
88
|
+
value: boolean;
|
|
89
|
+
dedicated: boolean;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface VidCons {
|
|
93
|
+
width: number | { ideal?: number; max?: number; min?: number };
|
|
94
|
+
height: number | { ideal?: number; max?: number; min?: number };
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type Settings = [string, string, string, string];
|
|
98
|
+
|
|
99
|
+
export interface Message {
|
|
100
|
+
sender: string;
|
|
101
|
+
receivers: string[];
|
|
102
|
+
message: string;
|
|
103
|
+
timestamp: string;
|
|
104
|
+
group: boolean;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type MainSpecs = {
|
|
108
|
+
mediaOptions: string;
|
|
109
|
+
audioOptions: string;
|
|
110
|
+
videoOptions: string;
|
|
111
|
+
videoType: string;
|
|
112
|
+
videoOptimized: boolean;
|
|
113
|
+
recordingDisplayType: 'video' | 'media' | 'all';
|
|
114
|
+
addHLS: boolean;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export type DispSpecs = {
|
|
118
|
+
nameTags: boolean;
|
|
119
|
+
backgroundColor: string;
|
|
120
|
+
nameTagsColor: string;
|
|
121
|
+
orientationVideo: string;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export type TextSpecs = {
|
|
125
|
+
addText: boolean;
|
|
126
|
+
customText?: string;
|
|
127
|
+
customTextPosition?: string;
|
|
128
|
+
customTextColor?: string;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export interface UserRecordingParams {
|
|
132
|
+
mainSpecs: MainSpecs;
|
|
133
|
+
dispSpecs: DispSpecs;
|
|
134
|
+
textSpecs?: TextSpecs;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export type AltDomains = {
|
|
138
|
+
[key: string]: string;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export type RequestPermissionAudioType = () => Promise<string>;
|
|
142
|
+
export type RequestPermissionCameraType = () => Promise<string>;
|
|
143
|
+
|
|
144
|
+
export type ControlsPosition = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
145
|
+
export type InfoPosition = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
146
|
+
|
|
147
|
+
export interface Poll {
|
|
148
|
+
id: string;
|
|
149
|
+
question: string;
|
|
150
|
+
type: string;
|
|
151
|
+
options: string[];
|
|
152
|
+
votes: number[];
|
|
153
|
+
status: string;
|
|
154
|
+
voters?: Record<string, number>;
|
|
155
|
+
[key: string]: any;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface WaitingRoomParticipant {
|
|
159
|
+
name: string;
|
|
160
|
+
id: string;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface ModalPositionStyle {
|
|
164
|
+
justifyContent: string;
|
|
165
|
+
alignItems: string;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface OverlayPositionStyle {
|
|
169
|
+
top?: number;
|
|
170
|
+
left?: number;
|
|
171
|
+
right?: number;
|
|
172
|
+
bottom?: number;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export type EventType = 'conference' | 'webinar' | 'chat' | 'broadcast' | 'none';
|
|
176
|
+
|
|
177
|
+
export interface PollUpdatedData {
|
|
178
|
+
polls?: Poll[];
|
|
179
|
+
poll: Poll;
|
|
180
|
+
status: string;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface BreakoutParticipant {
|
|
184
|
+
name: string;
|
|
185
|
+
breakRoom?: number | null;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export interface BreakoutRoomUpdatedData {
|
|
189
|
+
forHost?: boolean;
|
|
190
|
+
newRoom?: number;
|
|
191
|
+
members?: Participant[];
|
|
192
|
+
breakoutRooms?: BreakoutParticipant[][];
|
|
193
|
+
status?: string;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface ConsumeSocket {
|
|
197
|
+
[ip: string]: Socket;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export interface WhiteboardUser {
|
|
201
|
+
name: string;
|
|
202
|
+
useBoard: boolean;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export interface ShapePayload {
|
|
206
|
+
type: string;
|
|
207
|
+
x1: number;
|
|
208
|
+
y1: number;
|
|
209
|
+
x2: number;
|
|
210
|
+
y2: number;
|
|
211
|
+
color: string;
|
|
212
|
+
thickness: number;
|
|
213
|
+
lineType: string;
|
|
214
|
+
[key: string]: any;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface Shapes {
|
|
218
|
+
action: string;
|
|
219
|
+
payload: ShapePayload;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export interface WhiteboardData {
|
|
223
|
+
shapes: Shapes[];
|
|
224
|
+
redoStack: Shapes[];
|
|
225
|
+
undoStack: Shapes[];
|
|
226
|
+
useImageBackground: boolean;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export type SeedData = {
|
|
230
|
+
member?: string;
|
|
231
|
+
host?: string;
|
|
232
|
+
eventType?: EventType;
|
|
233
|
+
participants?: Participant[];
|
|
234
|
+
messages?: Message[];
|
|
235
|
+
polls?: Poll[];
|
|
236
|
+
breakoutRooms?: BreakoutParticipant[][];
|
|
237
|
+
requests?: Request[];
|
|
238
|
+
waitingList?: WaitingRoomParticipant[];
|
|
239
|
+
whiteboardUsers?: WhiteboardUser[];
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
export interface MeetingRoomParams {
|
|
243
|
+
itemPageLimit: number;
|
|
244
|
+
mediaType: 'audio' | 'video';
|
|
245
|
+
addCoHost: boolean;
|
|
246
|
+
targetOrientation: 'landscape' | 'neutral' | 'portrait';
|
|
247
|
+
targetOrientationHost: 'landscape' | 'neutral' | 'portrait';
|
|
248
|
+
targetResolution: 'qhd' | 'fhd' | 'hd' | 'sd' | 'QnHD';
|
|
249
|
+
targetResolutionHost: 'qhd' | 'fhd' | 'hd' | 'sd' | 'QnHD';
|
|
250
|
+
type: EventType;
|
|
251
|
+
audioSetting: 'allow' | 'approval' | 'disallow';
|
|
252
|
+
videoSetting: 'allow' | 'approval' | 'disallow';
|
|
253
|
+
screenshareSetting: 'allow' | 'approval' | 'disallow';
|
|
254
|
+
chatSetting: 'allow' | 'disallow';
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export interface RecordingParams {
|
|
258
|
+
recordingAudioPausesLimit: number;
|
|
259
|
+
recordingAudioSupport: boolean;
|
|
260
|
+
recordingAudioPeopleLimit: number;
|
|
261
|
+
recordingAudioParticipantsTimeLimit: number;
|
|
262
|
+
recordingVideoPausesLimit: number;
|
|
263
|
+
recordingVideoSupport: boolean;
|
|
264
|
+
recordingVideoPeopleLimit: number;
|
|
265
|
+
recordingVideoParticipantsTimeLimit: number;
|
|
266
|
+
recordingAllParticipantsSupport: boolean;
|
|
267
|
+
recordingVideoParticipantsSupport: boolean;
|
|
268
|
+
recordingAllParticipantsFullRoomSupport: boolean;
|
|
269
|
+
recordingVideoParticipantsFullRoomSupport: boolean;
|
|
270
|
+
recordingPreferredOrientation: 'landscape' | 'portrait';
|
|
271
|
+
recordingSupportForOtherOrientation: boolean;
|
|
272
|
+
recordingMultiFormatsSupport: boolean;
|
|
273
|
+
recordingHLSSupport: boolean;
|
|
274
|
+
recordingAudioPausesCount?: number;
|
|
275
|
+
recordingVideoPausesCount?: number;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export interface RecordParams {
|
|
279
|
+
recordingAudioPausesLimit: number;
|
|
280
|
+
recordingAudioPausesCount: number;
|
|
281
|
+
recordingAudioSupport: boolean;
|
|
282
|
+
recordingAudioPeopleLimit: number;
|
|
283
|
+
recordingAudioParticipantsTimeLimit: number;
|
|
284
|
+
recordingVideoPausesCount: number;
|
|
285
|
+
recordingVideoPausesLimit: number;
|
|
286
|
+
recordingVideoSupport: boolean;
|
|
287
|
+
recordingVideoPeopleLimit: number;
|
|
288
|
+
recordingVideoParticipantsTimeLimit: number;
|
|
289
|
+
recordingAllParticipantsSupport: boolean;
|
|
290
|
+
recordingVideoParticipantsSupport: boolean;
|
|
291
|
+
recordingAllParticipantsFullRoomSupport: boolean;
|
|
292
|
+
recordingVideoParticipantsFullRoomSupport: boolean;
|
|
293
|
+
recordingPreferredOrientation: string;
|
|
294
|
+
recordingSupportForOtherOrientation: boolean;
|
|
295
|
+
recordingMultiFormatsSupport: boolean;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export type AParamsType = {
|
|
299
|
+
encodings: RtpEncodingParameters[];
|
|
300
|
+
codecOptions?: ProducerCodecOptions;
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
export type HParamsType = {
|
|
304
|
+
encodings: RtpEncodingParameters[];
|
|
305
|
+
codecOptions?: ProducerCodecOptions;
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
export type VParamsType = {
|
|
309
|
+
encodings: RtpEncodingParameters[];
|
|
310
|
+
codecOptions?: ProducerCodecOptions;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
export type ScreenParamsType = {
|
|
314
|
+
encodings: RtpEncodingParameters[];
|
|
315
|
+
codecOptions?: ProducerCodecOptions;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
export interface CreateRoomOptions {
|
|
319
|
+
action: 'create' | 'join';
|
|
320
|
+
meetingID: string;
|
|
321
|
+
duration: number;
|
|
322
|
+
capacity: number;
|
|
323
|
+
userName: string;
|
|
324
|
+
scheduledDate: number;
|
|
325
|
+
secureCode: string;
|
|
326
|
+
eventType: 'conference' | 'webinar' | 'chat' | 'broadcast';
|
|
327
|
+
recordOnly: boolean;
|
|
328
|
+
eventStatus: 'active' | 'inactive';
|
|
329
|
+
startIndex: number;
|
|
330
|
+
pageSize: number;
|
|
331
|
+
safeRoom: boolean;
|
|
332
|
+
autoStartSafeRoom: boolean;
|
|
333
|
+
safeRoomAction: 'warn' | 'kick' | 'ban';
|
|
334
|
+
dataBuffer: boolean;
|
|
335
|
+
bufferType: 'images' | 'audio' | 'all';
|
|
336
|
+
supportSIP: boolean;
|
|
337
|
+
directionSIP: 'inbound' | 'outbound' | 'both';
|
|
338
|
+
preferPCMA: boolean;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export interface CreateMediaSFURoomOptions {
|
|
342
|
+
action: 'create';
|
|
343
|
+
duration: number;
|
|
344
|
+
capacity: number;
|
|
345
|
+
userName: string;
|
|
346
|
+
scheduledDate?: number;
|
|
347
|
+
secureCode?: string;
|
|
348
|
+
eventType?: 'conference' | 'webinar' | 'chat' | 'broadcast';
|
|
349
|
+
meetingRoomParams?: MeetingRoomParams;
|
|
350
|
+
recordingParams?: RecordingParams;
|
|
351
|
+
recordOnly?: boolean;
|
|
352
|
+
safeRoom?: boolean;
|
|
353
|
+
autoStartSafeRoom?: boolean;
|
|
354
|
+
safeRoomAction?: 'warn' | 'kick' | 'ban';
|
|
355
|
+
dataBuffer?: boolean;
|
|
356
|
+
bufferType?: 'images' | 'audio' | 'all';
|
|
357
|
+
supportSIP?: boolean;
|
|
358
|
+
directionSIP?: 'inbound' | 'outbound' | 'both';
|
|
359
|
+
preferPCMA?: boolean;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export interface JoinMediaSFURoomOptions {
|
|
363
|
+
action: 'join';
|
|
364
|
+
meetingID: string;
|
|
365
|
+
userName: string;
|
|
366
|
+
secureCode?: string;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export interface ResponseJoinLocalRoom {
|
|
370
|
+
rtpCapabilities?: RtpCapabilities | null;
|
|
371
|
+
isHost: boolean;
|
|
372
|
+
eventStarted: boolean;
|
|
373
|
+
isBanned: boolean;
|
|
374
|
+
hostNotJoined: boolean;
|
|
375
|
+
eventRoomParams: MeetingRoomParams;
|
|
376
|
+
recordingParams: RecordingParams;
|
|
377
|
+
secureCode: string;
|
|
378
|
+
mediasfuURL: string;
|
|
379
|
+
apiKey: string;
|
|
380
|
+
apiUserName: string;
|
|
381
|
+
allowRecord: boolean;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export interface ResponseJoinRoom {
|
|
385
|
+
rtpCapabilities?: RtpCapabilities | null;
|
|
386
|
+
success: boolean;
|
|
387
|
+
roomRecvIPs: string[];
|
|
388
|
+
meetingRoomParams: MeetingRoomParams;
|
|
389
|
+
recordingParams: RecordingParams;
|
|
390
|
+
secureCode: string;
|
|
391
|
+
recordOnly: boolean;
|
|
392
|
+
isHost: boolean;
|
|
393
|
+
safeRoom: boolean;
|
|
394
|
+
autoStartSafeRoom: boolean;
|
|
395
|
+
safeRoomStarted: boolean;
|
|
396
|
+
safeRoomEnded: boolean;
|
|
397
|
+
reason?: string;
|
|
398
|
+
banned?: boolean;
|
|
399
|
+
suspended?: boolean;
|
|
400
|
+
noAdmin?: boolean;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export interface AllMembersData {
|
|
404
|
+
members: Participant[];
|
|
405
|
+
requests: Request[];
|
|
406
|
+
coHost?: string;
|
|
407
|
+
coHostResponsibilities: CoHostResponsibility[];
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export interface AllMembersRestData {
|
|
411
|
+
members: Participant[];
|
|
412
|
+
settings: Settings;
|
|
413
|
+
coHost?: string;
|
|
414
|
+
coHostResponsibilities: CoHostResponsibility[];
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export interface UserWaitingData {
|
|
418
|
+
name: string;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export interface AllWaitingRoomMembersData {
|
|
422
|
+
waitingParticipants?: WaitingRoomParticipant[];
|
|
423
|
+
waitingParticipantss?: WaitingRoomParticipant[];
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export interface BanData {
|
|
427
|
+
name: string;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export interface UpdatedCoHostData {
|
|
431
|
+
coHost: string;
|
|
432
|
+
coHostResponsibilities: CoHostResponsibility[];
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export interface ParticipantRequestedData {
|
|
436
|
+
userRequest: Request;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export interface ScreenProducerIdData {
|
|
440
|
+
producerId: string;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export interface UpdateMediaSettingsData {
|
|
444
|
+
settings: Settings;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
export interface ProducerMediaPausedData {
|
|
448
|
+
producerId: string;
|
|
449
|
+
kind: 'audio';
|
|
450
|
+
name: string;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export interface ProducerMediaResumedData {
|
|
454
|
+
kind: 'audio';
|
|
455
|
+
name: string;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export interface ProducerMediaClosedData {
|
|
459
|
+
producerId: string;
|
|
460
|
+
kind: 'audio' | 'video' | 'screenshare';
|
|
461
|
+
name: string;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export interface ControlMediaHostData {
|
|
465
|
+
type: 'all' | 'audio' | 'video' | 'screenshare';
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export interface ReceiveMessageData {
|
|
469
|
+
message: Message;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
export interface MeetingTimeRemainingData {
|
|
473
|
+
timeRemaining: number;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export interface MeetingStillThereData {
|
|
477
|
+
timeRemaining: number;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export interface UpdateConsumingDomainsData {
|
|
481
|
+
domains: string[];
|
|
482
|
+
alt_domains: AltDomains;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
export interface RecordingNoticeData {
|
|
486
|
+
state: string;
|
|
487
|
+
userRecordingParam: UserRecordingParams;
|
|
488
|
+
pauseCount: number;
|
|
489
|
+
timeDone: number;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
export interface TimeLeftRecordingData {
|
|
493
|
+
timeLeft: number;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
export interface StoppedRecordingData {
|
|
497
|
+
state: string;
|
|
498
|
+
reason?: string;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export interface HostRequestResponseData {
|
|
502
|
+
requestResponse: RequestResponse;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export interface SafeRoomNoticeData {
|
|
506
|
+
state: string;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export interface UnSafeData {
|
|
510
|
+
time: number;
|
|
511
|
+
evidence: RecordingImageData;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export interface UnsafeAlertData {
|
|
515
|
+
name: string;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export interface DataBufferNotice {
|
|
519
|
+
state: string;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export interface AudioData {
|
|
523
|
+
audioBuffer: AudioBuffer;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export interface RecordingImageData {
|
|
527
|
+
jpegBuffer: ImageData;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export type StyleDictionary = Record<string, string | number | undefined>;
|
|
531
|
+
|
|
532
|
+
export interface CustomVideoCardOptions {
|
|
533
|
+
participant: Participant;
|
|
534
|
+
stream: MediaStream | null;
|
|
535
|
+
width: number;
|
|
536
|
+
height: number;
|
|
537
|
+
imageSize?: number;
|
|
538
|
+
doMirror?: string;
|
|
539
|
+
showControls?: boolean;
|
|
540
|
+
showInfo?: boolean;
|
|
541
|
+
name?: string;
|
|
542
|
+
backgroundColor?: string;
|
|
543
|
+
onVideoPress?: () => void;
|
|
544
|
+
parameters?: any;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export interface CustomAudioCardOptions {
|
|
548
|
+
name: string;
|
|
549
|
+
barColor: boolean;
|
|
550
|
+
textColor: string;
|
|
551
|
+
imageSource: string;
|
|
552
|
+
roundedImage: boolean;
|
|
553
|
+
imageStyle?: StyleDictionary;
|
|
554
|
+
parameters?: any;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
export interface CustomMiniCardOptions {
|
|
558
|
+
initials: string;
|
|
559
|
+
fontSize: string;
|
|
560
|
+
customStyle?: boolean;
|
|
561
|
+
name: string;
|
|
562
|
+
showVideoIcon: boolean;
|
|
563
|
+
showAudioIcon: boolean;
|
|
564
|
+
imageSource: string;
|
|
565
|
+
roundedImage: boolean;
|
|
566
|
+
imageStyle?: StyleDictionary;
|
|
567
|
+
parameters?: any;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
export interface CustomPreJoinPageOptions {
|
|
571
|
+
localLink?: string;
|
|
572
|
+
connectMediaSFU?: boolean;
|
|
573
|
+
parameters: any;
|
|
574
|
+
credentials?: { apiUserName: string; apiKey: string };
|
|
575
|
+
returnUI?: boolean;
|
|
576
|
+
noUIPreJoinOptions?: CreateMediaSFURoomOptions | JoinMediaSFURoomOptions;
|
|
577
|
+
createMediaSFURoom?: any;
|
|
578
|
+
joinMediaSFURoom?: any;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
export type CustomRenderer<Result, Options> = (options: Options) => Result;
|
|
582
|
+
|
|
583
|
+
export interface ButtonTouch<TIcon = unknown, TElement = unknown> {
|
|
584
|
+
name?: string;
|
|
585
|
+
icon?: TIcon;
|
|
586
|
+
alternateIcon?: TIcon;
|
|
587
|
+
onPress?: () => void;
|
|
588
|
+
backgroundColor?: {
|
|
589
|
+
default?: string;
|
|
590
|
+
};
|
|
591
|
+
active?: boolean;
|
|
592
|
+
alternateIconComponent?: TElement;
|
|
593
|
+
iconComponent?: TElement;
|
|
594
|
+
customComponent?: TElement;
|
|
595
|
+
color?: string;
|
|
596
|
+
activeColor?: string;
|
|
597
|
+
inActiveColor?: string;
|
|
598
|
+
show?: boolean;
|
|
599
|
+
disabled?: boolean;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
export interface CustomButton<TIcon = unknown, TElement = unknown> {
|
|
603
|
+
action: () => void;
|
|
604
|
+
show: boolean;
|
|
605
|
+
backgroundColor?: string;
|
|
606
|
+
disabled?: boolean;
|
|
607
|
+
icon?: TIcon;
|
|
608
|
+
iconStyle?: Record<string, any>;
|
|
609
|
+
text?: string;
|
|
610
|
+
textStyle?: Record<string, any>;
|
|
611
|
+
customComponent?: TElement;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
export interface CustomButtonsOptions<TIcon = unknown, TElement = unknown> {
|
|
615
|
+
buttons: CustomButton<TIcon, TElement>[];
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
export interface WhiteboardUpdatedData {
|
|
619
|
+
status: 'started' | 'ended';
|
|
620
|
+
whiteboardUsers: WhiteboardUser[];
|
|
621
|
+
members: Participant[];
|
|
622
|
+
whiteboardData: WhiteboardData;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
export interface WhiteboardActionData {
|
|
626
|
+
action: string;
|
|
627
|
+
payload: ShapePayload;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
export type Shape = Shapes;
|
|
631
|
+
|
|
632
|
+
export type CreateWebRTCTransportResponse = {
|
|
633
|
+
id: string;
|
|
634
|
+
dtlsParameters: DtlsParameters;
|
|
635
|
+
iceCandidates: IceCandidate[];
|
|
636
|
+
iceParameters: IceParameters;
|
|
637
|
+
error?: string;
|
|
638
|
+
};
|
|
639
|
+
|
|
640
|
+
// Additional types needed by Vue components
|
|
641
|
+
export interface PreJoinPageParameters {
|
|
642
|
+
imgSrc?: string;
|
|
643
|
+
showAlert?: ShowAlert;
|
|
644
|
+
updateIsLoadingModalVisible: (visible: boolean) => void;
|
|
645
|
+
connectSocket: any; // ConnectSocketType - avoiding circular dependency
|
|
646
|
+
connectLocalSocket?: any; // ConnectLocalSocketType - avoiding circular dependency
|
|
647
|
+
updateSocket: (socket: Socket) => void;
|
|
648
|
+
updateLocalSocket?: (socket: Socket) => void;
|
|
649
|
+
updateValidated: (validated: boolean) => void;
|
|
650
|
+
updateApiUserName: (userName: string) => void;
|
|
651
|
+
updateApiToken: (token: string) => void;
|
|
652
|
+
updateLink: (link: string) => void;
|
|
653
|
+
updateRoomName: (roomName: string) => void;
|
|
654
|
+
updateMember: (member: string) => void;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
export interface Credentials {
|
|
658
|
+
apiUserName: string;
|
|
659
|
+
apiKey: string;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
export interface CreateJoinRoomResponse {
|
|
663
|
+
message: string;
|
|
664
|
+
roomName: string;
|
|
665
|
+
secureCode?: string;
|
|
666
|
+
publicURL: string;
|
|
667
|
+
link: string;
|
|
668
|
+
secret: string;
|
|
669
|
+
success: boolean;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
export interface CreateJoinRoomError {
|
|
673
|
+
error: string;
|
|
674
|
+
success?: boolean;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
export interface CreateJoinRoomResult {
|
|
678
|
+
data: CreateJoinRoomResponse | CreateJoinRoomError | null;
|
|
679
|
+
success: boolean;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
export type CreateJoinRoomType = (options: {
|
|
683
|
+
payload: CreateMediaSFURoomOptions | JoinMediaSFURoomOptions;
|
|
684
|
+
apiUserName: string;
|
|
685
|
+
apiKey: string;
|
|
686
|
+
localLink?: string;
|
|
687
|
+
}) => Promise<CreateJoinRoomResult>;
|
|
688
|
+
|
|
689
|
+
export type CreateRoomOnMediaSFUType = (options: {
|
|
690
|
+
payload: CreateMediaSFURoomOptions;
|
|
691
|
+
apiUserName: string;
|
|
692
|
+
apiKey: string;
|
|
693
|
+
localLink?: string;
|
|
694
|
+
}) => Promise<CreateJoinRoomResult>;
|
|
695
|
+
|
|
696
|
+
export type JoinRoomOnMediaSFUType = (options: {
|
|
697
|
+
payload: JoinMediaSFURoomOptions;
|
|
698
|
+
apiUserName: string;
|
|
699
|
+
apiKey: string;
|
|
700
|
+
localLink?: string;
|
|
701
|
+
}) => Promise<CreateJoinRoomResult>;
|
|
702
|
+
|
|
703
|
+
export interface WelcomePageParameters {
|
|
704
|
+
imgSrc?: string;
|
|
705
|
+
showAlert?: ShowAlert;
|
|
706
|
+
updateIsLoadingModalVisible: (visible: boolean) => void;
|
|
707
|
+
connectSocket: any; // ConnectSocketType - avoiding circular dependency
|
|
708
|
+
updateSocket: (socket: Socket) => void;
|
|
709
|
+
updateValidated: (validated: boolean) => void;
|
|
710
|
+
updateApiUserName: (apiUserName: string) => void;
|
|
711
|
+
updateApiToken: (apiToken: string) => void;
|
|
712
|
+
updateLink: (link: string) => void;
|
|
713
|
+
updateRoomName: (roomName: string) => void;
|
|
714
|
+
updateMember: (userName: string) => void;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
export interface PreJoinPageOptions {
|
|
718
|
+
localLink?: string;
|
|
719
|
+
connectMediaSFU?: boolean;
|
|
720
|
+
parameters: PreJoinPageParameters;
|
|
721
|
+
credentials?: Credentials;
|
|
722
|
+
returnUI?: boolean;
|
|
723
|
+
noUIPreJoinOptions?: CreateMediaSFURoomOptions | JoinMediaSFURoomOptions;
|
|
724
|
+
createMediaSFURoom?: CreateRoomOnMediaSFUType;
|
|
725
|
+
joinMediaSFURoom?: JoinRoomOnMediaSFUType;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
// ResponseLocalConnection types moved to SocketManager.ts to avoid duplicates
|
|
729
|
+
// export interface ResponseLocalConnection {
|
|
730
|
+
// socket?: Socket;
|
|
731
|
+
// data?: ResponseLocalConnectionData;
|
|
732
|
+
// }
|
|
733
|
+
|
|
734
|
+
// export interface ResponseLocalConnectionData {
|
|
735
|
+
// socketId: string;
|
|
736
|
+
// mode: string;
|
|
737
|
+
// apiUserName?: string;
|
|
738
|
+
// apiKey?: string;
|
|
739
|
+
// allowRecord: boolean;
|
|
740
|
+
// meetingRoomParams_: MeetingRoomParams;
|
|
741
|
+
// recordingParams_: RecordingParams;
|
|
742
|
+
// }
|
|
743
|
+
|
|
744
|
+
export type SleepType = (options: { ms: number }) => Promise<void>;
|
|
745
|
+
|
|
746
|
+
// Participant method types
|
|
747
|
+
export type MuteParticipantsType = (options: any) => Promise<void>;
|
|
748
|
+
export type MessageParticipantsType = (options: any) => void;
|
|
749
|
+
export type RemoveParticipantsType = (options: any) => Promise<void>;
|
|
750
|
+
|
|
751
|
+
// Consumer types - import from consumer-types file
|
|
752
|
+
|