@defcomm/meetingsdk 0.6.1 → 0.6.3

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.d.mts CHANGED
@@ -9,6 +9,8 @@ type Events = {
9
9
  onTrack?: (stream: MediaStream, peerId: string) => void;
10
10
  onScreenTrack?: (stream: MediaStream, peerId: string) => void;
11
11
  onUserJoined?: (p: Participant) => void;
12
+ /** Fired when a remote participant permanently joins the meeting. */
13
+ onParticipantJoined?: (p: Participant) => void;
12
14
  onEntryRequested?: (req: EntryRequest) => void;
13
15
  onEntryResponded?: (payload: {
14
16
  participantId: string;
@@ -23,9 +25,12 @@ type Events = {
23
25
  onConnectionStateChanged?: (state: string) => void;
24
26
  onRoomUpdate?: (data: any) => void;
25
27
  onUserLeft?: (id: string) => void;
28
+ /** Fired when a remote participant permanently leaves the meeting. */
29
+ onParticipantLeft?: (p: Participant) => void;
26
30
  onMeetingLeft?: () => void;
27
31
  onChatMessage?: (msg: ChatMessage) => void;
28
32
  onReaction?: (reaction: Reaction) => void;
33
+ onHandRaised?: (participantId: string, raised: boolean) => void;
29
34
  onNetworkQuality?: (quality: NetworkQuality) => void;
30
35
  onScreenShareStarted?: (peerId: string, stream: MediaStream) => void;
31
36
  onScreenShareStopped?: (peerId: string) => void;
@@ -100,6 +105,7 @@ type Participant = {
100
105
  isLocal?: boolean;
101
106
  media?: ParticipantMedia;
102
107
  isPresenter?: boolean;
108
+ handRaised?: boolean;
103
109
  connectionState?: "connected" | "reconnecting" | "disconnected";
104
110
  };
105
111
  type ParticipantMedia = {
@@ -235,6 +241,7 @@ interface VideoSDKCoreOptions {
235
241
  onRoomUpdate?: (data: any) => void;
236
242
  onChatMessage?: (message: ChatMessage) => void;
237
243
  onReaction?: (reaction: Reaction) => void;
244
+ onHandRaised?: (participantId: string, raised: boolean) => void;
238
245
  onNetworkQuality?: (quality: NetworkQuality) => void;
239
246
  onMuteStateChanged?: (peerId: string, kind: "audio" | "video", muted: boolean) => void;
240
247
  }
@@ -256,6 +263,7 @@ type LocalParticipantPatch = {
256
263
  name?: string;
257
264
  isHost?: boolean;
258
265
  isModerator?: boolean;
266
+ handRaised?: boolean;
259
267
  permissions?: any;
260
268
  media?: Partial<ParticipantMedia>;
261
269
  };
@@ -280,6 +288,7 @@ declare class MeetingState {
280
288
  removeParticipant(id: string): void;
281
289
  updateParticipantMedia(id: string, patch: Partial<NonNullable<Participant["media"]>>): void;
282
290
  updateLocalParticipant(patch: LocalParticipantPatch): void;
291
+ setParticipantHandRaised(id: string, raised: boolean): void;
283
292
  addChatMessage(msg: ChatMessage): void;
284
293
  getChatMessages(): ChatMessage[];
285
294
  clearChat(): void;
@@ -355,6 +364,8 @@ declare class VideoSDKCore {
355
364
  }>;
356
365
  sendChatMessage(payload: ChatInput): void;
357
366
  sendReaction(reaction: string): void;
367
+ setHandRaised(raised: boolean): void;
368
+ toggleHandRaised(): void;
358
369
  /**
359
370
  * Generic PubSub publishing entry point.
360
371
  *
@@ -413,6 +424,8 @@ type MeetingContextValue = {
413
424
  stopScreenShare: () => void;
414
425
  sendMessage: (input: ChatInput) => void;
415
426
  sendReaction: (emoji: string) => void;
427
+ setHandRaised: (raised: boolean) => void;
428
+ toggleHandRaised: () => void;
416
429
  room: {
417
430
  id: string | null;
418
431
  name: string | null;
@@ -449,9 +462,13 @@ type MeetingContextValue = {
449
462
  onRecordingStarted: (cb: (recording: Recording) => void) => () => void;
450
463
  onRecordingStopped: (cb: (recording: any) => void) => () => void;
451
464
  onReaction: (cb: (reaction: Reaction) => void) => () => void;
465
+ onHandRaised: (cb: (participantId: string, raised: boolean) => void) => () => void;
452
466
  onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
453
467
  onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
454
468
  onNetworkQuality: (cb: (quality: NetworkQuality) => void) => () => void;
469
+ onChatMessage: (cb: (message: ChatMessage) => void) => () => void;
470
+ onParticipantJoined: (cb: (participant: Participant) => void) => () => void;
471
+ onParticipantLeft: (cb: (participant: Participant) => void) => () => void;
455
472
  };
456
473
  declare const MeetingProvider: ({ config, children, }: {
457
474
  config: MeetingConfig;
@@ -471,9 +488,13 @@ declare const useMeeting: (handlers?: {
471
488
  onRecordingStarted?: (recording: any) => void;
472
489
  onRecordingStopped?: (recording: any) => void;
473
490
  onReaction?: (reaction: any) => void;
491
+ onHandRaised?: (participantId: string, raised: boolean) => void;
474
492
  onActiveSpeakersChanged?: (participantIds: string[]) => void;
475
493
  onConnectionStateChanged?: (state: SFUConnectionState) => void;
476
494
  onNetworkQuality?: (quality: NetworkQuality) => void;
495
+ onParticipantJoined?: (participant: Participant) => void;
496
+ onParticipantLeft?: (participant: Participant) => void;
497
+ onChatMessage?: (message: ChatMessage) => void;
477
498
  }) => {
478
499
  join: (config?: Omit<MeetingConfig, "participantId" | "token">) => Promise<void>;
479
500
  getJoinState: (roomCode: string) => Promise<JoinState>;
@@ -499,6 +520,8 @@ declare const useMeeting: (handlers?: {
499
520
  stopScreenShare: () => void;
500
521
  sendMessage: (input: ChatInput) => void;
501
522
  sendReaction: (emoji: string) => void;
523
+ setHandRaised: (raised: boolean) => void;
524
+ toggleHandRaised: () => void;
502
525
  room: {
503
526
  id: string | null;
504
527
  name: string | null;
@@ -535,9 +558,13 @@ declare const useMeeting: (handlers?: {
535
558
  onRecordingStarted: (cb: (recording: Recording) => void) => () => void;
536
559
  onRecordingStopped: (cb: (recording: any) => void) => () => void;
537
560
  onReaction: (cb: (reaction: Reaction) => void) => () => void;
561
+ onHandRaised: (cb: (participantId: string, raised: boolean) => void) => () => void;
538
562
  onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
539
563
  onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
540
564
  onNetworkQuality: (cb: (quality: NetworkQuality) => void) => () => void;
565
+ onChatMessage: (cb: (message: ChatMessage) => void) => () => void;
566
+ onParticipantJoined: (cb: (participant: Participant) => void) => () => void;
567
+ onParticipantLeft: (cb: (participant: Participant) => void) => () => void;
541
568
  };
542
569
 
543
570
  declare const useParticipants: () => Participant[];
package/dist/index.d.ts CHANGED
@@ -9,6 +9,8 @@ type Events = {
9
9
  onTrack?: (stream: MediaStream, peerId: string) => void;
10
10
  onScreenTrack?: (stream: MediaStream, peerId: string) => void;
11
11
  onUserJoined?: (p: Participant) => void;
12
+ /** Fired when a remote participant permanently joins the meeting. */
13
+ onParticipantJoined?: (p: Participant) => void;
12
14
  onEntryRequested?: (req: EntryRequest) => void;
13
15
  onEntryResponded?: (payload: {
14
16
  participantId: string;
@@ -23,9 +25,12 @@ type Events = {
23
25
  onConnectionStateChanged?: (state: string) => void;
24
26
  onRoomUpdate?: (data: any) => void;
25
27
  onUserLeft?: (id: string) => void;
28
+ /** Fired when a remote participant permanently leaves the meeting. */
29
+ onParticipantLeft?: (p: Participant) => void;
26
30
  onMeetingLeft?: () => void;
27
31
  onChatMessage?: (msg: ChatMessage) => void;
28
32
  onReaction?: (reaction: Reaction) => void;
33
+ onHandRaised?: (participantId: string, raised: boolean) => void;
29
34
  onNetworkQuality?: (quality: NetworkQuality) => void;
30
35
  onScreenShareStarted?: (peerId: string, stream: MediaStream) => void;
31
36
  onScreenShareStopped?: (peerId: string) => void;
@@ -100,6 +105,7 @@ type Participant = {
100
105
  isLocal?: boolean;
101
106
  media?: ParticipantMedia;
102
107
  isPresenter?: boolean;
108
+ handRaised?: boolean;
103
109
  connectionState?: "connected" | "reconnecting" | "disconnected";
104
110
  };
105
111
  type ParticipantMedia = {
@@ -235,6 +241,7 @@ interface VideoSDKCoreOptions {
235
241
  onRoomUpdate?: (data: any) => void;
236
242
  onChatMessage?: (message: ChatMessage) => void;
237
243
  onReaction?: (reaction: Reaction) => void;
244
+ onHandRaised?: (participantId: string, raised: boolean) => void;
238
245
  onNetworkQuality?: (quality: NetworkQuality) => void;
239
246
  onMuteStateChanged?: (peerId: string, kind: "audio" | "video", muted: boolean) => void;
240
247
  }
@@ -256,6 +263,7 @@ type LocalParticipantPatch = {
256
263
  name?: string;
257
264
  isHost?: boolean;
258
265
  isModerator?: boolean;
266
+ handRaised?: boolean;
259
267
  permissions?: any;
260
268
  media?: Partial<ParticipantMedia>;
261
269
  };
@@ -280,6 +288,7 @@ declare class MeetingState {
280
288
  removeParticipant(id: string): void;
281
289
  updateParticipantMedia(id: string, patch: Partial<NonNullable<Participant["media"]>>): void;
282
290
  updateLocalParticipant(patch: LocalParticipantPatch): void;
291
+ setParticipantHandRaised(id: string, raised: boolean): void;
283
292
  addChatMessage(msg: ChatMessage): void;
284
293
  getChatMessages(): ChatMessage[];
285
294
  clearChat(): void;
@@ -355,6 +364,8 @@ declare class VideoSDKCore {
355
364
  }>;
356
365
  sendChatMessage(payload: ChatInput): void;
357
366
  sendReaction(reaction: string): void;
367
+ setHandRaised(raised: boolean): void;
368
+ toggleHandRaised(): void;
358
369
  /**
359
370
  * Generic PubSub publishing entry point.
360
371
  *
@@ -413,6 +424,8 @@ type MeetingContextValue = {
413
424
  stopScreenShare: () => void;
414
425
  sendMessage: (input: ChatInput) => void;
415
426
  sendReaction: (emoji: string) => void;
427
+ setHandRaised: (raised: boolean) => void;
428
+ toggleHandRaised: () => void;
416
429
  room: {
417
430
  id: string | null;
418
431
  name: string | null;
@@ -449,9 +462,13 @@ type MeetingContextValue = {
449
462
  onRecordingStarted: (cb: (recording: Recording) => void) => () => void;
450
463
  onRecordingStopped: (cb: (recording: any) => void) => () => void;
451
464
  onReaction: (cb: (reaction: Reaction) => void) => () => void;
465
+ onHandRaised: (cb: (participantId: string, raised: boolean) => void) => () => void;
452
466
  onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
453
467
  onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
454
468
  onNetworkQuality: (cb: (quality: NetworkQuality) => void) => () => void;
469
+ onChatMessage: (cb: (message: ChatMessage) => void) => () => void;
470
+ onParticipantJoined: (cb: (participant: Participant) => void) => () => void;
471
+ onParticipantLeft: (cb: (participant: Participant) => void) => () => void;
455
472
  };
456
473
  declare const MeetingProvider: ({ config, children, }: {
457
474
  config: MeetingConfig;
@@ -471,9 +488,13 @@ declare const useMeeting: (handlers?: {
471
488
  onRecordingStarted?: (recording: any) => void;
472
489
  onRecordingStopped?: (recording: any) => void;
473
490
  onReaction?: (reaction: any) => void;
491
+ onHandRaised?: (participantId: string, raised: boolean) => void;
474
492
  onActiveSpeakersChanged?: (participantIds: string[]) => void;
475
493
  onConnectionStateChanged?: (state: SFUConnectionState) => void;
476
494
  onNetworkQuality?: (quality: NetworkQuality) => void;
495
+ onParticipantJoined?: (participant: Participant) => void;
496
+ onParticipantLeft?: (participant: Participant) => void;
497
+ onChatMessage?: (message: ChatMessage) => void;
477
498
  }) => {
478
499
  join: (config?: Omit<MeetingConfig, "participantId" | "token">) => Promise<void>;
479
500
  getJoinState: (roomCode: string) => Promise<JoinState>;
@@ -499,6 +520,8 @@ declare const useMeeting: (handlers?: {
499
520
  stopScreenShare: () => void;
500
521
  sendMessage: (input: ChatInput) => void;
501
522
  sendReaction: (emoji: string) => void;
523
+ setHandRaised: (raised: boolean) => void;
524
+ toggleHandRaised: () => void;
502
525
  room: {
503
526
  id: string | null;
504
527
  name: string | null;
@@ -535,9 +558,13 @@ declare const useMeeting: (handlers?: {
535
558
  onRecordingStarted: (cb: (recording: Recording) => void) => () => void;
536
559
  onRecordingStopped: (cb: (recording: any) => void) => () => void;
537
560
  onReaction: (cb: (reaction: Reaction) => void) => () => void;
561
+ onHandRaised: (cb: (participantId: string, raised: boolean) => void) => () => void;
538
562
  onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
539
563
  onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
540
564
  onNetworkQuality: (cb: (quality: NetworkQuality) => void) => () => void;
565
+ onChatMessage: (cb: (message: ChatMessage) => void) => () => void;
566
+ onParticipantJoined: (cb: (participant: Participant) => void) => () => void;
567
+ onParticipantLeft: (cb: (participant: Participant) => void) => () => void;
541
568
  };
542
569
 
543
570
  declare const useParticipants: () => Participant[];
package/dist/index.js CHANGED
@@ -317,6 +317,7 @@ var MeetingState = class {
317
317
  name: patch.name ?? "",
318
318
  isHost: patch.isHost ?? false,
319
319
  isModerator: patch.isModerator ?? false,
320
+ handRaised: patch.handRaised ?? false,
320
321
  permissions: patch.permissions,
321
322
  media: {
322
323
  stream: patch.media?.stream ?? null,
@@ -364,6 +365,21 @@ var MeetingState = class {
364
365
  };
365
366
  this.notify("localParticipant");
366
367
  }
368
+ setParticipantHandRaised(id, raised) {
369
+ const p = id === this.localParticipant?.id ? this.localParticipant : this.participants.get(id);
370
+ if (!p || p.handRaised === raised) return;
371
+ const updated = { ...p, handRaised: raised };
372
+ if (id === this.localParticipant?.id) {
373
+ this.localParticipant = updated;
374
+ this.notify("localParticipant");
375
+ } else {
376
+ const next = new Map(this.participants);
377
+ next.set(id, updated);
378
+ this.participants = next;
379
+ this.notify(`participant:${id}`);
380
+ this.notify("participants");
381
+ }
382
+ }
367
383
  // ---- chat ----
368
384
  addChatMessage(msg) {
369
385
  this.chatMessages.set(msg.id, msg);
@@ -512,6 +528,8 @@ var SFUClient = class {
512
528
  });
513
529
  this.onReaction = options.onReaction || (() => {
514
530
  });
531
+ this.onHandRaised = options.onHandRaised || (() => {
532
+ });
515
533
  this.onRoomUpdate = options.onRoomUpdate || (() => {
516
534
  });
517
535
  this.onNetworkQuality = options.onNetworkQuality || (() => {
@@ -1110,6 +1128,12 @@ var SFUClient = class {
1110
1128
  if (reaction?.id && reaction?.emoji) this.onReaction(reaction);
1111
1129
  break;
1112
1130
  }
1131
+ case "hand_raised": {
1132
+ const participantId = String(payload.participant_id ?? payload.participantId ?? "");
1133
+ const raised = Boolean(payload.raised);
1134
+ if (participantId) this.onHandRaised(participantId, raised);
1135
+ break;
1136
+ }
1113
1137
  case "network_quality": {
1114
1138
  const raw = payload.quality || payload;
1115
1139
  const quality = {
@@ -2035,6 +2059,14 @@ var SFUClient = class {
2035
2059
  }
2036
2060
  });
2037
2061
  }
2062
+ setHandRaised(raised) {
2063
+ this.send({
2064
+ type: "set_hand_raised",
2065
+ payload: {
2066
+ raised
2067
+ }
2068
+ });
2069
+ }
2038
2070
  removeRemoteParticipant(participantId) {
2039
2071
  const stream = this.remoteStreams.get(participantId);
2040
2072
  if (stream) {
@@ -2469,6 +2501,7 @@ var VideoSDKCore = class {
2469
2501
  isHost,
2470
2502
  isModerator,
2471
2503
  permissions,
2504
+ handRaised: Boolean(local?.hand_raised),
2472
2505
  media: {
2473
2506
  micEnabled: !Boolean(local?.audio_muted),
2474
2507
  camEnabled: !Boolean(local?.video_muted)
@@ -2496,6 +2529,7 @@ var VideoSDKCore = class {
2496
2529
  this.state.updateLocalParticipant({
2497
2530
  id: this.myId,
2498
2531
  name: this.participantName,
2532
+ handRaised: Boolean(local.hand_raised),
2499
2533
  media: {
2500
2534
  micEnabled: !Boolean(local.audio_muted),
2501
2535
  camEnabled: !Boolean(local.video_muted),
@@ -2574,6 +2608,10 @@ var VideoSDKCore = class {
2574
2608
  onReaction: (reaction) => {
2575
2609
  this.events.onReaction?.(reaction);
2576
2610
  },
2611
+ onHandRaised: (participantId, raised) => {
2612
+ this.state.setParticipantHandRaised(participantId, raised);
2613
+ this.events.onHandRaised?.(participantId, raised);
2614
+ },
2577
2615
  onJoinRequestCanceled: (requestId) => {
2578
2616
  this.events.onJoinRequestCanceled?.(requestId);
2579
2617
  },
@@ -2599,6 +2637,7 @@ var VideoSDKCore = class {
2599
2637
  id: this.myId,
2600
2638
  name: this.participantName,
2601
2639
  isHost: current?.isHost,
2640
+ handRaised: current?.handRaised,
2602
2641
  isModerator: Boolean(permissions?.moderate),
2603
2642
  permissions
2604
2643
  });
@@ -2628,6 +2667,7 @@ var VideoSDKCore = class {
2628
2667
  id: pid,
2629
2668
  name: pname,
2630
2669
  isModerator: Boolean(participant?.permissions?.moderate),
2670
+ handRaised: Boolean(participant?.hand_raised),
2631
2671
  permissions: participant?.permissions,
2632
2672
  connectionState: "connected",
2633
2673
  media: {
@@ -2637,10 +2677,12 @@ var VideoSDKCore = class {
2637
2677
  stream: null
2638
2678
  }
2639
2679
  });
2640
- this.events.onUserJoined?.({
2680
+ const joinedParticipant = this.state.getParticipant(pid) ?? {
2641
2681
  id: pid,
2642
2682
  name: pname
2643
- });
2683
+ };
2684
+ this.events.onUserJoined?.(joinedParticipant);
2685
+ this.events.onParticipantJoined?.(joinedParticipant);
2644
2686
  },
2645
2687
  onParticipantPresence: (participantId, presence) => {
2646
2688
  if (participantId === this.myId) {
@@ -2669,9 +2711,11 @@ var VideoSDKCore = class {
2669
2711
  return;
2670
2712
  }
2671
2713
  console.log("[SFU] Participant permanently left", pid);
2714
+ const leavingParticipant = this.state.getParticipant(pid) ?? { id: pid };
2672
2715
  this.cleanupRemoteParticipant(pid);
2673
2716
  this.state.removeParticipant(pid);
2674
2717
  this.events.onUserLeft?.(pid);
2718
+ this.events.onParticipantLeft?.(leavingParticipant);
2675
2719
  },
2676
2720
  // TRACKS
2677
2721
  onParticipantMediaState: (participantId, audioMuted, videoMuted) => {
@@ -3141,6 +3185,16 @@ var VideoSDKCore = class {
3141
3185
  }
3142
3186
  this.sfuClient.sendReaction(reaction);
3143
3187
  }
3188
+ setHandRaised(raised) {
3189
+ if (!this.sfuClient) {
3190
+ console.warn("SFU Client not connected");
3191
+ return;
3192
+ }
3193
+ this.sfuClient.setHandRaised(raised);
3194
+ }
3195
+ toggleHandRaised() {
3196
+ this.setHandRaised(!Boolean(this.state.localParticipant?.handRaised));
3197
+ }
3144
3198
  /**
3145
3199
  * Generic PubSub publishing entry point.
3146
3200
  *
@@ -3261,6 +3315,9 @@ var MeetingProvider = ({
3261
3315
  const recordingStartedListeners = (0, import_react2.useRef)(/* @__PURE__ */ new Set());
3262
3316
  const recordingStoppedListeners = (0, import_react2.useRef)(/* @__PURE__ */ new Set());
3263
3317
  const reactionListeners = (0, import_react2.useRef)(/* @__PURE__ */ new Set());
3318
+ const handRaisedListeners = (0, import_react2.useRef)(
3319
+ /* @__PURE__ */ new Set()
3320
+ );
3264
3321
  const pubSubListeners = (0, import_react2.useRef)(
3265
3322
  /* @__PURE__ */ new Map()
3266
3323
  );
@@ -3274,6 +3331,15 @@ var MeetingProvider = ({
3274
3331
  const connectionStateListeners = (0, import_react2.useRef)(
3275
3332
  /* @__PURE__ */ new Set()
3276
3333
  );
3334
+ const participantJoinedListeners = (0, import_react2.useRef)(
3335
+ /* @__PURE__ */ new Set()
3336
+ );
3337
+ const participantLeftListeners = (0, import_react2.useRef)(
3338
+ /* @__PURE__ */ new Set()
3339
+ );
3340
+ const chatMessageListeners = (0, import_react2.useRef)(
3341
+ /* @__PURE__ */ new Set()
3342
+ );
3277
3343
  if (!sdkRef.current) {
3278
3344
  sdkRef.current = new VideoSDKCore(
3279
3345
  {
@@ -3334,6 +3400,7 @@ var MeetingProvider = ({
3334
3400
  data: msg
3335
3401
  };
3336
3402
  pubSubListeners.current.get("SECURE_CHAT")?.forEach((fn) => fn(pubSubMessage));
3403
+ chatMessageListeners.current.forEach((fn) => fn(msg));
3337
3404
  },
3338
3405
  onReaction: (reaction) => {
3339
3406
  reactionListeners.current.forEach((fn) => fn(reaction));
@@ -3354,6 +3421,9 @@ var MeetingProvider = ({
3354
3421
  );
3355
3422
  pubSubListeners.current.get("REACTION")?.forEach((fn) => fn(message));
3356
3423
  },
3424
+ onHandRaised: (participantId, raised) => {
3425
+ handRaisedListeners.current.forEach((fn) => fn(participantId, raised));
3426
+ },
3357
3427
  onNetworkQuality: (quality) => {
3358
3428
  networkQualityListeners.current.forEach((fn) => fn(quality));
3359
3429
  },
@@ -3361,6 +3431,12 @@ var MeetingProvider = ({
3361
3431
  connectionStateListeners.current.forEach(
3362
3432
  (fn) => fn(state)
3363
3433
  );
3434
+ },
3435
+ onParticipantJoined: (participant) => {
3436
+ participantJoinedListeners.current.forEach((fn) => fn(participant));
3437
+ },
3438
+ onParticipantLeft: (participant) => {
3439
+ participantLeftListeners.current.forEach((fn) => fn(participant));
3364
3440
  }
3365
3441
  }
3366
3442
  );
@@ -3420,6 +3496,8 @@ var MeetingProvider = ({
3420
3496
  stopScreenShare: sdk.stopScreenShare.bind(sdk),
3421
3497
  sendMessage: sdk.sendChatMessage.bind(sdk),
3422
3498
  sendReaction: sdk.sendReaction.bind(sdk),
3499
+ setHandRaised: sdk.setHandRaised.bind(sdk),
3500
+ toggleHandRaised: sdk.toggleHandRaised.bind(sdk),
3423
3501
  room: sdk.getMeeting(),
3424
3502
  localParticipant,
3425
3503
  participants,
@@ -3545,6 +3623,10 @@ var MeetingProvider = ({
3545
3623
  reactionListeners.current.add(cb);
3546
3624
  return () => reactionListeners.current.delete(cb);
3547
3625
  },
3626
+ onHandRaised: (cb) => {
3627
+ handRaisedListeners.current.add(cb);
3628
+ return () => handRaisedListeners.current.delete(cb);
3629
+ },
3548
3630
  onNetworkQuality: (cb) => {
3549
3631
  networkQualityListeners.current.add(cb);
3550
3632
  return () => networkQualityListeners.current.delete(cb);
@@ -3560,6 +3642,18 @@ var MeetingProvider = ({
3560
3642
  return () => {
3561
3643
  activeSpeakerListeners.current.delete(cb);
3562
3644
  };
3645
+ },
3646
+ onParticipantJoined: (cb) => {
3647
+ participantJoinedListeners.current.add(cb);
3648
+ return () => participantJoinedListeners.current.delete(cb);
3649
+ },
3650
+ onChatMessage: (cb) => {
3651
+ chatMessageListeners.current.add(cb);
3652
+ return () => chatMessageListeners.current.delete(cb);
3653
+ },
3654
+ onParticipantLeft: (cb) => {
3655
+ participantLeftListeners.current.add(cb);
3656
+ return () => participantLeftListeners.current.delete(cb);
3563
3657
  }
3564
3658
  };
3565
3659
  }, [
@@ -3684,10 +3778,26 @@ var useMeeting = (handlers) => {
3684
3778
  if (!handlers?.onNetworkQuality) return;
3685
3779
  return ctx.onNetworkQuality(handlers.onNetworkQuality);
3686
3780
  }, [handlers?.onNetworkQuality]);
3781
+ (0, import_react4.useEffect)(() => {
3782
+ if (!handlers?.onParticipantJoined) return;
3783
+ return ctx.onParticipantJoined(handlers.onParticipantJoined);
3784
+ }, [handlers?.onParticipantJoined]);
3785
+ (0, import_react4.useEffect)(() => {
3786
+ if (!handlers?.onParticipantLeft) return;
3787
+ return ctx.onParticipantLeft(handlers.onParticipantLeft);
3788
+ }, [handlers?.onParticipantLeft]);
3789
+ (0, import_react4.useEffect)(() => {
3790
+ if (!handlers?.onChatMessage) return;
3791
+ return ctx.onChatMessage(handlers.onChatMessage);
3792
+ }, [handlers?.onChatMessage]);
3687
3793
  (0, import_react4.useEffect)(() => {
3688
3794
  if (!handlers?.onReaction) return;
3689
3795
  return ctx.onReaction(handlers.onReaction);
3690
3796
  }, [handlers?.onReaction]);
3797
+ (0, import_react4.useEffect)(() => {
3798
+ if (!handlers?.onHandRaised) return;
3799
+ return ctx.onHandRaised(handlers.onHandRaised);
3800
+ }, [handlers?.onHandRaised]);
3691
3801
  const { sdk: _, ...publicApi } = ctx;
3692
3802
  return publicApi;
3693
3803
  };