@videosdk.live/react-sdk 0.1.77 → 0.1.79
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.js +48 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +48 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/types/index.d.ts +729 -625
- package/dist/types/meeting.d.ts +6 -0
- package/dist/types/participant.d.ts +11 -1
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
// Zujo Now <https://github.com/zujonow>
|
|
6
6
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
7
7
|
|
|
8
|
-
|
|
9
8
|
import { Connection } from './connection';
|
|
10
9
|
import { Meeting } from './meeting';
|
|
11
10
|
import { Participant } from './participant';
|
|
@@ -64,32 +63,33 @@ import { Stream } from './stream';
|
|
|
64
63
|
*
|
|
65
64
|
*/
|
|
66
65
|
export function MeetingProvider({
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
children,
|
|
67
|
+
config,
|
|
68
|
+
token,
|
|
69
|
+
joinWithoutUserInteraction,
|
|
70
|
+
reinitialiseMeetingOnConfigChange: _reinitialiseMeetingOnConfigChange,
|
|
71
|
+
deviceInfo,
|
|
73
72
|
}: {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
73
|
+
children: any;
|
|
74
|
+
config: {
|
|
75
|
+
meetingId: string;
|
|
76
|
+
autoConsume?: boolean;
|
|
77
|
+
preferredProtocol?: 'UDP_ONLY' | 'UDP_OVER_TCP';
|
|
78
|
+
participantId?: string | undefined;
|
|
79
|
+
name: string;
|
|
80
|
+
micEnabled: boolean;
|
|
81
|
+
webcamEnabled: boolean;
|
|
82
|
+
maxResolution?: 'hd' | 'sd';
|
|
83
|
+
customCameraVideoTrack?: MediaStream | undefined;
|
|
84
|
+
customMicrophoneAudioTrack?: MediaStream | undefined;
|
|
85
|
+
multiStream?: boolean;
|
|
86
|
+
mode?: 'CONFERENCE' | 'VIEWER';
|
|
87
|
+
metaData?: object;
|
|
88
|
+
};
|
|
89
|
+
token: string;
|
|
90
|
+
joinWithoutUserInteraction?: boolean;
|
|
91
|
+
reinitialiseMeetingOnConfigChange?: boolean;
|
|
92
|
+
deviceInfo?: object;
|
|
93
93
|
}): any;
|
|
94
94
|
|
|
95
95
|
/**
|
|
@@ -155,131 +155,162 @@ export function MeetingProvider({
|
|
|
155
155
|
*/
|
|
156
156
|
|
|
157
157
|
export function MeetingConsumer({
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
158
|
+
children,
|
|
159
|
+
onParticipantJoined,
|
|
160
|
+
onParticipantLeft,
|
|
161
|
+
onSpeakerChanged,
|
|
162
|
+
onPresenterChanged,
|
|
163
|
+
onMainParticipantChanged,
|
|
164
|
+
onEntryRequested,
|
|
165
|
+
onEntryResponded,
|
|
166
|
+
onRecordingStarted,
|
|
167
|
+
onRecordingStopped,
|
|
168
|
+
onChatMessage,
|
|
169
|
+
onMeetingJoined,
|
|
170
|
+
onMeetingLeft,
|
|
171
|
+
onLiveStreamStarted,
|
|
172
|
+
onLiveStreamStopped,
|
|
173
|
+
onVideoStateChanged,
|
|
174
|
+
onVideoSeeked,
|
|
175
|
+
onWebcamRequested,
|
|
176
|
+
onMicRequested,
|
|
177
|
+
onPinStateChanged,
|
|
178
|
+
onConnectionOpen,
|
|
179
|
+
onConnetionClose,
|
|
180
|
+
onSwitchMeeting,
|
|
181
|
+
onError,
|
|
182
|
+
onHlsStarted,
|
|
183
|
+
onHlsStopped,
|
|
184
|
+
onHlsStateChanged,
|
|
185
|
+
onRecordingStateChanged,
|
|
186
|
+
onLivestreamStateChanged,
|
|
187
|
+
onMeetingStateChanged,
|
|
188
|
+
onParticipantModeChanged,
|
|
189
189
|
}: {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
190
|
+
children: any;
|
|
191
|
+
onParticipantJoined?: (participant: Participant) => void;
|
|
192
|
+
onParticipantLeft?: (participant: Participant) => void;
|
|
193
|
+
onSpeakerChanged?: (activeSpeakerId: string | null) => void;
|
|
194
|
+
onPresenterChanged?: (presenterId: string | null) => void;
|
|
195
|
+
onMainParticipantChanged?: (participant: Participant) => void;
|
|
196
|
+
onEntryRequested?: ({
|
|
197
|
+
participantId,
|
|
198
|
+
name,
|
|
199
|
+
allow,
|
|
200
|
+
deny,
|
|
201
|
+
}: {
|
|
202
|
+
participantId: string;
|
|
203
|
+
name: string;
|
|
204
|
+
allow: () => void;
|
|
205
|
+
deny: () => void;
|
|
206
|
+
}) => void;
|
|
207
|
+
onEntryResponded?: ({
|
|
208
|
+
participantId,
|
|
209
|
+
decision,
|
|
210
|
+
}: {
|
|
211
|
+
participantId: string;
|
|
212
|
+
decision: string;
|
|
213
|
+
}) => void;
|
|
214
|
+
onRecordingStarted?: () => void;
|
|
215
|
+
onRecordingStopped?: () => void;
|
|
216
|
+
onChatMessage?: (data: {
|
|
217
|
+
message: string;
|
|
218
|
+
senderId: string;
|
|
219
|
+
timestamp: string;
|
|
220
|
+
senderName: string;
|
|
221
|
+
payload: object;
|
|
222
|
+
}) => void;
|
|
223
|
+
onMeetingJoined?: () => void;
|
|
224
|
+
onMeetingLeft?: () => void;
|
|
225
|
+
onLiveStreamStarted?: () => void;
|
|
226
|
+
onLiveStreamStopped?: () => void;
|
|
227
|
+
onVideoStateChanged?: () => void;
|
|
228
|
+
onVideoSeeked?: () => void;
|
|
229
|
+
onWebcamRequested?: ({
|
|
230
|
+
participantId,
|
|
231
|
+
accept,
|
|
232
|
+
reject,
|
|
233
|
+
}: {
|
|
234
|
+
participantId: string;
|
|
235
|
+
accept: () => void;
|
|
236
|
+
reject: () => void;
|
|
237
|
+
}) => void;
|
|
238
|
+
onMicRequested?: ({
|
|
239
|
+
participantId,
|
|
240
|
+
accept,
|
|
241
|
+
reject,
|
|
242
|
+
}: {
|
|
243
|
+
participantId: string;
|
|
244
|
+
accept: () => void;
|
|
245
|
+
reject: () => void;
|
|
246
|
+
}) => void;
|
|
247
|
+
onPinStateChanged?: ({
|
|
248
|
+
participantId,
|
|
249
|
+
state,
|
|
250
|
+
pinnedBy,
|
|
251
|
+
}: {
|
|
252
|
+
participantId: string;
|
|
253
|
+
state: { share: boolean; cam: boolean };
|
|
254
|
+
pinnedBy: string;
|
|
255
|
+
}) => void;
|
|
256
|
+
onConnectionOpen?: () => void;
|
|
257
|
+
onConnetionClose?: () => void;
|
|
258
|
+
onSwitchMeeting?: () => void;
|
|
259
|
+
onError?: ({ code, message }: { code: string; message: string }) => void;
|
|
260
|
+
onHlsStarted?: ({ downstreamUrl }: { downstreamUrl: string }) => void;
|
|
261
|
+
onHlsStopped?: () => void;
|
|
262
|
+
onHlsStateChanged?: ({
|
|
263
|
+
status,
|
|
264
|
+
downstreamUrl,
|
|
265
|
+
playbackHlsUrl,
|
|
266
|
+
livestreamUrl,
|
|
267
|
+
}: {
|
|
268
|
+
status:
|
|
269
|
+
| 'HLS_STARTING'
|
|
270
|
+
| 'HLS_STARTED'
|
|
271
|
+
| 'HLS_PLAYABLE'
|
|
272
|
+
| 'HLS_STOPPING'
|
|
273
|
+
| 'HLS_STOPPED';
|
|
274
|
+
downstreamUrl?: string;
|
|
275
|
+
playbackHlsUrl?: string;
|
|
276
|
+
livestreamUrl?: string;
|
|
277
|
+
}) => void;
|
|
278
|
+
onRecordingStateChanged?: ({
|
|
279
|
+
status,
|
|
280
|
+
}: {
|
|
281
|
+
status:
|
|
282
|
+
| 'RECORDING_STARTING'
|
|
283
|
+
| 'RECORDING_STARTED'
|
|
284
|
+
| 'RECORDING_STOPPING'
|
|
285
|
+
| 'RECORDING_STOPPED';
|
|
286
|
+
}) => void;
|
|
287
|
+
onLivestreamStateChanged?: ({
|
|
288
|
+
status,
|
|
289
|
+
}: {
|
|
290
|
+
status:
|
|
291
|
+
| 'LIVESTREAM_STARTING'
|
|
292
|
+
| 'LIVESTREAM_STARTED'
|
|
293
|
+
| 'LIVESTREAM_STOPPING'
|
|
294
|
+
| 'LIVESTREAM_STOPPED';
|
|
295
|
+
}) => void;
|
|
296
|
+
onMeetingStateChanged?: ({
|
|
297
|
+
state,
|
|
298
|
+
}: {
|
|
299
|
+
state:
|
|
300
|
+
| 'CONNECTING'
|
|
301
|
+
| 'CONNECTED'
|
|
302
|
+
| 'FAILED'
|
|
303
|
+
| 'DISCONNECTED'
|
|
304
|
+
| 'CLOSING'
|
|
305
|
+
| 'CLOSED';
|
|
306
|
+
}) => void;
|
|
307
|
+
onParticipantModeChanged?: ({
|
|
308
|
+
participantId,
|
|
309
|
+
mode,
|
|
310
|
+
}: {
|
|
311
|
+
participantId: string;
|
|
312
|
+
mode: 'CONFERENCE' | 'VIEWER';
|
|
313
|
+
}) => void;
|
|
283
314
|
}): any;
|
|
284
315
|
|
|
285
316
|
/**
|
|
@@ -341,119 +372,128 @@ export function MeetingConsumer({
|
|
|
341
372
|
* @returns This will return particular participant properties and method. You can refer this [API Reference](https://docs.videosdk.live/react/api/sdk-reference/use-participant/introduction)
|
|
342
373
|
*/
|
|
343
374
|
export function useParticipant(
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
375
|
+
participantId: string,
|
|
376
|
+
{
|
|
377
|
+
onStreamEnabled,
|
|
378
|
+
onStreamDisabled,
|
|
379
|
+
onMediaStatusChanged,
|
|
380
|
+
onVideoQualityChanged,
|
|
381
|
+
}?: {
|
|
382
|
+
onStreamDisabled?: (stream: Stream) => void;
|
|
383
|
+
onStreamEnabled?: (stream: Stream) => void;
|
|
384
|
+
onMediaStatusChanged?: ({
|
|
385
|
+
kind,
|
|
386
|
+
peerId,
|
|
387
|
+
newStatus,
|
|
388
|
+
}: {
|
|
389
|
+
kind: 'audio' | 'video';
|
|
390
|
+
peerId: string;
|
|
391
|
+
newStatus: boolean;
|
|
392
|
+
}) => void;
|
|
393
|
+
onVideoQualityChanged?: ({
|
|
394
|
+
peerId,
|
|
395
|
+
prevQuality,
|
|
396
|
+
currentQuality,
|
|
397
|
+
}: {
|
|
398
|
+
peerId: string;
|
|
399
|
+
prevQuality: 'low' | 'med' | 'high';
|
|
400
|
+
currentQuality: 'low' | 'med' | 'high';
|
|
401
|
+
}) => void;
|
|
402
|
+
},
|
|
372
403
|
): {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
404
|
+
displayName: string;
|
|
405
|
+
participant: Participant;
|
|
406
|
+
webcamStream: Stream;
|
|
407
|
+
micStream: Stream;
|
|
408
|
+
screenShareStream: Stream;
|
|
409
|
+
screenShareAudioStream: Stream;
|
|
410
|
+
webcamOn: boolean;
|
|
411
|
+
micOn: boolean;
|
|
412
|
+
screenShareOn: boolean;
|
|
413
|
+
isLocal: boolean;
|
|
414
|
+
isActiveSpeaker: boolean;
|
|
415
|
+
isMainParticipant: boolean;
|
|
416
|
+
pinState: any;
|
|
417
|
+
mode: 'CONFERENCE' | 'VIEWER';
|
|
418
|
+
consumeMicStreams: () => void;
|
|
419
|
+
consumeWebcamStreams: () => void;
|
|
420
|
+
stopConsumingMicStreams: () => void;
|
|
421
|
+
stopConsumingWebcamStreams: () => void;
|
|
422
|
+
setQuality: (quality: 'low' | 'med' | 'high') => void;
|
|
423
|
+
setViewPort: (width: number, height: number) => void;
|
|
424
|
+
enableMic: () => void;
|
|
425
|
+
disableMic: () => void;
|
|
426
|
+
enableWebcam: () => void;
|
|
427
|
+
disableWebcam: () => void;
|
|
428
|
+
remove: () => void;
|
|
429
|
+
captureImage: ({ height, width }: { height?: number, width?: number }) => Promise<string | null>;
|
|
430
|
+
pin: (data: 'SHARE_AND_CAM' | 'CAM' | 'SHARE') => void;
|
|
431
|
+
unpin: (data: 'SHARE_AND_CAM' | 'CAM' | 'SHARE') => void;
|
|
432
|
+
switchTo: ({
|
|
433
|
+
meetingId,
|
|
434
|
+
payload,
|
|
435
|
+
token,
|
|
436
|
+
}: {
|
|
437
|
+
meetingId: string;
|
|
438
|
+
payload: string;
|
|
439
|
+
token: string;
|
|
440
|
+
}) => Promise<void>;
|
|
441
|
+
getAudioStats: () => Promise<
|
|
442
|
+
Array<{
|
|
443
|
+
bitrate: number;
|
|
444
|
+
rtt: number;
|
|
445
|
+
network: string;
|
|
446
|
+
codec: string;
|
|
447
|
+
jitter: number;
|
|
448
|
+
limitation: any;
|
|
449
|
+
totalPackets: number;
|
|
450
|
+
packetsLost: number;
|
|
451
|
+
concealmentEvents: number;
|
|
452
|
+
insertedSamplesForDecelaration: number;
|
|
453
|
+
removedSamplesForAccelaration: number;
|
|
454
|
+
size: any;
|
|
455
|
+
}>
|
|
456
|
+
>;
|
|
457
|
+
getVideoStats: () => Promise<
|
|
458
|
+
Array<{
|
|
459
|
+
bitrate: number;
|
|
460
|
+
rtt: number;
|
|
461
|
+
network: string;
|
|
462
|
+
codec: string;
|
|
463
|
+
jitter: number;
|
|
464
|
+
limitation: any;
|
|
465
|
+
totalPackets: number;
|
|
466
|
+
packetsLost: number;
|
|
467
|
+
concealmentEvents: number;
|
|
468
|
+
insertedSamplesForDecelaration: number;
|
|
469
|
+
removedSamplesForAccelaration: number;
|
|
470
|
+
size: any;
|
|
471
|
+
currentSpatialLayer: number;
|
|
472
|
+
currentTemporalLayer: number;
|
|
473
|
+
preferredSpatialLayer: number;
|
|
474
|
+
preferredTemporalLayer: number;
|
|
475
|
+
}>
|
|
476
|
+
>;
|
|
477
|
+
getShareStats: () => Promise<
|
|
478
|
+
Array<{
|
|
479
|
+
bitrate: number;
|
|
480
|
+
rtt: number;
|
|
481
|
+
network: string;
|
|
482
|
+
codec: string;
|
|
483
|
+
jitter: number;
|
|
484
|
+
limitation: any;
|
|
485
|
+
totalPackets: number;
|
|
486
|
+
packetsLost: number;
|
|
487
|
+
concealmentEvents: number;
|
|
488
|
+
insertedSamplesForDecelaration: number;
|
|
489
|
+
removedSamplesForAccelaration: number;
|
|
490
|
+
size: any;
|
|
491
|
+
currentSpatialLayer: number;
|
|
492
|
+
currentTemporalLayer: number;
|
|
493
|
+
preferredSpatialLayer: number;
|
|
494
|
+
preferredTemporalLayer: number;
|
|
495
|
+
}>
|
|
496
|
+
>;
|
|
457
497
|
};
|
|
458
498
|
|
|
459
499
|
/**
|
|
@@ -520,232 +560,270 @@ export function useParticipant(
|
|
|
520
560
|
*/
|
|
521
561
|
|
|
522
562
|
export function useMeeting({
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
563
|
+
onParticipantJoined,
|
|
564
|
+
onParticipantLeft,
|
|
565
|
+
onSpeakerChanged,
|
|
566
|
+
onPresenterChanged,
|
|
567
|
+
onMainParticipantChanged,
|
|
568
|
+
onEntryRequested,
|
|
569
|
+
onEntryResponded,
|
|
570
|
+
onRecordingStarted,
|
|
571
|
+
onRecordingStopped,
|
|
572
|
+
onChatMessage,
|
|
573
|
+
onMeetingJoined,
|
|
574
|
+
onMeetingLeft,
|
|
575
|
+
onLiveStreamStarted,
|
|
576
|
+
onLiveStreamStopped,
|
|
577
|
+
onVideoStateChanged,
|
|
578
|
+
onVideoSeeked,
|
|
579
|
+
onWebcamRequested,
|
|
580
|
+
onMicRequested,
|
|
581
|
+
onPinStateChanged,
|
|
582
|
+
onConnectionOpen,
|
|
583
|
+
onConnetionClose,
|
|
584
|
+
onSwitchMeeting,
|
|
585
|
+
onError,
|
|
586
|
+
onHlsStarted,
|
|
587
|
+
onHlsStopped,
|
|
588
|
+
onHlsStateChanged,
|
|
589
|
+
onRecordingStateChanged,
|
|
590
|
+
onLivestreamStateChanged,
|
|
591
|
+
onMeetingStateChanged,
|
|
592
|
+
onParticipantModeChanged,
|
|
553
593
|
}?: {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
594
|
+
onParticipantJoined?: (participant: Participant) => void;
|
|
595
|
+
onParticipantLeft?: (participant: Participant) => void;
|
|
596
|
+
onSpeakerChanged?: (activeSpeakerId: string | null) => void;
|
|
597
|
+
onPresenterChanged?: (presenterId: string | null) => void;
|
|
598
|
+
onMainParticipantChanged?: (participant: Participant) => void;
|
|
599
|
+
onEntryRequested?: ({
|
|
600
|
+
participantId,
|
|
601
|
+
name,
|
|
602
|
+
allow,
|
|
603
|
+
deny,
|
|
604
|
+
}: {
|
|
605
|
+
participantId: string;
|
|
606
|
+
name: string;
|
|
607
|
+
allow: () => void;
|
|
608
|
+
deny: () => void;
|
|
609
|
+
}) => void;
|
|
610
|
+
onEntryResponded?: ({
|
|
611
|
+
participantId,
|
|
612
|
+
decision,
|
|
613
|
+
}: {
|
|
614
|
+
participantId: string;
|
|
615
|
+
decision: string;
|
|
616
|
+
}) => void;
|
|
617
|
+
onRecordingStarted?: () => void;
|
|
618
|
+
onRecordingStopped?: () => void;
|
|
619
|
+
onChatMessage?: (data: {
|
|
620
|
+
message: string;
|
|
621
|
+
senderId: string;
|
|
622
|
+
timestamp: string;
|
|
623
|
+
senderName: string;
|
|
624
|
+
payload: object;
|
|
625
|
+
}) => void;
|
|
626
|
+
onMeetingJoined?: () => void;
|
|
627
|
+
onMeetingLeft?: () => void;
|
|
628
|
+
onLiveStreamStarted?: () => void;
|
|
629
|
+
onLiveStreamStopped?: () => void;
|
|
630
|
+
onVideoStateChanged?: () => void;
|
|
631
|
+
onVideoSeeked?: () => void;
|
|
632
|
+
onWebcamRequested?: ({
|
|
633
|
+
participantId,
|
|
634
|
+
accept,
|
|
635
|
+
reject,
|
|
636
|
+
}: {
|
|
637
|
+
participantId: string;
|
|
638
|
+
accept: () => void;
|
|
639
|
+
reject: () => void;
|
|
640
|
+
}) => void;
|
|
641
|
+
onMicRequested?: ({
|
|
642
|
+
participantId,
|
|
643
|
+
accept,
|
|
644
|
+
reject,
|
|
645
|
+
}: {
|
|
646
|
+
participantId: string;
|
|
647
|
+
accept: () => void;
|
|
648
|
+
reject: () => void;
|
|
649
|
+
}) => void;
|
|
650
|
+
onPinStateChanged?: ({
|
|
651
|
+
participantId,
|
|
652
|
+
state,
|
|
653
|
+
pinnedBy,
|
|
654
|
+
}: {
|
|
655
|
+
participantId: string;
|
|
656
|
+
state: { share: boolean; cam: boolean };
|
|
657
|
+
pinnedBy: string;
|
|
658
|
+
}) => void;
|
|
659
|
+
onConnectionOpen?: () => void;
|
|
660
|
+
onConnetionClose?: () => void;
|
|
661
|
+
onSwitchMeeting?: () => void;
|
|
662
|
+
onError?: ({ code, message }: { code: string; message: string }) => void;
|
|
663
|
+
onHlsStarted?: ({ downstreamUrl }: { downstreamUrl: string }) => void;
|
|
664
|
+
onHlsStopped?: () => void;
|
|
665
|
+
onHlsStateChanged?: ({
|
|
666
|
+
status,
|
|
667
|
+
downstreamUrl,
|
|
668
|
+
playbackHlsUrl,
|
|
669
|
+
livestreamUrl,
|
|
670
|
+
}: {
|
|
671
|
+
status:
|
|
672
|
+
| 'HLS_STARTING'
|
|
673
|
+
| 'HLS_STARTED'
|
|
674
|
+
| 'HLS_PLAYABLE'
|
|
675
|
+
| 'HLS_STOPPING'
|
|
676
|
+
| 'HLS_STOPPED';
|
|
677
|
+
downstreamUrl?: string;
|
|
678
|
+
playbackHlsUrl?: string;
|
|
679
|
+
livestreamUrl?: string;
|
|
680
|
+
}) => void;
|
|
681
|
+
onRecordingStateChanged?: ({
|
|
682
|
+
status,
|
|
683
|
+
}: {
|
|
684
|
+
status:
|
|
685
|
+
| 'RECORDING_STARTING'
|
|
686
|
+
| 'RECORDING_STARTED'
|
|
687
|
+
| 'RECORDING_STOPPING'
|
|
688
|
+
| 'RECORDING_STOPPED';
|
|
689
|
+
}) => void;
|
|
690
|
+
onLivestreamStateChanged?: ({
|
|
691
|
+
status,
|
|
692
|
+
}: {
|
|
693
|
+
status:
|
|
694
|
+
| 'LIVESTREAM_STARTING'
|
|
695
|
+
| 'LIVESTREAM_STARTED'
|
|
696
|
+
| 'LIVESTREAM_STOPPING'
|
|
697
|
+
| 'LIVESTREAM_STOPPED';
|
|
698
|
+
}) => void;
|
|
699
|
+
onMeetingStateChanged?: ({
|
|
700
|
+
state,
|
|
701
|
+
}: {
|
|
702
|
+
state:
|
|
703
|
+
| 'CONNECTING'
|
|
704
|
+
| 'CONNECTED'
|
|
705
|
+
| 'FAILED'
|
|
706
|
+
| 'DISCONNECTED'
|
|
707
|
+
| 'CLOSING'
|
|
708
|
+
| 'CLOSED';
|
|
709
|
+
}) => void;
|
|
710
|
+
onParticipantModeChanged?: ({
|
|
711
|
+
participantId,
|
|
712
|
+
mode,
|
|
713
|
+
}: {
|
|
714
|
+
participantId: string;
|
|
715
|
+
mode: 'CONFERENCE' | 'VIEWER';
|
|
716
|
+
}) => void;
|
|
646
717
|
}): {
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
718
|
+
meetingId: string;
|
|
719
|
+
meeting: Meeting;
|
|
720
|
+
localParticipant: Participant;
|
|
721
|
+
activeSpeakerId: string;
|
|
722
|
+
participants: Map<string, Participant>;
|
|
723
|
+
pinnedParticipants: Map<
|
|
724
|
+
string,
|
|
725
|
+
{
|
|
726
|
+
cam: boolean;
|
|
727
|
+
share: boolean;
|
|
728
|
+
}
|
|
729
|
+
>;
|
|
730
|
+
presenterId?: string;
|
|
731
|
+
localMicOn: boolean;
|
|
732
|
+
localWebcamOn: boolean;
|
|
733
|
+
isRecording: boolean;
|
|
734
|
+
recordingState: string;
|
|
735
|
+
livestreamState: string;
|
|
736
|
+
hlsState: string;
|
|
737
|
+
hlsUrls: {
|
|
738
|
+
downstreamUrl: string;
|
|
739
|
+
playbackHlsUrl: string;
|
|
740
|
+
livestreamUrl: string;
|
|
741
|
+
};
|
|
742
|
+
localScreenShareOn: boolean;
|
|
743
|
+
connections: Map<string, Connection>;
|
|
744
|
+
join: () => void;
|
|
745
|
+
leave: () => void;
|
|
746
|
+
end: () => void;
|
|
747
|
+
unmuteMic: (customAudioTrack?: MediaStream | undefined) => void;
|
|
748
|
+
muteMic: () => void;
|
|
749
|
+
toggleMic: (customAudioTrack?: MediaStream | undefined) => void;
|
|
750
|
+
enableWebcam: (customVideoTrack?: MediaStream | undefined) => void;
|
|
751
|
+
disableWebcam: () => void;
|
|
752
|
+
toggleWebcam: (customVideoTrack?: MediaStream | undefined) => void;
|
|
753
|
+
enableScreenShare: (customScreenShareTrack?: MediaStream | undefined) => void;
|
|
754
|
+
disableScreenShare: () => void;
|
|
755
|
+
toggleScreenShare: (customScreenShareTrack?: MediaStream | undefined) => void;
|
|
756
|
+
startRecording: (
|
|
757
|
+
webhookUrl?: string,
|
|
758
|
+
awsDirPath?: string,
|
|
759
|
+
config?: {
|
|
760
|
+
layout: {
|
|
761
|
+
type: 'GRID' | 'SPOTLIGHT' | 'SIDEBAR';
|
|
762
|
+
priority: 'SPEAKER' | 'PIN';
|
|
763
|
+
gridSize: number;
|
|
764
|
+
};
|
|
765
|
+
orientation: 'landscape' | 'portrait';
|
|
766
|
+
theme: 'DEFAULT' | 'DARK' | 'LIGHT';
|
|
767
|
+
quality: 'low' | 'med' | 'high';
|
|
768
|
+
mode: 'video-and-audio' | 'audio';
|
|
769
|
+
},
|
|
770
|
+
) => void;
|
|
771
|
+
stopRecording: () => void;
|
|
772
|
+
startLiveStream: (
|
|
773
|
+
outputs: Array<{
|
|
774
|
+
url: string;
|
|
775
|
+
streamKey: string;
|
|
776
|
+
}>,
|
|
777
|
+
config?: {
|
|
778
|
+
layout: {
|
|
779
|
+
type: 'GRID' | 'SPOTLIGHT' | 'SIDEBAR';
|
|
780
|
+
priority: 'SPEAKER' | 'PIN';
|
|
781
|
+
gridSize: number;
|
|
782
|
+
};
|
|
783
|
+
theme: 'DEFAULT' | 'DARK' | 'LIGHT';
|
|
784
|
+
},
|
|
785
|
+
) => void;
|
|
786
|
+
stopLiveStream: () => void;
|
|
787
|
+
startHls: (config?: {
|
|
788
|
+
layout: {
|
|
789
|
+
type: 'GRID' | 'SPOTLIGHT' | 'SIDEBAR';
|
|
790
|
+
priority: 'SPEAKER' | 'PIN';
|
|
791
|
+
gridSize: number;
|
|
670
792
|
};
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
}>,
|
|
706
|
-
config?: {
|
|
707
|
-
layout: {
|
|
708
|
-
type: 'GRID' | 'SPOTLIGHT' | 'SIDEBAR';
|
|
709
|
-
priority: 'SPEAKER' | 'PIN';
|
|
710
|
-
gridSize: number;
|
|
711
|
-
};
|
|
712
|
-
theme: 'DEFAULT' | 'DARK' | 'LIGHT';
|
|
713
|
-
},
|
|
714
|
-
) => void;
|
|
715
|
-
stopLiveStream: () => void;
|
|
716
|
-
startHls: (config?: {
|
|
717
|
-
layout: {
|
|
718
|
-
type: 'GRID' | 'SPOTLIGHT' | 'SIDEBAR';
|
|
719
|
-
priority: 'SPEAKER' | 'PIN';
|
|
720
|
-
gridSize: number;
|
|
721
|
-
};
|
|
722
|
-
orientation: 'landscape' | 'portrait';
|
|
723
|
-
theme: 'DEFAULT' | 'DARK' | 'LIGHT';
|
|
724
|
-
quality: 'low' | 'med' | 'high';
|
|
725
|
-
mode: 'video-and-audio' | 'audio';
|
|
726
|
-
}) => void;
|
|
727
|
-
stopHls: () => void;
|
|
728
|
-
getMics: () => Promise<
|
|
729
|
-
Array<{
|
|
730
|
-
deviceId: string;
|
|
731
|
-
label: string;
|
|
732
|
-
}>
|
|
733
|
-
>;
|
|
734
|
-
getWebcams: () => Promise<
|
|
735
|
-
Array<{
|
|
736
|
-
deviceId: string;
|
|
737
|
-
label: string;
|
|
738
|
-
facingMode: 'environment' | 'front';
|
|
739
|
-
}>
|
|
740
|
-
>;
|
|
741
|
-
changeMic: (object: string | MediaStream) => void;
|
|
742
|
-
changeWebcam: (object: string | MediaStream) => void;
|
|
743
|
-
startVideo: ({ link }: { link: string }) => void;
|
|
744
|
-
stopVideo: () => void;
|
|
745
|
-
pauseVideo: ({ currentTime }: { currentTime: number }) => void;
|
|
746
|
-
resumeVideo: () => void;
|
|
747
|
-
seekVideo: ({ currentTime }: { currentTime: number }) => void;
|
|
748
|
-
connectTo: ({ meetingId, payload }: { meetingId: string; payload: string }) => void;
|
|
793
|
+
orientation: 'landscape' | 'portrait';
|
|
794
|
+
theme: 'DEFAULT' | 'DARK' | 'LIGHT';
|
|
795
|
+
quality: 'low' | 'med' | 'high';
|
|
796
|
+
mode: 'video-and-audio' | 'audio';
|
|
797
|
+
}) => void;
|
|
798
|
+
stopHls: () => void;
|
|
799
|
+
getMics: () => Promise<
|
|
800
|
+
Array<{
|
|
801
|
+
deviceId: string;
|
|
802
|
+
label: string;
|
|
803
|
+
}>
|
|
804
|
+
>;
|
|
805
|
+
getWebcams: () => Promise<
|
|
806
|
+
Array<{
|
|
807
|
+
deviceId: string;
|
|
808
|
+
label: string;
|
|
809
|
+
facingMode: 'environment' | 'front';
|
|
810
|
+
}>
|
|
811
|
+
>;
|
|
812
|
+
changeMic: (object: string | MediaStream) => void;
|
|
813
|
+
changeWebcam: (object: string | MediaStream) => void;
|
|
814
|
+
changeMode(mode: 'CONFERENCE' | 'VIEWER'): void;
|
|
815
|
+
startVideo: ({ link }: { link: string }) => void;
|
|
816
|
+
stopVideo: () => void;
|
|
817
|
+
pauseVideo: ({ currentTime }: { currentTime: number }) => void;
|
|
818
|
+
resumeVideo: () => void;
|
|
819
|
+
seekVideo: ({ currentTime }: { currentTime: number }) => void;
|
|
820
|
+
connectTo: ({
|
|
821
|
+
meetingId,
|
|
822
|
+
payload,
|
|
823
|
+
}: {
|
|
824
|
+
meetingId: string;
|
|
825
|
+
payload: string;
|
|
826
|
+
}) => void;
|
|
749
827
|
};
|
|
750
828
|
|
|
751
829
|
/**
|
|
@@ -777,49 +855,69 @@ export function useMeeting({
|
|
|
777
855
|
* ```
|
|
778
856
|
*/
|
|
779
857
|
export function usePubSub(
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
message: string;
|
|
797
|
-
senderId: string;
|
|
798
|
-
senderName: string;
|
|
799
|
-
timestamp: string;
|
|
800
|
-
topic: string;
|
|
801
|
-
}>,
|
|
802
|
-
) => void;
|
|
803
|
-
},
|
|
804
|
-
): {
|
|
805
|
-
publish: (
|
|
806
|
-
message: string,
|
|
807
|
-
{
|
|
808
|
-
persist: boolean,
|
|
809
|
-
}: {
|
|
810
|
-
persist: any;
|
|
811
|
-
},
|
|
812
|
-
) => void;
|
|
813
|
-
messages: Array<{
|
|
858
|
+
topic: string,
|
|
859
|
+
{
|
|
860
|
+
onMessageReceived,
|
|
861
|
+
onOldMessagesReceived,
|
|
862
|
+
}?: {
|
|
863
|
+
onMessageReceived?: (message: {
|
|
864
|
+
id: string;
|
|
865
|
+
message: string;
|
|
866
|
+
senderId: string;
|
|
867
|
+
senderName: string;
|
|
868
|
+
timestamp: string;
|
|
869
|
+
topic: string;
|
|
870
|
+
payload: object;
|
|
871
|
+
}) => void;
|
|
872
|
+
onOldMessagesReceived?: (
|
|
873
|
+
messages: Array<{
|
|
814
874
|
id: string;
|
|
815
875
|
message: string;
|
|
816
876
|
senderId: string;
|
|
817
877
|
senderName: string;
|
|
818
878
|
timestamp: string;
|
|
819
879
|
topic: string;
|
|
820
|
-
|
|
880
|
+
payload: object;
|
|
881
|
+
}>,
|
|
882
|
+
) => void;
|
|
883
|
+
},
|
|
884
|
+
): {
|
|
885
|
+
publish: (
|
|
886
|
+
message: string,
|
|
887
|
+
{
|
|
888
|
+
persist,
|
|
889
|
+
sendOnly,
|
|
890
|
+
}: {
|
|
891
|
+
persist: boolean;
|
|
892
|
+
sendOnly?: Array<String>;
|
|
893
|
+
},
|
|
894
|
+
payload?: object,
|
|
895
|
+
) => void;
|
|
896
|
+
messages: Array<{
|
|
897
|
+
id: string;
|
|
898
|
+
message: string;
|
|
899
|
+
senderId: string;
|
|
900
|
+
senderName: string;
|
|
901
|
+
timestamp: string;
|
|
902
|
+
topic: string;
|
|
903
|
+
payload: object;
|
|
904
|
+
}>;
|
|
821
905
|
};
|
|
822
906
|
|
|
907
|
+
export function useFile(): {
|
|
908
|
+
uploadBase64File: ({ base64Data, token, fileName }: {
|
|
909
|
+
base64Data: string;
|
|
910
|
+
token: string;
|
|
911
|
+
fileName: string;
|
|
912
|
+
}) => Promise<string | null>;
|
|
913
|
+
|
|
914
|
+
fetchBase64File: ({ url, token }: {
|
|
915
|
+
url: string;
|
|
916
|
+
token: string;
|
|
917
|
+
}) => Promise<string | null>;
|
|
918
|
+
};
|
|
919
|
+
|
|
920
|
+
|
|
823
921
|
/**
|
|
824
922
|
* @param microphoneId - It will be the id of the mic from which the audio should be captured.
|
|
825
923
|
* ---
|
|
@@ -853,26 +951,26 @@ export function usePubSub(
|
|
|
853
951
|
*/
|
|
854
952
|
|
|
855
953
|
export function createMicrophoneAudioTrack({
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
954
|
+
noiseConfig,
|
|
955
|
+
encoderConfig,
|
|
956
|
+
microphoneId,
|
|
859
957
|
}: {
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
958
|
+
noiseConfig?:
|
|
959
|
+
| {
|
|
960
|
+
echoCancellation: boolean;
|
|
961
|
+
autoGainControl: boolean;
|
|
962
|
+
noiseSuppression: boolean;
|
|
963
|
+
}
|
|
964
|
+
| undefined;
|
|
965
|
+
encoderConfig?:
|
|
966
|
+
| 'speech_low_quality'
|
|
967
|
+
| 'speech_standard'
|
|
968
|
+
| 'music_standard'
|
|
969
|
+
| 'standard_stereo'
|
|
970
|
+
| 'high_quality'
|
|
971
|
+
| 'high_quality_stereo'
|
|
972
|
+
| undefined;
|
|
973
|
+
microphoneId?: string | undefined;
|
|
876
974
|
}): Promise<MediaStream>;
|
|
877
975
|
|
|
878
976
|
/**
|
|
@@ -910,36 +1008,36 @@ export function createMicrophoneAudioTrack({
|
|
|
910
1008
|
* ```
|
|
911
1009
|
*/
|
|
912
1010
|
export function createCameraVideoTrack({
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
1011
|
+
cameraId,
|
|
1012
|
+
encoderConfig,
|
|
1013
|
+
facingMode,
|
|
1014
|
+
optimizationMode,
|
|
1015
|
+
multiStream,
|
|
918
1016
|
}: {
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
1017
|
+
cameraId?: string | undefined;
|
|
1018
|
+
encoderConfig?:
|
|
1019
|
+
| 'h90p_w160p'
|
|
1020
|
+
| 'h180p_w320p'
|
|
1021
|
+
| 'h216p_w384p'
|
|
1022
|
+
| 'h360p_w640p'
|
|
1023
|
+
| 'h540p_w960p'
|
|
1024
|
+
| 'h720p_w1280p'
|
|
1025
|
+
| 'h1080p_w1920p'
|
|
1026
|
+
| 'h1440p_w2560p'
|
|
1027
|
+
| 'h2160p_w3840p'
|
|
1028
|
+
| 'h120p_w160p'
|
|
1029
|
+
| 'h180p_w240p'
|
|
1030
|
+
| 'h240p_w320p'
|
|
1031
|
+
| 'h360p_w480p'
|
|
1032
|
+
| 'h480p_w640p'
|
|
1033
|
+
| 'h540p_w720p'
|
|
1034
|
+
| 'h720p_w960p'
|
|
1035
|
+
| 'h1080p_w1440p'
|
|
1036
|
+
| 'h1440p_w1920p'
|
|
1037
|
+
| undefined;
|
|
1038
|
+
facingMode?: 'user' | 'environment' | undefined;
|
|
1039
|
+
optimizationMode?: 'text' | 'motion' | 'detail' | undefined;
|
|
1040
|
+
multiStream?: boolean;
|
|
943
1041
|
}): Promise<MediaStream>;
|
|
944
1042
|
|
|
945
1043
|
/**
|
|
@@ -969,65 +1067,71 @@ export function createCameraVideoTrack({
|
|
|
969
1067
|
* ```
|
|
970
1068
|
*/
|
|
971
1069
|
export function createScreenShareVideoTrack({
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1070
|
+
encoderConfig,
|
|
1071
|
+
optimizationMode,
|
|
1072
|
+
withAudio,
|
|
975
1073
|
}: {
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1074
|
+
encoderConfig?:
|
|
1075
|
+
| 'h360p_30fps'
|
|
1076
|
+
| 'h720p_5fps'
|
|
1077
|
+
| 'h720p_15fps'
|
|
1078
|
+
| 'h1080p_15fps'
|
|
1079
|
+
| 'h1080p_30fps'
|
|
1080
|
+
| undefined;
|
|
1081
|
+
optimizationMode?: 'text' | 'motion' | 'detail' | undefined;
|
|
1082
|
+
withAudio?: 'enable' | 'disable';
|
|
979
1083
|
}): Promise<MediaStream>;
|
|
980
1084
|
|
|
981
1085
|
export const Constants: {
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1086
|
+
errors: {
|
|
1087
|
+
INVALID_API_KEY: number;
|
|
1088
|
+
INVALID_TOKEN: number;
|
|
1089
|
+
INVALID_MEETING_ID: number;
|
|
1090
|
+
INVALID_PARTICIPANT_ID: number;
|
|
1091
|
+
DUPLICATE_PARTICIPANT: number;
|
|
1092
|
+
ACCOUNT_DEACTIVATED: number;
|
|
1093
|
+
ACCOUNT_DISCONTINUED: number;
|
|
1094
|
+
INVALID_PERMISSIONS: number;
|
|
1095
|
+
MAX_PARTCIPANT_REACHED: number;
|
|
1096
|
+
MAX_SPEAKER_REACHED: number;
|
|
1097
|
+
START_RECORDING_FAILED: number;
|
|
1098
|
+
STOP_RECORDING_FAILED: number;
|
|
1099
|
+
START_LIVESTREAM_FAILED: number;
|
|
1100
|
+
STOP_LIVESTREAM_FAILED: number;
|
|
1101
|
+
INVALID_LIVESTREAM_CONFIG: number;
|
|
1102
|
+
START_HLS_FAILED: number;
|
|
1103
|
+
STOP_HLS_FAILED: number;
|
|
1104
|
+
RECORDING_FAILED: number;
|
|
1105
|
+
LIVESTREAM_FAILED: number;
|
|
1106
|
+
HLS_FAILED: number;
|
|
1107
|
+
ERROR_GET_VIDEO_MEDIA: number;
|
|
1108
|
+
ERROR_GET_AUDIO_MEDIA: number;
|
|
1109
|
+
ERROR_GET_DISPLAY_MEDIA: number;
|
|
1110
|
+
ERROR_GET_VIDEO_MEDIA_PERMISSION_DENIED: number;
|
|
1111
|
+
ERROR_GET_AUDIO_MEDIA_PERMISSION_DENIED: number;
|
|
1112
|
+
ERROR_GET_DISPLAY_MEDIA_PERMISSION_DENIED: number;
|
|
1113
|
+
};
|
|
1114
|
+
recordingEvents: {
|
|
1115
|
+
RECORDING_STARTING: string;
|
|
1116
|
+
RECORDING_STARTED: string;
|
|
1117
|
+
RECORDING_STOPPING: string;
|
|
1118
|
+
RECORDING_STOPPED: string;
|
|
1119
|
+
};
|
|
1120
|
+
livestreamEvents: {
|
|
1121
|
+
LIVESTREAM_STARTING: string;
|
|
1122
|
+
LIVESTREAM_STARTED: string;
|
|
1123
|
+
LIVESTREAM_STOPPING: string;
|
|
1124
|
+
LIVESTREAM_STOPPED: string;
|
|
1125
|
+
};
|
|
1126
|
+
hlsEvents: {
|
|
1127
|
+
HLS_STARTING: string;
|
|
1128
|
+
HLS_STARTED: string;
|
|
1129
|
+
HLS_PLAYABLE: string;
|
|
1130
|
+
HLS_STOPPING: string;
|
|
1131
|
+
HLS_STOPPED: string;
|
|
1132
|
+
};
|
|
1133
|
+
modes: {
|
|
1134
|
+
CONFERENCE: string;
|
|
1135
|
+
VIEWER: string;
|
|
1136
|
+
};
|
|
1033
1137
|
};
|