@defcomm/meetingsdk 0.6.0 → 0.6.1

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
@@ -26,7 +26,6 @@ type Events = {
26
26
  onMeetingLeft?: () => void;
27
27
  onChatMessage?: (msg: ChatMessage) => void;
28
28
  onReaction?: (reaction: Reaction) => void;
29
- onLiveTranscript?: (transcript: LiveTranscript) => void;
30
29
  onNetworkQuality?: (quality: NetworkQuality) => void;
31
30
  onScreenShareStarted?: (peerId: string, stream: MediaStream) => void;
32
31
  onScreenShareStopped?: (peerId: string) => void;
@@ -130,19 +129,10 @@ type MeetingConfig = {
130
129
  name: string;
131
130
  audioMuted?: boolean;
132
131
  videoMuted?: boolean;
132
+ cameraDeviceId?: string;
133
+ microphoneDeviceId?: string;
133
134
  token: string;
134
135
  };
135
- type LiveTranscript = {
136
- transcript_id: string;
137
- participant_id: string;
138
- speaker_name?: string | null;
139
- sequence: number;
140
- text: string;
141
- offset_ms?: number | null;
142
- start_ms?: number | null;
143
- end_ms?: number | null;
144
- timestamp: string;
145
- };
146
136
  type TranscriptSegment = {
147
137
  id: string;
148
138
  transcript_session_id: string;
@@ -207,7 +197,7 @@ type RecordingInfo = {
207
197
  active?: boolean;
208
198
  late_join?: boolean;
209
199
  };
210
- type StateScope = "participants" | "localParticipant" | "chat" | "presenter" | "activeSpeakers" | "recording" | "transcript" | "networkQuality" | `participant:${string}`;
200
+ type StateScope = "participants" | "localParticipant" | "chat" | "presenter" | "activeSpeakers" | "recording" | "networkQuality" | `participant:${string}`;
211
201
  type SDKError = {
212
202
  code: string;
213
203
  message: string;
@@ -245,7 +235,6 @@ interface VideoSDKCoreOptions {
245
235
  onRoomUpdate?: (data: any) => void;
246
236
  onChatMessage?: (message: ChatMessage) => void;
247
237
  onReaction?: (reaction: Reaction) => void;
248
- onLiveTranscript?: (transcript: LiveTranscript) => void;
249
238
  onNetworkQuality?: (quality: NetworkQuality) => void;
250
239
  onMuteStateChanged?: (peerId: string, kind: "audio" | "video", muted: boolean) => void;
251
240
  }
@@ -278,7 +267,6 @@ declare class MeetingState {
278
267
  presenterId: string | null;
279
268
  activeSpeakerIds: Set<string>;
280
269
  recording: RecordingInfo | null;
281
- liveTranscripts: LiveTranscript[];
282
270
  networkQuality: NetworkQuality | null;
283
271
  private listeners;
284
272
  subscribe(scope: StateScope, fn: Listener): () => void;
@@ -287,9 +275,6 @@ declare class MeetingState {
287
275
  setActiveSpeakers(ids: string[]): void;
288
276
  setRecording(recording: RecordingInfo | null): void;
289
277
  clearRecording(): void;
290
- addLiveTranscript(transcript: LiveTranscript): void;
291
- getLiveTranscripts(): LiveTranscript[];
292
- clearLiveTranscripts(): void;
293
278
  setNetworkQuality(quality: NetworkQuality | null): void;
294
279
  addParticipant(p: Participant): boolean;
295
280
  removeParticipant(id: string): void;
@@ -356,6 +341,9 @@ declare class VideoSDKCore {
356
341
  getModerators(roomCode: string): Promise<any>;
357
342
  addModerator(roomCode: string, userId: string): Promise<any>;
358
343
  removeModerator(roomCode: string, userId: string): Promise<any>;
344
+ getMediaDevices(): Promise<MediaDeviceInfo[]>;
345
+ selectCamera(deviceId: string): Promise<MediaStreamTrack>;
346
+ selectMicrophone(deviceId: string): Promise<MediaStreamTrack>;
359
347
  toggleMic(): void;
360
348
  toggleCam(): void;
361
349
  startScreenShare(): Promise<MediaStream | null>;
@@ -376,9 +364,6 @@ declare class VideoSDKCore {
376
364
  * to know about those wire-level message types.
377
365
  */
378
366
  publishPubSub<T extends PubSubTopic>(topic: T, data: PubSubTopicConfig[T]["publish"]): void;
379
- startLiveTranscription(): Promise<void>;
380
- stopLiveTranscription(): void;
381
- isLiveTranscriptionActive(): boolean;
382
367
  getNetworkQuality(): NetworkQuality | null;
383
368
  private cleanupRemoteParticipant;
384
369
  disconnect(): Promise<void>;
@@ -415,6 +400,9 @@ type MeetingContextValue = {
415
400
  }) => Promise<any>;
416
401
  getRoom: (roomCode: string) => Promise<any>;
417
402
  deleteRoom: (roomCode: string) => Promise<any>;
403
+ getMediaDevices: () => Promise<MediaDeviceInfo[]>;
404
+ selectCamera: (deviceId: string) => Promise<MediaStreamTrack>;
405
+ selectMicrophone: (deviceId: string) => Promise<MediaStreamTrack>;
418
406
  getTranscript: (roomCode: string, sessionId?: string) => Promise<TranscriptResponse>;
419
407
  getMeetingSummary: (roomCode: string, sessionId: string) => Promise<{
420
408
  summary: MeetingSummary | null;
@@ -434,11 +422,7 @@ type MeetingContextValue = {
434
422
  messages: ChatMessage[];
435
423
  presenterId: string | null;
436
424
  activeSpeakerIds: string[];
437
- liveTranscripts: LiveTranscript[];
438
425
  networkQuality: NetworkQuality | null;
439
- startLiveTranscription: () => Promise<void>;
440
- stopLiveTranscription: () => void;
441
- isLiveTranscriptionActive: () => boolean;
442
426
  recording: RecordingInfo | null;
443
427
  usePubSub: <T extends PubSubTopic>(topic: T) => PubSubHandleForTopic<T>;
444
428
  onPubSubMessage: <T extends PubSubTopic>(topic: T, cb: (message: PubSubMessage<PubSubTopicConfig[T]["message"]>) => void) => () => void;
@@ -468,7 +452,6 @@ type MeetingContextValue = {
468
452
  onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
469
453
  onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
470
454
  onNetworkQuality: (cb: (quality: NetworkQuality) => void) => () => void;
471
- onLiveTranscript: (cb: (transcript: LiveTranscript) => void) => () => void;
472
455
  };
473
456
  declare const MeetingProvider: ({ config, children, }: {
474
457
  config: MeetingConfig;
@@ -490,7 +473,6 @@ declare const useMeeting: (handlers?: {
490
473
  onReaction?: (reaction: any) => void;
491
474
  onActiveSpeakersChanged?: (participantIds: string[]) => void;
492
475
  onConnectionStateChanged?: (state: SFUConnectionState) => void;
493
- onLiveTranscript?: (transcript: LiveTranscript) => void;
494
476
  onNetworkQuality?: (quality: NetworkQuality) => void;
495
477
  }) => {
496
478
  join: (config?: Omit<MeetingConfig, "participantId" | "token">) => Promise<void>;
@@ -504,6 +486,9 @@ declare const useMeeting: (handlers?: {
504
486
  }) => Promise<any>;
505
487
  getRoom: (roomCode: string) => Promise<any>;
506
488
  deleteRoom: (roomCode: string) => Promise<any>;
489
+ getMediaDevices: () => Promise<MediaDeviceInfo[]>;
490
+ selectCamera: (deviceId: string) => Promise<MediaStreamTrack>;
491
+ selectMicrophone: (deviceId: string) => Promise<MediaStreamTrack>;
507
492
  getTranscript: (roomCode: string, sessionId?: string) => Promise<TranscriptResponse>;
508
493
  getMeetingSummary: (roomCode: string, sessionId: string) => Promise<{
509
494
  summary: MeetingSummary | null;
@@ -523,11 +508,7 @@ declare const useMeeting: (handlers?: {
523
508
  messages: ChatMessage[];
524
509
  presenterId: string | null;
525
510
  activeSpeakerIds: string[];
526
- liveTranscripts: LiveTranscript[];
527
511
  networkQuality: NetworkQuality | null;
528
- startLiveTranscription: () => Promise<void>;
529
- stopLiveTranscription: () => void;
530
- isLiveTranscriptionActive: () => boolean;
531
512
  recording: RecordingInfo | null;
532
513
  usePubSub: <T extends PubSubTopic>(topic: T) => PubSubHandleForTopic<T>;
533
514
  onPubSubMessage: <T extends PubSubTopic>(topic: T, cb: (message: PubSubMessage<PubSubTopicConfig[T]["message"]>) => void) => () => void;
@@ -557,7 +538,6 @@ declare const useMeeting: (handlers?: {
557
538
  onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
558
539
  onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
559
540
  onNetworkQuality: (cb: (quality: NetworkQuality) => void) => () => void;
560
- onLiveTranscript: (cb: (transcript: LiveTranscript) => void) => () => void;
561
541
  };
562
542
 
563
543
  declare const useParticipants: () => Participant[];
@@ -605,8 +585,6 @@ declare function useMeetingPreview(roomId: string, participantId: string): {
605
585
  error: string | null;
606
586
  };
607
587
 
608
- declare const useLiveTranscript: () => LiveTranscript[];
609
-
610
588
  declare const useNetworkQuality: () => NetworkQuality | null;
611
589
 
612
590
  interface ActiveSpeakerDetectorOptions {
@@ -645,4 +623,4 @@ declare function usePubSub<T extends PubSubTopic>(topic: T, options?: {
645
623
  onMessageReceived?: (message: PubSubMessage<PubSubTopicConfig[T]["message"]>) => void;
646
624
  }): PubSubHandleForTopic<T>;
647
625
 
648
- export { ActiveSpeakerDetector, type ChatInput, type LiveTranscript, type MeetingConfig, MeetingProvider, MeetingState, type MeetingSummary, type NetworkQuality, type Participant, type ParticipantInfo, type PubSubHandle, type PubSubHandleForTopic, type PubSubMessage, type PubSubTopic, type PubSubTopicConfig, type Reaction, type RecordingInfo, type SFUConnectionState, type TrackInfo, type TranscriptResponse, type TranscriptSegment, type TranscriptSession, VideoSDKCore, useLiveTranscript, useLocalParticipant, useMeeting, useMeetingContext, useMeetingPreview, useNetworkQuality, useParticipants, usePubSub, useRemoteMedia };
626
+ export { ActiveSpeakerDetector, type ChatInput, type MeetingConfig, MeetingProvider, MeetingState, type MeetingSummary, type NetworkQuality, type Participant, type ParticipantInfo, type PubSubHandle, type PubSubHandleForTopic, type PubSubMessage, type PubSubTopic, type PubSubTopicConfig, type Reaction, type RecordingInfo, type SFUConnectionState, type TrackInfo, type TranscriptResponse, type TranscriptSegment, type TranscriptSession, VideoSDKCore, useLocalParticipant, useMeeting, useMeetingContext, useMeetingPreview, useNetworkQuality, useParticipants, usePubSub, useRemoteMedia };
package/dist/index.d.ts CHANGED
@@ -26,7 +26,6 @@ type Events = {
26
26
  onMeetingLeft?: () => void;
27
27
  onChatMessage?: (msg: ChatMessage) => void;
28
28
  onReaction?: (reaction: Reaction) => void;
29
- onLiveTranscript?: (transcript: LiveTranscript) => void;
30
29
  onNetworkQuality?: (quality: NetworkQuality) => void;
31
30
  onScreenShareStarted?: (peerId: string, stream: MediaStream) => void;
32
31
  onScreenShareStopped?: (peerId: string) => void;
@@ -130,19 +129,10 @@ type MeetingConfig = {
130
129
  name: string;
131
130
  audioMuted?: boolean;
132
131
  videoMuted?: boolean;
132
+ cameraDeviceId?: string;
133
+ microphoneDeviceId?: string;
133
134
  token: string;
134
135
  };
135
- type LiveTranscript = {
136
- transcript_id: string;
137
- participant_id: string;
138
- speaker_name?: string | null;
139
- sequence: number;
140
- text: string;
141
- offset_ms?: number | null;
142
- start_ms?: number | null;
143
- end_ms?: number | null;
144
- timestamp: string;
145
- };
146
136
  type TranscriptSegment = {
147
137
  id: string;
148
138
  transcript_session_id: string;
@@ -207,7 +197,7 @@ type RecordingInfo = {
207
197
  active?: boolean;
208
198
  late_join?: boolean;
209
199
  };
210
- type StateScope = "participants" | "localParticipant" | "chat" | "presenter" | "activeSpeakers" | "recording" | "transcript" | "networkQuality" | `participant:${string}`;
200
+ type StateScope = "participants" | "localParticipant" | "chat" | "presenter" | "activeSpeakers" | "recording" | "networkQuality" | `participant:${string}`;
211
201
  type SDKError = {
212
202
  code: string;
213
203
  message: string;
@@ -245,7 +235,6 @@ interface VideoSDKCoreOptions {
245
235
  onRoomUpdate?: (data: any) => void;
246
236
  onChatMessage?: (message: ChatMessage) => void;
247
237
  onReaction?: (reaction: Reaction) => void;
248
- onLiveTranscript?: (transcript: LiveTranscript) => void;
249
238
  onNetworkQuality?: (quality: NetworkQuality) => void;
250
239
  onMuteStateChanged?: (peerId: string, kind: "audio" | "video", muted: boolean) => void;
251
240
  }
@@ -278,7 +267,6 @@ declare class MeetingState {
278
267
  presenterId: string | null;
279
268
  activeSpeakerIds: Set<string>;
280
269
  recording: RecordingInfo | null;
281
- liveTranscripts: LiveTranscript[];
282
270
  networkQuality: NetworkQuality | null;
283
271
  private listeners;
284
272
  subscribe(scope: StateScope, fn: Listener): () => void;
@@ -287,9 +275,6 @@ declare class MeetingState {
287
275
  setActiveSpeakers(ids: string[]): void;
288
276
  setRecording(recording: RecordingInfo | null): void;
289
277
  clearRecording(): void;
290
- addLiveTranscript(transcript: LiveTranscript): void;
291
- getLiveTranscripts(): LiveTranscript[];
292
- clearLiveTranscripts(): void;
293
278
  setNetworkQuality(quality: NetworkQuality | null): void;
294
279
  addParticipant(p: Participant): boolean;
295
280
  removeParticipant(id: string): void;
@@ -356,6 +341,9 @@ declare class VideoSDKCore {
356
341
  getModerators(roomCode: string): Promise<any>;
357
342
  addModerator(roomCode: string, userId: string): Promise<any>;
358
343
  removeModerator(roomCode: string, userId: string): Promise<any>;
344
+ getMediaDevices(): Promise<MediaDeviceInfo[]>;
345
+ selectCamera(deviceId: string): Promise<MediaStreamTrack>;
346
+ selectMicrophone(deviceId: string): Promise<MediaStreamTrack>;
359
347
  toggleMic(): void;
360
348
  toggleCam(): void;
361
349
  startScreenShare(): Promise<MediaStream | null>;
@@ -376,9 +364,6 @@ declare class VideoSDKCore {
376
364
  * to know about those wire-level message types.
377
365
  */
378
366
  publishPubSub<T extends PubSubTopic>(topic: T, data: PubSubTopicConfig[T]["publish"]): void;
379
- startLiveTranscription(): Promise<void>;
380
- stopLiveTranscription(): void;
381
- isLiveTranscriptionActive(): boolean;
382
367
  getNetworkQuality(): NetworkQuality | null;
383
368
  private cleanupRemoteParticipant;
384
369
  disconnect(): Promise<void>;
@@ -415,6 +400,9 @@ type MeetingContextValue = {
415
400
  }) => Promise<any>;
416
401
  getRoom: (roomCode: string) => Promise<any>;
417
402
  deleteRoom: (roomCode: string) => Promise<any>;
403
+ getMediaDevices: () => Promise<MediaDeviceInfo[]>;
404
+ selectCamera: (deviceId: string) => Promise<MediaStreamTrack>;
405
+ selectMicrophone: (deviceId: string) => Promise<MediaStreamTrack>;
418
406
  getTranscript: (roomCode: string, sessionId?: string) => Promise<TranscriptResponse>;
419
407
  getMeetingSummary: (roomCode: string, sessionId: string) => Promise<{
420
408
  summary: MeetingSummary | null;
@@ -434,11 +422,7 @@ type MeetingContextValue = {
434
422
  messages: ChatMessage[];
435
423
  presenterId: string | null;
436
424
  activeSpeakerIds: string[];
437
- liveTranscripts: LiveTranscript[];
438
425
  networkQuality: NetworkQuality | null;
439
- startLiveTranscription: () => Promise<void>;
440
- stopLiveTranscription: () => void;
441
- isLiveTranscriptionActive: () => boolean;
442
426
  recording: RecordingInfo | null;
443
427
  usePubSub: <T extends PubSubTopic>(topic: T) => PubSubHandleForTopic<T>;
444
428
  onPubSubMessage: <T extends PubSubTopic>(topic: T, cb: (message: PubSubMessage<PubSubTopicConfig[T]["message"]>) => void) => () => void;
@@ -468,7 +452,6 @@ type MeetingContextValue = {
468
452
  onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
469
453
  onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
470
454
  onNetworkQuality: (cb: (quality: NetworkQuality) => void) => () => void;
471
- onLiveTranscript: (cb: (transcript: LiveTranscript) => void) => () => void;
472
455
  };
473
456
  declare const MeetingProvider: ({ config, children, }: {
474
457
  config: MeetingConfig;
@@ -490,7 +473,6 @@ declare const useMeeting: (handlers?: {
490
473
  onReaction?: (reaction: any) => void;
491
474
  onActiveSpeakersChanged?: (participantIds: string[]) => void;
492
475
  onConnectionStateChanged?: (state: SFUConnectionState) => void;
493
- onLiveTranscript?: (transcript: LiveTranscript) => void;
494
476
  onNetworkQuality?: (quality: NetworkQuality) => void;
495
477
  }) => {
496
478
  join: (config?: Omit<MeetingConfig, "participantId" | "token">) => Promise<void>;
@@ -504,6 +486,9 @@ declare const useMeeting: (handlers?: {
504
486
  }) => Promise<any>;
505
487
  getRoom: (roomCode: string) => Promise<any>;
506
488
  deleteRoom: (roomCode: string) => Promise<any>;
489
+ getMediaDevices: () => Promise<MediaDeviceInfo[]>;
490
+ selectCamera: (deviceId: string) => Promise<MediaStreamTrack>;
491
+ selectMicrophone: (deviceId: string) => Promise<MediaStreamTrack>;
507
492
  getTranscript: (roomCode: string, sessionId?: string) => Promise<TranscriptResponse>;
508
493
  getMeetingSummary: (roomCode: string, sessionId: string) => Promise<{
509
494
  summary: MeetingSummary | null;
@@ -523,11 +508,7 @@ declare const useMeeting: (handlers?: {
523
508
  messages: ChatMessage[];
524
509
  presenterId: string | null;
525
510
  activeSpeakerIds: string[];
526
- liveTranscripts: LiveTranscript[];
527
511
  networkQuality: NetworkQuality | null;
528
- startLiveTranscription: () => Promise<void>;
529
- stopLiveTranscription: () => void;
530
- isLiveTranscriptionActive: () => boolean;
531
512
  recording: RecordingInfo | null;
532
513
  usePubSub: <T extends PubSubTopic>(topic: T) => PubSubHandleForTopic<T>;
533
514
  onPubSubMessage: <T extends PubSubTopic>(topic: T, cb: (message: PubSubMessage<PubSubTopicConfig[T]["message"]>) => void) => () => void;
@@ -557,7 +538,6 @@ declare const useMeeting: (handlers?: {
557
538
  onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
558
539
  onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
559
540
  onNetworkQuality: (cb: (quality: NetworkQuality) => void) => () => void;
560
- onLiveTranscript: (cb: (transcript: LiveTranscript) => void) => () => void;
561
541
  };
562
542
 
563
543
  declare const useParticipants: () => Participant[];
@@ -605,8 +585,6 @@ declare function useMeetingPreview(roomId: string, participantId: string): {
605
585
  error: string | null;
606
586
  };
607
587
 
608
- declare const useLiveTranscript: () => LiveTranscript[];
609
-
610
588
  declare const useNetworkQuality: () => NetworkQuality | null;
611
589
 
612
590
  interface ActiveSpeakerDetectorOptions {
@@ -645,4 +623,4 @@ declare function usePubSub<T extends PubSubTopic>(topic: T, options?: {
645
623
  onMessageReceived?: (message: PubSubMessage<PubSubTopicConfig[T]["message"]>) => void;
646
624
  }): PubSubHandleForTopic<T>;
647
625
 
648
- export { ActiveSpeakerDetector, type ChatInput, type LiveTranscript, type MeetingConfig, MeetingProvider, MeetingState, type MeetingSummary, type NetworkQuality, type Participant, type ParticipantInfo, type PubSubHandle, type PubSubHandleForTopic, type PubSubMessage, type PubSubTopic, type PubSubTopicConfig, type Reaction, type RecordingInfo, type SFUConnectionState, type TrackInfo, type TranscriptResponse, type TranscriptSegment, type TranscriptSession, VideoSDKCore, useLiveTranscript, useLocalParticipant, useMeeting, useMeetingContext, useMeetingPreview, useNetworkQuality, useParticipants, usePubSub, useRemoteMedia };
626
+ export { ActiveSpeakerDetector, type ChatInput, type MeetingConfig, MeetingProvider, MeetingState, type MeetingSummary, type NetworkQuality, type Participant, type ParticipantInfo, type PubSubHandle, type PubSubHandleForTopic, type PubSubMessage, type PubSubTopic, type PubSubTopicConfig, type Reaction, type RecordingInfo, type SFUConnectionState, type TrackInfo, type TranscriptResponse, type TranscriptSegment, type TranscriptSession, VideoSDKCore, useLocalParticipant, useMeeting, useMeetingContext, useMeetingPreview, useNetworkQuality, useParticipants, usePubSub, useRemoteMedia };