@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.
@@ -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
- children,
68
- config,
69
- token,
70
- joinWithoutUserInteraction,
71
- reinitialiseMeetingOnConfigChange: _reinitialiseMeetingOnConfigChange,
72
- deviceInfo,
66
+ children,
67
+ config,
68
+ token,
69
+ joinWithoutUserInteraction,
70
+ reinitialiseMeetingOnConfigChange: _reinitialiseMeetingOnConfigChange,
71
+ deviceInfo,
73
72
  }: {
74
- children: any;
75
- config: {
76
- meetingId: string;
77
- autoConsume?: boolean;
78
- preferredProtocol?: 'UDP_ONLY' | 'UDP_OVER_TCP';
79
- participantId?: string | undefined;
80
- name: string;
81
- micEnabled: boolean;
82
- webcamEnabled: boolean;
83
- maxResolution?: 'hd' | 'sd';
84
- customCameraVideoTrack?: MediaStream | undefined;
85
- customMicrophoneAudioTrack?: MediaStream | undefined;
86
- multiStream?: boolean;
87
- mode?: 'CONFERENCE' | 'VIEWER';
88
- };
89
- token: string;
90
- joinWithoutUserInteraction?: boolean;
91
- reinitialiseMeetingOnConfigChange?: boolean;
92
- deviceInfo?: object;
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
- 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,
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
- 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?: ({ participantId, decision }: { participantId: string; decision: string }) => void;
208
- onRecordingStarted?: () => void;
209
- onRecordingStopped?: () => void;
210
- onChatMessage?: (data: { message: string; senderId: string; timestamp: string; senderName: string }) => void;
211
- onMeetingJoined?: () => void;
212
- onMeetingLeft?: () => void;
213
- onLiveStreamStarted?: () => void;
214
- onLiveStreamStopped?: () => void;
215
- onVideoStateChanged?: () => void;
216
- onVideoSeeked?: () => void;
217
- onWebcamRequested?: ({
218
- participantId,
219
- accept,
220
- reject,
221
- }: {
222
- participantId: string;
223
- accept: () => void;
224
- reject: () => void;
225
- }) => void;
226
- onMicRequested?: ({
227
- participantId,
228
- accept,
229
- reject,
230
- }: {
231
- participantId: string;
232
- accept: () => void;
233
- reject: () => void;
234
- }) => void;
235
- onPinStateChanged?: ({
236
- participantId,
237
- state,
238
- pinnedBy,
239
- }: {
240
- participantId: string;
241
- state: { share: boolean; cam: boolean };
242
- pinnedBy: string;
243
- }) => void;
244
- onConnectionOpen?: () => void;
245
- onConnetionClose?: () => void;
246
- onSwitchMeeting?: () => void;
247
- onError?: ({ code, message }: { code: string; message: string }) => void;
248
- onHlsStarted?: ({ downstreamUrl }: { downstreamUrl: string }) => void;
249
- onHlsStopped?: () => void;
250
- onHlsStateChanged?: ({
251
- status,
252
- downstreamUrl,
253
- playbackHlsUrl,
254
- livestreamUrl,
255
- }: {
256
- status: 'HLS_STARTING' | 'HLS_STARTED' | 'HLS_PLAYABLE' | 'HLS_STOPPING' | 'HLS_STOPPED';
257
- downstreamUrl?: string;
258
- playbackHlsUrl?: string;
259
- livestreamUrl?: string;
260
- }) => void;
261
- onRecordingStateChanged?: ({
262
- status,
263
- }: {
264
- status: 'RECORDING_STARTING' | 'RECORDING_STARTED' | 'RECORDING_STOPPING' | 'RECORDING_STOPPED';
265
- }) => void;
266
- onLivestreamStateChanged?:({
267
- status
268
- }: {
269
- status: 'LIVESTREAM_STARTING' | 'LIVESTREAM_STARTED' | 'LIVESTREAM_STOPPING' | 'LIVESTREAM_STOPPED';
270
- }) => void;
271
- onMeetingStateChanged?: ({
272
- state,
273
- }: {
274
- state: 'CONNECTING' | 'CONNECTED' | 'FAILED' | 'DISCONNECTED' | 'CLOSING' | 'CLOSED';
275
- }) => void;
276
- onParticipantModeChanged?: ({
277
- participantId,
278
- mode,
279
- }: {
280
- participantId: string;
281
- mode: 'CONFERENCE' | 'VIEWER';
282
- }) => void;
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
- participantId: string,
345
- {
346
- onStreamEnabled,
347
- onStreamDisabled,
348
- onMediaStatusChanged,
349
- onVideoQualityChanged,
350
- }?: {
351
- onStreamDisabled?: (stream: Stream) => void;
352
- onStreamEnabled?: (stream: Stream) => void;
353
- onMediaStatusChanged?: ({
354
- kind,
355
- peerId,
356
- newStatus,
357
- }: {
358
- kind: 'audio' | 'video';
359
- peerId: string;
360
- newStatus: boolean;
361
- }) => void;
362
- onVideoQualityChanged?: ({
363
- peerId,
364
- prevQuality,
365
- currentQuality,
366
- }: {
367
- peerId: string;
368
- prevQuality: 'low' | 'med' | 'high';
369
- currentQuality: 'low' | 'med' | 'high';
370
- }) => void;
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
- displayName: string;
374
- participant: Participant;
375
- webcamStream: Stream;
376
- micStream: Stream;
377
- screenShareStream: Stream;
378
- screenShareAudioStream: Stream;
379
- webcamOn: boolean;
380
- micOn: boolean;
381
- screenShareOn: boolean;
382
- isLocal: boolean;
383
- isActiveSpeaker: boolean;
384
- isMainParticipant: boolean;
385
- pinState: any;
386
- mode: 'CONFERENCE' | 'VIEWER';
387
- consumeMicStreams: () => void;
388
- consumeWebcamStreams: () => void;
389
- stopConsumingMicStreams: () => void;
390
- stopConsumingWebcamStreams: () => void;
391
- setQuality: (quality: 'low' | 'med' | 'high') => void;
392
- setViewPort: (width: number, height: number) => void;
393
- enableMic: () => void;
394
- disableMic: () => void;
395
- enableWebcam: () => void;
396
- disableWebcam: () => void;
397
- remove: () => void;
398
- pin: (data: 'SHARE_AND_CAM' | 'CAM' | 'SHARE') => void;
399
- unpin: (data: 'SHARE_AND_CAM' | 'CAM' | 'SHARE') => void;
400
- switchTo: ({ meetingId, payload, token }: { meetingId: string; payload: string; token: string }) => Promise<void>;
401
- getAudioStats: () => Promise<
402
- Array<{
403
- bitrate: number;
404
- rtt: number;
405
- network: string;
406
- codec: string;
407
- jitter: number;
408
- limitation: any;
409
- totalPackets: number;
410
- packetsLost: number;
411
- concealmentEvents: number;
412
- insertedSamplesForDecelaration: number;
413
- removedSamplesForAccelaration: number;
414
- size: any;
415
- }>
416
- >;
417
- getVideoStats: () => Promise<
418
- Array<{
419
- bitrate: number;
420
- rtt: number;
421
- network: string;
422
- codec: string;
423
- jitter: number;
424
- limitation: any;
425
- totalPackets: number;
426
- packetsLost: number;
427
- concealmentEvents: number;
428
- insertedSamplesForDecelaration: number;
429
- removedSamplesForAccelaration: number;
430
- size: any;
431
- currentSpatialLayer: number;
432
- currentTemporalLayer: number;
433
- preferredSpatialLayer: number;
434
- preferredTemporalLayer: number;
435
- }>
436
- >;
437
- getShareStats: () => Promise<
438
- Array<{
439
- bitrate: number;
440
- rtt: number;
441
- network: string;
442
- codec: string;
443
- jitter: number;
444
- limitation: any;
445
- totalPackets: number;
446
- packetsLost: number;
447
- concealmentEvents: number;
448
- insertedSamplesForDecelaration: number;
449
- removedSamplesForAccelaration: number;
450
- size: any;
451
- currentSpatialLayer: number;
452
- currentTemporalLayer: number;
453
- preferredSpatialLayer: number;
454
- preferredTemporalLayer: number;
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
- onParticipantJoined,
524
- onParticipantLeft,
525
- onSpeakerChanged,
526
- onPresenterChanged,
527
- onMainParticipantChanged,
528
- onEntryRequested,
529
- onEntryResponded,
530
- onRecordingStarted,
531
- onRecordingStopped,
532
- onChatMessage,
533
- onMeetingJoined,
534
- onMeetingLeft,
535
- onLiveStreamStarted,
536
- onLiveStreamStopped,
537
- onVideoStateChanged,
538
- onVideoSeeked,
539
- onWebcamRequested,
540
- onMicRequested,
541
- onPinStateChanged,
542
- onConnectionOpen,
543
- onConnetionClose,
544
- onSwitchMeeting,
545
- onError,
546
- onHlsStarted,
547
- onHlsStopped,
548
- onHlsStateChanged,
549
- onRecordingStateChanged,
550
- onLivestreamStateChanged,
551
- onMeetingStateChanged,
552
- onParticipantModeChanged,
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
- onParticipantJoined?: (participant: Participant) => void;
555
- onParticipantLeft?: (participant: Participant) => void;
556
- onSpeakerChanged?: (activeSpeakerId: string | null) => void;
557
- onPresenterChanged?: (presenterId: string | null) => void;
558
- onMainParticipantChanged?: (participant: Participant) => void;
559
- onEntryRequested?: ({
560
- participantId,
561
- name,
562
- allow,
563
- deny,
564
- }: {
565
- participantId: string;
566
- name: string;
567
- allow: () => void;
568
- deny: () => void;
569
- }) => void;
570
- onEntryResponded?: ({ participantId, decision }: { participantId: string; decision: string }) => void;
571
- onRecordingStarted?: () => void;
572
- onRecordingStopped?: () => void;
573
- onChatMessage?: (data: { message: string; senderId: string; timestamp: string; senderName: string }) => void;
574
- onMeetingJoined?: () => void;
575
- onMeetingLeft?: () => void;
576
- onLiveStreamStarted?: () => void;
577
- onLiveStreamStopped?: () => void;
578
- onVideoStateChanged?: () => void;
579
- onVideoSeeked?: () => void;
580
- onWebcamRequested?: ({
581
- participantId,
582
- accept,
583
- reject,
584
- }: {
585
- participantId: string;
586
- accept: () => void;
587
- reject: () => void;
588
- }) => void;
589
- onMicRequested?: ({
590
- participantId,
591
- accept,
592
- reject,
593
- }: {
594
- participantId: string;
595
- accept: () => void;
596
- reject: () => void;
597
- }) => void;
598
- onPinStateChanged?: ({
599
- participantId,
600
- state,
601
- pinnedBy,
602
- }: {
603
- participantId: string;
604
- state: { share: boolean; cam: boolean };
605
- pinnedBy: string;
606
- }) => void;
607
- onConnectionOpen?: () => void;
608
- onConnetionClose?: () => void;
609
- onSwitchMeeting?: () => void;
610
- onError?: ({ code, message }: { code: string; message: string }) => void;
611
- onHlsStarted?: ({ downstreamUrl }: { downstreamUrl: string }) => void;
612
- onHlsStopped?: () => void;
613
- onHlsStateChanged?: ({
614
- status,
615
- downstreamUrl,
616
- playbackHlsUrl,
617
- livestreamUrl,
618
- }: {
619
- status: 'HLS_STARTING' | 'HLS_STARTED' | 'HLS_PLAYABLE' | 'HLS_STOPPING' | 'HLS_STOPPED';
620
- downstreamUrl?: string;
621
- playbackHlsUrl?: string;
622
- livestreamUrl?: string;
623
- }) => void;
624
- onRecordingStateChanged?: ({
625
- status,
626
- }: {
627
- status: 'RECORDING_STARTING' | 'RECORDING_STARTED' | 'RECORDING_STOPPING' | 'RECORDING_STOPPED';
628
- }) => void;
629
- onLivestreamStateChanged?:({
630
- status
631
- }: {
632
- status: 'LIVESTREAM_STARTING' | 'LIVESTREAM_STARTED' | 'LIVESTREAM_STOPPING' | 'LIVESTREAM_STOPPED';
633
- }) => void;
634
- onMeetingStateChanged?: ({
635
- state,
636
- }: {
637
- state: 'CONNECTING' | 'CONNECTED' | 'FAILED' | 'DISCONNECTED' | 'CLOSING' | 'CLOSED';
638
- }) => void;
639
- onParticipantModeChanged?: ({
640
- participantId,
641
- mode,
642
- }: {
643
- participantId: string;
644
- mode: 'CONFERENCE' | 'VIEWER';
645
- }) => void;
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
- meetingId: string;
648
- meeting: Meeting;
649
- localParticipant: Participant;
650
- activeSpeakerId: string;
651
- participants: Map<string, Participant>;
652
- pinnedParticipants: Map<
653
- string,
654
- {
655
- cam: boolean;
656
- share: boolean;
657
- }
658
- >;
659
- presenterId?: string;
660
- localMicOn: boolean;
661
- localWebcamOn: boolean;
662
- isRecording: boolean;
663
- recordingState: string;
664
- livestreamState: string;
665
- hlsState: string;
666
- hlsUrls: {
667
- downstreamUrl: string;
668
- playbackHlsUrl: string;
669
- livestreamUrl: string;
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
- localScreenShareOn: boolean;
672
- connections: Map<string, Connection>;
673
- join: () => void;
674
- leave: () => void;
675
- end: () => void;
676
- unmuteMic: (customAudioTrack?: MediaStream | undefined) => void;
677
- muteMic: () => void;
678
- toggleMic: (customAudioTrack?: MediaStream | undefined) => void;
679
- enableWebcam: (customVideoTrack?: MediaStream | undefined) => void;
680
- disableWebcam: () => void;
681
- toggleWebcam: (customVideoTrack?: MediaStream | undefined) => void;
682
- enableScreenShare: (customScreenShareTrack?: MediaStream | undefined) => void;
683
- disableScreenShare: () => void;
684
- toggleScreenShare: (customScreenShareTrack?: MediaStream | undefined) => void;
685
- startRecording: (
686
- webhookUrl?: string,
687
- awsDirPath?: string,
688
- config?: {
689
- layout: {
690
- type: 'GRID' | 'SPOTLIGHT' | 'SIDEBAR';
691
- priority: 'SPEAKER' | 'PIN';
692
- gridSize: number;
693
- };
694
- orientation: 'landscape' | 'portrait';
695
- theme: 'DEFAULT' | 'DARK' | 'LIGHT';
696
- quality: 'low' | 'med' | 'high';
697
- mode: 'video-and-audio' | 'audio';
698
- },
699
- ) => void;
700
- stopRecording: () => void;
701
- startLiveStream: (
702
- outputs: Array<{
703
- url: string;
704
- streamKey: string;
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
- topic: string,
781
- {
782
- onMessageReceived,
783
- onOldMessagesReceived,
784
- }?: {
785
- onMessageReceived?: (message: {
786
- id: string;
787
- message: string;
788
- senderId: string;
789
- senderName: string;
790
- timestamp: string;
791
- topic: string;
792
- }) => void;
793
- onOldMessagesReceived?: (
794
- messages: Array<{
795
- id: string;
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
- noiseConfig,
857
- encoderConfig,
858
- microphoneId,
954
+ noiseConfig,
955
+ encoderConfig,
956
+ microphoneId,
859
957
  }: {
860
- noiseConfig?:
861
- | {
862
- echoCancellation: boolean;
863
- autoGainControl: boolean;
864
- noiseSuppression: boolean;
865
- }
866
- | undefined;
867
- encoderConfig?:
868
- | 'speech_low_quality'
869
- | 'speech_standard'
870
- | 'music_standard'
871
- | 'standard_stereo'
872
- | 'high_quality'
873
- | 'high_quality_stereo'
874
- | undefined;
875
- microphoneId?: string | undefined;
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
- cameraId,
914
- encoderConfig,
915
- facingMode,
916
- optimizationMode,
917
- multiStream,
1011
+ cameraId,
1012
+ encoderConfig,
1013
+ facingMode,
1014
+ optimizationMode,
1015
+ multiStream,
918
1016
  }: {
919
- cameraId?: string | undefined;
920
- encoderConfig?:
921
- | 'h90p_w160p'
922
- | 'h180p_w320p'
923
- | 'h216p_w384p'
924
- | 'h360p_w640p'
925
- | 'h540p_w960p'
926
- | 'h720p_w1280p'
927
- | 'h1080p_w1920p'
928
- | 'h1440p_w2560p'
929
- | 'h2160p_w3840p'
930
- | 'h120p_w160p'
931
- | 'h180p_w240p'
932
- | 'h240p_w320p'
933
- | 'h360p_w480p'
934
- | 'h480p_w640p'
935
- | 'h540p_w720p'
936
- | 'h720p_w960p'
937
- | 'h1080p_w1440p'
938
- | 'h1440p_w1920p'
939
- | undefined;
940
- facingMode?: 'user' | 'environment' | undefined;
941
- optimizationMode?: 'text' | 'motion' | 'detail' | undefined;
942
- multiStream?: boolean;
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
- encoderConfig,
973
- optimizationMode,
974
- withAudio,
1070
+ encoderConfig,
1071
+ optimizationMode,
1072
+ withAudio,
975
1073
  }: {
976
- encoderConfig?: 'h360p_30fps' | 'h720p_5fps' | 'h720p_15fps' | 'h1080p_15fps' | 'h1080p_30fps' | undefined;
977
- optimizationMode?: 'text' | 'motion' | 'detail' | undefined;
978
- withAudio?: 'enable' | 'disable';
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
- errors: {
983
- INVALID_API_KEY: number;
984
- INVALID_TOKEN: number;
985
- INVALID_MEETING_ID: number;
986
- INVALID_PARTICIPANT_ID: number;
987
- DUPLICATE_PARTICIPANT: number;
988
- ACCOUNT_DEACTIVATED: number;
989
- ACCOUNT_DISCONTINUED: number;
990
- INVALID_PERMISSIONS: number;
991
- MAX_PARTCIPANT_REACHED: number;
992
- MAX_SPEAKER_REACHED: number;
993
- START_RECORDING_FAILED: number;
994
- STOP_RECORDING_FAILED: number;
995
- START_LIVESTREAM_FAILED: number;
996
- STOP_LIVESTREAM_FAILED: number;
997
- INVALID_LIVESTREAM_CONFIG: number;
998
- START_HLS_FAILED: number;
999
- STOP_HLS_FAILED: number;
1000
- RECORDING_FAILED: number;
1001
- LIVESTREAM_FAILED: number;
1002
- HLS_FAILED: number;
1003
- ERROR_GET_VIDEO_MEDIA: number;
1004
- ERROR_GET_AUDIO_MEDIA: number;
1005
- ERROR_GET_DISPLAY_MEDIA: number;
1006
- ERROR_GET_VIDEO_MEDIA_PERMISSION_DENIED: number;
1007
- ERROR_GET_AUDIO_MEDIA_PERMISSION_DENIED: number;
1008
- ERROR_GET_DISPLAY_MEDIA_PERMISSION_DENIED: number;
1009
- };
1010
- recordingEvents: {
1011
- RECORDING_STARTING: string;
1012
- RECORDING_STARTED: string;
1013
- RECORDING_STOPPING: string;
1014
- RECORDING_STOPPED: string;
1015
- };
1016
- livestreamEvents: {
1017
- LIVESTREAM_STARTING: string;
1018
- LIVESTREAM_STARTED: string;
1019
- LIVESTREAM_STOPPING: string;
1020
- LIVESTREAM_STOPPED: string;
1021
- };
1022
- hlsEvents: {
1023
- HLS_STARTING: string;
1024
- HLS_STARTED: string;
1025
- HLS_PLAYABLE: string;
1026
- HLS_STOPPING: string;
1027
- HLS_STOPPED: string;
1028
- };
1029
- modes: {
1030
- CONFERENCE: string;
1031
- VIEWER: string;
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
  };