@videosdk.live/react-sdk 0.1.72 → 0.1.73

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.
@@ -188,36 +188,98 @@ export function MeetingConsumer({
188
188
  onParticipantModeChanged,
189
189
  }: {
190
190
  children: any;
191
- onParticipantJoined?: () => void;
192
- onParticipantLeft?: () => void;
193
- onSpeakerChanged?: () => void;
194
- onPresenterChanged?: () => void;
195
- onMainParticipantChanged?: () => void;
196
- onEntryRequested?: () => void;
197
- onEntryResponded?: () => void;
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;
198
208
  onRecordingStarted?: () => void;
199
209
  onRecordingStopped?: () => void;
200
- onChatMessage?: () => void;
210
+ onChatMessage?: (data: { message: string; senderId: string; timestamp: string; senderName: string }) => void;
201
211
  onMeetingJoined?: () => void;
202
212
  onMeetingLeft?: () => void;
203
213
  onLiveStreamStarted?: () => void;
204
214
  onLiveStreamStopped?: () => void;
205
215
  onVideoStateChanged?: () => void;
206
216
  onVideoSeeked?: () => void;
207
- onWebcamRequested?: () => void;
208
- onMicRequested?: () => void;
209
- onPinStateChanged?: () => 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;
210
244
  onConnectionOpen?: () => void;
211
245
  onConnetionClose?: () => void;
212
246
  onSwitchMeeting?: () => void;
213
- onError?: () => void;
214
- onHlsStarted?: () => void;
247
+ onError?: ({ code, message }: { code: string; message: string }) => void;
248
+ onHlsStarted?: ({ downstreamUrl }: { downstreamUrl: string }) => void;
215
249
  onHlsStopped?: () => void;
216
- onHlsStateChanged?: () => void;
217
- onRecordingStateChanged?: () => void;
218
- onLivestreamStateChanged?: () => void;
219
- onMeetingStateChanged?: () => void;
220
- onParticipantModeChanged?: () => 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;
221
283
  }): any;
222
284
 
223
285
  /**
@@ -554,19 +616,21 @@ export function useMeeting({
554
616
  playbackHlsUrl,
555
617
  livestreamUrl,
556
618
  }: {
557
- status: 'HLS_STARTING' | 'HLS_STARTED' | 'HLS_PLAYABLE' | 'HLS_STOPPING' | 'HLS_STOPPING';
558
- downstreamUrl: string;
559
- playbackHlsUrl: string;
560
- livestreamUrl: string;
619
+ status: 'HLS_STARTING' | 'HLS_STARTED' | 'HLS_PLAYABLE' | 'HLS_STOPPING' | 'HLS_STOPPED';
620
+ downstreamUrl?: string;
621
+ playbackHlsUrl?: string;
622
+ livestreamUrl?: string;
561
623
  }) => void;
562
624
  onRecordingStateChanged?: ({
563
625
  status,
564
626
  }: {
565
- status: 'RECORDING_STARTING' | 'RECORDING_STARTED' | 'RECORDING_STOPPING' | 'RECORDING_STOPPING';
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';
566
633
  }) => void;
567
- onLivestreamStateChanged?: {
568
- status: 'LIVESTREAM_STARTING' | 'LIVESTREAM_STARTED' | 'LIVESTREAM_STOPPING' | 'LIVESTREAM_STOPPING';
569
- };
570
634
  onMeetingStateChanged?: ({
571
635
  state,
572
636
  }: {
@@ -958,6 +1022,7 @@ export const Constants: {
958
1022
  hlsEvents: {
959
1023
  HLS_STARTING: string;
960
1024
  HLS_STARTED: string;
1025
+ HLS_PLAYABLE: string;
961
1026
  HLS_STOPPING: string;
962
1027
  HLS_STOPPED: string;
963
1028
  };
@@ -379,6 +379,7 @@ export class Meeting {
379
379
  eventType:
380
380
  | 'participant-joined'
381
381
  | 'participant-left'
382
+ | 'participant-mode-change'
382
383
  | 'speaker-changed'
383
384
  | 'presenter-changed'
384
385
  | 'main-participant-changed'
@@ -386,10 +387,13 @@ export class Meeting {
386
387
  | 'entry-responded'
387
388
  | 'recording-started'
388
389
  | 'recording-stopped'
390
+ | 'recording-state-changed'
389
391
  | 'livestream-started'
390
392
  | 'livestream-stopped'
393
+ | 'livestream-state-changed'
391
394
  | 'hls-started'
392
395
  | 'hls-stopped'
396
+ | 'hls-state-changed'
393
397
  | 'stream-enabled'
394
398
  | 'stream-disabled'
395
399
  | 'whiteboard-started'
@@ -403,7 +407,10 @@ export class Meeting {
403
407
  | 'pin-state-changed'
404
408
  | 'connection-open'
405
409
  | 'connection-close'
406
- | 'switch-meeting',
410
+ | 'meeting-state-changed'
411
+ | 'switch-meeting'
412
+ | 'error'
413
+ | 'chat-message',
407
414
  listener: (data: any) => void,
408
415
  ): void;
409
416
  /**
@@ -415,6 +422,7 @@ export class Meeting {
415
422
  eventType:
416
423
  | 'participant-joined'
417
424
  | 'participant-left'
425
+ | 'participant-mode-change'
418
426
  | 'speaker-changed'
419
427
  | 'presenter-changed'
420
428
  | 'main-participant-changed'
@@ -422,10 +430,13 @@ export class Meeting {
422
430
  | 'entry-responded'
423
431
  | 'recording-started'
424
432
  | 'recording-stopped'
433
+ | 'recording-state-changed'
425
434
  | 'livestream-started'
426
435
  | 'livestream-stopped'
436
+ | 'livestream-state-changed'
427
437
  | 'hls-started'
428
438
  | 'hls-stopped'
439
+ | 'hls-state-changed'
429
440
  | 'stream-enabled'
430
441
  | 'stream-disabled'
431
442
  | 'whiteboard-started'
@@ -439,7 +450,10 @@ export class Meeting {
439
450
  | 'pin-state-changed'
440
451
  | 'connection-open'
441
452
  | 'connection-close'
442
- | 'switch-meeting',
453
+ | 'meeting-state-changed'
454
+ | 'switch-meeting'
455
+ | 'error'
456
+ | 'chat-message',
443
457
  listener: (data: any) => void,
444
458
  ): void;
445
459
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@videosdk.live/react-sdk",
3
- "version": "0.1.72",
3
+ "version": "0.1.73",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.modern.js",