@defcomm/meetingsdk 0.6.0 → 0.6.2
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/README.md +742 -899
- package/dist/index.d.mts +26 -35
- package/dist/index.d.ts +26 -35
- package/dist/index.js +169 -119
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +169 -118
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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,10 +25,11 @@ 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;
|
|
29
|
-
onLiveTranscript?: (transcript: LiveTranscript) => void;
|
|
30
33
|
onNetworkQuality?: (quality: NetworkQuality) => void;
|
|
31
34
|
onScreenShareStarted?: (peerId: string, stream: MediaStream) => void;
|
|
32
35
|
onScreenShareStopped?: (peerId: string) => void;
|
|
@@ -130,19 +133,10 @@ type MeetingConfig = {
|
|
|
130
133
|
name: string;
|
|
131
134
|
audioMuted?: boolean;
|
|
132
135
|
videoMuted?: boolean;
|
|
136
|
+
cameraDeviceId?: string;
|
|
137
|
+
microphoneDeviceId?: string;
|
|
133
138
|
token: string;
|
|
134
139
|
};
|
|
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
140
|
type TranscriptSegment = {
|
|
147
141
|
id: string;
|
|
148
142
|
transcript_session_id: string;
|
|
@@ -207,7 +201,7 @@ type RecordingInfo = {
|
|
|
207
201
|
active?: boolean;
|
|
208
202
|
late_join?: boolean;
|
|
209
203
|
};
|
|
210
|
-
type StateScope = "participants" | "localParticipant" | "chat" | "presenter" | "activeSpeakers" | "recording" | "
|
|
204
|
+
type StateScope = "participants" | "localParticipant" | "chat" | "presenter" | "activeSpeakers" | "recording" | "networkQuality" | `participant:${string}`;
|
|
211
205
|
type SDKError = {
|
|
212
206
|
code: string;
|
|
213
207
|
message: string;
|
|
@@ -245,7 +239,6 @@ interface VideoSDKCoreOptions {
|
|
|
245
239
|
onRoomUpdate?: (data: any) => void;
|
|
246
240
|
onChatMessage?: (message: ChatMessage) => void;
|
|
247
241
|
onReaction?: (reaction: Reaction) => void;
|
|
248
|
-
onLiveTranscript?: (transcript: LiveTranscript) => void;
|
|
249
242
|
onNetworkQuality?: (quality: NetworkQuality) => void;
|
|
250
243
|
onMuteStateChanged?: (peerId: string, kind: "audio" | "video", muted: boolean) => void;
|
|
251
244
|
}
|
|
@@ -278,7 +271,6 @@ declare class MeetingState {
|
|
|
278
271
|
presenterId: string | null;
|
|
279
272
|
activeSpeakerIds: Set<string>;
|
|
280
273
|
recording: RecordingInfo | null;
|
|
281
|
-
liveTranscripts: LiveTranscript[];
|
|
282
274
|
networkQuality: NetworkQuality | null;
|
|
283
275
|
private listeners;
|
|
284
276
|
subscribe(scope: StateScope, fn: Listener): () => void;
|
|
@@ -287,9 +279,6 @@ declare class MeetingState {
|
|
|
287
279
|
setActiveSpeakers(ids: string[]): void;
|
|
288
280
|
setRecording(recording: RecordingInfo | null): void;
|
|
289
281
|
clearRecording(): void;
|
|
290
|
-
addLiveTranscript(transcript: LiveTranscript): void;
|
|
291
|
-
getLiveTranscripts(): LiveTranscript[];
|
|
292
|
-
clearLiveTranscripts(): void;
|
|
293
282
|
setNetworkQuality(quality: NetworkQuality | null): void;
|
|
294
283
|
addParticipant(p: Participant): boolean;
|
|
295
284
|
removeParticipant(id: string): void;
|
|
@@ -356,6 +345,9 @@ declare class VideoSDKCore {
|
|
|
356
345
|
getModerators(roomCode: string): Promise<any>;
|
|
357
346
|
addModerator(roomCode: string, userId: string): Promise<any>;
|
|
358
347
|
removeModerator(roomCode: string, userId: string): Promise<any>;
|
|
348
|
+
getMediaDevices(): Promise<MediaDeviceInfo[]>;
|
|
349
|
+
selectCamera(deviceId: string): Promise<MediaStreamTrack>;
|
|
350
|
+
selectMicrophone(deviceId: string): Promise<MediaStreamTrack>;
|
|
359
351
|
toggleMic(): void;
|
|
360
352
|
toggleCam(): void;
|
|
361
353
|
startScreenShare(): Promise<MediaStream | null>;
|
|
@@ -376,9 +368,6 @@ declare class VideoSDKCore {
|
|
|
376
368
|
* to know about those wire-level message types.
|
|
377
369
|
*/
|
|
378
370
|
publishPubSub<T extends PubSubTopic>(topic: T, data: PubSubTopicConfig[T]["publish"]): void;
|
|
379
|
-
startLiveTranscription(): Promise<void>;
|
|
380
|
-
stopLiveTranscription(): void;
|
|
381
|
-
isLiveTranscriptionActive(): boolean;
|
|
382
371
|
getNetworkQuality(): NetworkQuality | null;
|
|
383
372
|
private cleanupRemoteParticipant;
|
|
384
373
|
disconnect(): Promise<void>;
|
|
@@ -415,6 +404,9 @@ type MeetingContextValue = {
|
|
|
415
404
|
}) => Promise<any>;
|
|
416
405
|
getRoom: (roomCode: string) => Promise<any>;
|
|
417
406
|
deleteRoom: (roomCode: string) => Promise<any>;
|
|
407
|
+
getMediaDevices: () => Promise<MediaDeviceInfo[]>;
|
|
408
|
+
selectCamera: (deviceId: string) => Promise<MediaStreamTrack>;
|
|
409
|
+
selectMicrophone: (deviceId: string) => Promise<MediaStreamTrack>;
|
|
418
410
|
getTranscript: (roomCode: string, sessionId?: string) => Promise<TranscriptResponse>;
|
|
419
411
|
getMeetingSummary: (roomCode: string, sessionId: string) => Promise<{
|
|
420
412
|
summary: MeetingSummary | null;
|
|
@@ -434,11 +426,7 @@ type MeetingContextValue = {
|
|
|
434
426
|
messages: ChatMessage[];
|
|
435
427
|
presenterId: string | null;
|
|
436
428
|
activeSpeakerIds: string[];
|
|
437
|
-
liveTranscripts: LiveTranscript[];
|
|
438
429
|
networkQuality: NetworkQuality | null;
|
|
439
|
-
startLiveTranscription: () => Promise<void>;
|
|
440
|
-
stopLiveTranscription: () => void;
|
|
441
|
-
isLiveTranscriptionActive: () => boolean;
|
|
442
430
|
recording: RecordingInfo | null;
|
|
443
431
|
usePubSub: <T extends PubSubTopic>(topic: T) => PubSubHandleForTopic<T>;
|
|
444
432
|
onPubSubMessage: <T extends PubSubTopic>(topic: T, cb: (message: PubSubMessage<PubSubTopicConfig[T]["message"]>) => void) => () => void;
|
|
@@ -468,7 +456,9 @@ type MeetingContextValue = {
|
|
|
468
456
|
onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
|
|
469
457
|
onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
|
|
470
458
|
onNetworkQuality: (cb: (quality: NetworkQuality) => void) => () => void;
|
|
471
|
-
|
|
459
|
+
onChatMessage: (cb: (message: ChatMessage) => void) => () => void;
|
|
460
|
+
onParticipantJoined: (cb: (participant: Participant) => void) => () => void;
|
|
461
|
+
onParticipantLeft: (cb: (participant: Participant) => void) => () => void;
|
|
472
462
|
};
|
|
473
463
|
declare const MeetingProvider: ({ config, children, }: {
|
|
474
464
|
config: MeetingConfig;
|
|
@@ -490,8 +480,10 @@ declare const useMeeting: (handlers?: {
|
|
|
490
480
|
onReaction?: (reaction: any) => void;
|
|
491
481
|
onActiveSpeakersChanged?: (participantIds: string[]) => void;
|
|
492
482
|
onConnectionStateChanged?: (state: SFUConnectionState) => void;
|
|
493
|
-
onLiveTranscript?: (transcript: LiveTranscript) => void;
|
|
494
483
|
onNetworkQuality?: (quality: NetworkQuality) => void;
|
|
484
|
+
onParticipantJoined?: (participant: Participant) => void;
|
|
485
|
+
onParticipantLeft?: (participant: Participant) => void;
|
|
486
|
+
onChatMessage?: (message: ChatMessage) => void;
|
|
495
487
|
}) => {
|
|
496
488
|
join: (config?: Omit<MeetingConfig, "participantId" | "token">) => Promise<void>;
|
|
497
489
|
getJoinState: (roomCode: string) => Promise<JoinState>;
|
|
@@ -504,6 +496,9 @@ declare const useMeeting: (handlers?: {
|
|
|
504
496
|
}) => Promise<any>;
|
|
505
497
|
getRoom: (roomCode: string) => Promise<any>;
|
|
506
498
|
deleteRoom: (roomCode: string) => Promise<any>;
|
|
499
|
+
getMediaDevices: () => Promise<MediaDeviceInfo[]>;
|
|
500
|
+
selectCamera: (deviceId: string) => Promise<MediaStreamTrack>;
|
|
501
|
+
selectMicrophone: (deviceId: string) => Promise<MediaStreamTrack>;
|
|
507
502
|
getTranscript: (roomCode: string, sessionId?: string) => Promise<TranscriptResponse>;
|
|
508
503
|
getMeetingSummary: (roomCode: string, sessionId: string) => Promise<{
|
|
509
504
|
summary: MeetingSummary | null;
|
|
@@ -523,11 +518,7 @@ declare const useMeeting: (handlers?: {
|
|
|
523
518
|
messages: ChatMessage[];
|
|
524
519
|
presenterId: string | null;
|
|
525
520
|
activeSpeakerIds: string[];
|
|
526
|
-
liveTranscripts: LiveTranscript[];
|
|
527
521
|
networkQuality: NetworkQuality | null;
|
|
528
|
-
startLiveTranscription: () => Promise<void>;
|
|
529
|
-
stopLiveTranscription: () => void;
|
|
530
|
-
isLiveTranscriptionActive: () => boolean;
|
|
531
522
|
recording: RecordingInfo | null;
|
|
532
523
|
usePubSub: <T extends PubSubTopic>(topic: T) => PubSubHandleForTopic<T>;
|
|
533
524
|
onPubSubMessage: <T extends PubSubTopic>(topic: T, cb: (message: PubSubMessage<PubSubTopicConfig[T]["message"]>) => void) => () => void;
|
|
@@ -557,7 +548,9 @@ declare const useMeeting: (handlers?: {
|
|
|
557
548
|
onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
|
|
558
549
|
onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
|
|
559
550
|
onNetworkQuality: (cb: (quality: NetworkQuality) => void) => () => void;
|
|
560
|
-
|
|
551
|
+
onChatMessage: (cb: (message: ChatMessage) => void) => () => void;
|
|
552
|
+
onParticipantJoined: (cb: (participant: Participant) => void) => () => void;
|
|
553
|
+
onParticipantLeft: (cb: (participant: Participant) => void) => () => void;
|
|
561
554
|
};
|
|
562
555
|
|
|
563
556
|
declare const useParticipants: () => Participant[];
|
|
@@ -605,8 +598,6 @@ declare function useMeetingPreview(roomId: string, participantId: string): {
|
|
|
605
598
|
error: string | null;
|
|
606
599
|
};
|
|
607
600
|
|
|
608
|
-
declare const useLiveTranscript: () => LiveTranscript[];
|
|
609
|
-
|
|
610
601
|
declare const useNetworkQuality: () => NetworkQuality | null;
|
|
611
602
|
|
|
612
603
|
interface ActiveSpeakerDetectorOptions {
|
|
@@ -645,4 +636,4 @@ declare function usePubSub<T extends PubSubTopic>(topic: T, options?: {
|
|
|
645
636
|
onMessageReceived?: (message: PubSubMessage<PubSubTopicConfig[T]["message"]>) => void;
|
|
646
637
|
}): PubSubHandleForTopic<T>;
|
|
647
638
|
|
|
648
|
-
export { ActiveSpeakerDetector, type ChatInput, type
|
|
639
|
+
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
|
@@ -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,10 +25,11 @@ 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;
|
|
29
|
-
onLiveTranscript?: (transcript: LiveTranscript) => void;
|
|
30
33
|
onNetworkQuality?: (quality: NetworkQuality) => void;
|
|
31
34
|
onScreenShareStarted?: (peerId: string, stream: MediaStream) => void;
|
|
32
35
|
onScreenShareStopped?: (peerId: string) => void;
|
|
@@ -130,19 +133,10 @@ type MeetingConfig = {
|
|
|
130
133
|
name: string;
|
|
131
134
|
audioMuted?: boolean;
|
|
132
135
|
videoMuted?: boolean;
|
|
136
|
+
cameraDeviceId?: string;
|
|
137
|
+
microphoneDeviceId?: string;
|
|
133
138
|
token: string;
|
|
134
139
|
};
|
|
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
140
|
type TranscriptSegment = {
|
|
147
141
|
id: string;
|
|
148
142
|
transcript_session_id: string;
|
|
@@ -207,7 +201,7 @@ type RecordingInfo = {
|
|
|
207
201
|
active?: boolean;
|
|
208
202
|
late_join?: boolean;
|
|
209
203
|
};
|
|
210
|
-
type StateScope = "participants" | "localParticipant" | "chat" | "presenter" | "activeSpeakers" | "recording" | "
|
|
204
|
+
type StateScope = "participants" | "localParticipant" | "chat" | "presenter" | "activeSpeakers" | "recording" | "networkQuality" | `participant:${string}`;
|
|
211
205
|
type SDKError = {
|
|
212
206
|
code: string;
|
|
213
207
|
message: string;
|
|
@@ -245,7 +239,6 @@ interface VideoSDKCoreOptions {
|
|
|
245
239
|
onRoomUpdate?: (data: any) => void;
|
|
246
240
|
onChatMessage?: (message: ChatMessage) => void;
|
|
247
241
|
onReaction?: (reaction: Reaction) => void;
|
|
248
|
-
onLiveTranscript?: (transcript: LiveTranscript) => void;
|
|
249
242
|
onNetworkQuality?: (quality: NetworkQuality) => void;
|
|
250
243
|
onMuteStateChanged?: (peerId: string, kind: "audio" | "video", muted: boolean) => void;
|
|
251
244
|
}
|
|
@@ -278,7 +271,6 @@ declare class MeetingState {
|
|
|
278
271
|
presenterId: string | null;
|
|
279
272
|
activeSpeakerIds: Set<string>;
|
|
280
273
|
recording: RecordingInfo | null;
|
|
281
|
-
liveTranscripts: LiveTranscript[];
|
|
282
274
|
networkQuality: NetworkQuality | null;
|
|
283
275
|
private listeners;
|
|
284
276
|
subscribe(scope: StateScope, fn: Listener): () => void;
|
|
@@ -287,9 +279,6 @@ declare class MeetingState {
|
|
|
287
279
|
setActiveSpeakers(ids: string[]): void;
|
|
288
280
|
setRecording(recording: RecordingInfo | null): void;
|
|
289
281
|
clearRecording(): void;
|
|
290
|
-
addLiveTranscript(transcript: LiveTranscript): void;
|
|
291
|
-
getLiveTranscripts(): LiveTranscript[];
|
|
292
|
-
clearLiveTranscripts(): void;
|
|
293
282
|
setNetworkQuality(quality: NetworkQuality | null): void;
|
|
294
283
|
addParticipant(p: Participant): boolean;
|
|
295
284
|
removeParticipant(id: string): void;
|
|
@@ -356,6 +345,9 @@ declare class VideoSDKCore {
|
|
|
356
345
|
getModerators(roomCode: string): Promise<any>;
|
|
357
346
|
addModerator(roomCode: string, userId: string): Promise<any>;
|
|
358
347
|
removeModerator(roomCode: string, userId: string): Promise<any>;
|
|
348
|
+
getMediaDevices(): Promise<MediaDeviceInfo[]>;
|
|
349
|
+
selectCamera(deviceId: string): Promise<MediaStreamTrack>;
|
|
350
|
+
selectMicrophone(deviceId: string): Promise<MediaStreamTrack>;
|
|
359
351
|
toggleMic(): void;
|
|
360
352
|
toggleCam(): void;
|
|
361
353
|
startScreenShare(): Promise<MediaStream | null>;
|
|
@@ -376,9 +368,6 @@ declare class VideoSDKCore {
|
|
|
376
368
|
* to know about those wire-level message types.
|
|
377
369
|
*/
|
|
378
370
|
publishPubSub<T extends PubSubTopic>(topic: T, data: PubSubTopicConfig[T]["publish"]): void;
|
|
379
|
-
startLiveTranscription(): Promise<void>;
|
|
380
|
-
stopLiveTranscription(): void;
|
|
381
|
-
isLiveTranscriptionActive(): boolean;
|
|
382
371
|
getNetworkQuality(): NetworkQuality | null;
|
|
383
372
|
private cleanupRemoteParticipant;
|
|
384
373
|
disconnect(): Promise<void>;
|
|
@@ -415,6 +404,9 @@ type MeetingContextValue = {
|
|
|
415
404
|
}) => Promise<any>;
|
|
416
405
|
getRoom: (roomCode: string) => Promise<any>;
|
|
417
406
|
deleteRoom: (roomCode: string) => Promise<any>;
|
|
407
|
+
getMediaDevices: () => Promise<MediaDeviceInfo[]>;
|
|
408
|
+
selectCamera: (deviceId: string) => Promise<MediaStreamTrack>;
|
|
409
|
+
selectMicrophone: (deviceId: string) => Promise<MediaStreamTrack>;
|
|
418
410
|
getTranscript: (roomCode: string, sessionId?: string) => Promise<TranscriptResponse>;
|
|
419
411
|
getMeetingSummary: (roomCode: string, sessionId: string) => Promise<{
|
|
420
412
|
summary: MeetingSummary | null;
|
|
@@ -434,11 +426,7 @@ type MeetingContextValue = {
|
|
|
434
426
|
messages: ChatMessage[];
|
|
435
427
|
presenterId: string | null;
|
|
436
428
|
activeSpeakerIds: string[];
|
|
437
|
-
liveTranscripts: LiveTranscript[];
|
|
438
429
|
networkQuality: NetworkQuality | null;
|
|
439
|
-
startLiveTranscription: () => Promise<void>;
|
|
440
|
-
stopLiveTranscription: () => void;
|
|
441
|
-
isLiveTranscriptionActive: () => boolean;
|
|
442
430
|
recording: RecordingInfo | null;
|
|
443
431
|
usePubSub: <T extends PubSubTopic>(topic: T) => PubSubHandleForTopic<T>;
|
|
444
432
|
onPubSubMessage: <T extends PubSubTopic>(topic: T, cb: (message: PubSubMessage<PubSubTopicConfig[T]["message"]>) => void) => () => void;
|
|
@@ -468,7 +456,9 @@ type MeetingContextValue = {
|
|
|
468
456
|
onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
|
|
469
457
|
onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
|
|
470
458
|
onNetworkQuality: (cb: (quality: NetworkQuality) => void) => () => void;
|
|
471
|
-
|
|
459
|
+
onChatMessage: (cb: (message: ChatMessage) => void) => () => void;
|
|
460
|
+
onParticipantJoined: (cb: (participant: Participant) => void) => () => void;
|
|
461
|
+
onParticipantLeft: (cb: (participant: Participant) => void) => () => void;
|
|
472
462
|
};
|
|
473
463
|
declare const MeetingProvider: ({ config, children, }: {
|
|
474
464
|
config: MeetingConfig;
|
|
@@ -490,8 +480,10 @@ declare const useMeeting: (handlers?: {
|
|
|
490
480
|
onReaction?: (reaction: any) => void;
|
|
491
481
|
onActiveSpeakersChanged?: (participantIds: string[]) => void;
|
|
492
482
|
onConnectionStateChanged?: (state: SFUConnectionState) => void;
|
|
493
|
-
onLiveTranscript?: (transcript: LiveTranscript) => void;
|
|
494
483
|
onNetworkQuality?: (quality: NetworkQuality) => void;
|
|
484
|
+
onParticipantJoined?: (participant: Participant) => void;
|
|
485
|
+
onParticipantLeft?: (participant: Participant) => void;
|
|
486
|
+
onChatMessage?: (message: ChatMessage) => void;
|
|
495
487
|
}) => {
|
|
496
488
|
join: (config?: Omit<MeetingConfig, "participantId" | "token">) => Promise<void>;
|
|
497
489
|
getJoinState: (roomCode: string) => Promise<JoinState>;
|
|
@@ -504,6 +496,9 @@ declare const useMeeting: (handlers?: {
|
|
|
504
496
|
}) => Promise<any>;
|
|
505
497
|
getRoom: (roomCode: string) => Promise<any>;
|
|
506
498
|
deleteRoom: (roomCode: string) => Promise<any>;
|
|
499
|
+
getMediaDevices: () => Promise<MediaDeviceInfo[]>;
|
|
500
|
+
selectCamera: (deviceId: string) => Promise<MediaStreamTrack>;
|
|
501
|
+
selectMicrophone: (deviceId: string) => Promise<MediaStreamTrack>;
|
|
507
502
|
getTranscript: (roomCode: string, sessionId?: string) => Promise<TranscriptResponse>;
|
|
508
503
|
getMeetingSummary: (roomCode: string, sessionId: string) => Promise<{
|
|
509
504
|
summary: MeetingSummary | null;
|
|
@@ -523,11 +518,7 @@ declare const useMeeting: (handlers?: {
|
|
|
523
518
|
messages: ChatMessage[];
|
|
524
519
|
presenterId: string | null;
|
|
525
520
|
activeSpeakerIds: string[];
|
|
526
|
-
liveTranscripts: LiveTranscript[];
|
|
527
521
|
networkQuality: NetworkQuality | null;
|
|
528
|
-
startLiveTranscription: () => Promise<void>;
|
|
529
|
-
stopLiveTranscription: () => void;
|
|
530
|
-
isLiveTranscriptionActive: () => boolean;
|
|
531
522
|
recording: RecordingInfo | null;
|
|
532
523
|
usePubSub: <T extends PubSubTopic>(topic: T) => PubSubHandleForTopic<T>;
|
|
533
524
|
onPubSubMessage: <T extends PubSubTopic>(topic: T, cb: (message: PubSubMessage<PubSubTopicConfig[T]["message"]>) => void) => () => void;
|
|
@@ -557,7 +548,9 @@ declare const useMeeting: (handlers?: {
|
|
|
557
548
|
onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
|
|
558
549
|
onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
|
|
559
550
|
onNetworkQuality: (cb: (quality: NetworkQuality) => void) => () => void;
|
|
560
|
-
|
|
551
|
+
onChatMessage: (cb: (message: ChatMessage) => void) => () => void;
|
|
552
|
+
onParticipantJoined: (cb: (participant: Participant) => void) => () => void;
|
|
553
|
+
onParticipantLeft: (cb: (participant: Participant) => void) => () => void;
|
|
561
554
|
};
|
|
562
555
|
|
|
563
556
|
declare const useParticipants: () => Participant[];
|
|
@@ -605,8 +598,6 @@ declare function useMeetingPreview(roomId: string, participantId: string): {
|
|
|
605
598
|
error: string | null;
|
|
606
599
|
};
|
|
607
600
|
|
|
608
|
-
declare const useLiveTranscript: () => LiveTranscript[];
|
|
609
|
-
|
|
610
601
|
declare const useNetworkQuality: () => NetworkQuality | null;
|
|
611
602
|
|
|
612
603
|
interface ActiveSpeakerDetectorOptions {
|
|
@@ -645,4 +636,4 @@ declare function usePubSub<T extends PubSubTopic>(topic: T, options?: {
|
|
|
645
636
|
onMessageReceived?: (message: PubSubMessage<PubSubTopicConfig[T]["message"]>) => void;
|
|
646
637
|
}): PubSubHandleForTopic<T>;
|
|
647
638
|
|
|
648
|
-
export { ActiveSpeakerDetector, type ChatInput, type
|
|
639
|
+
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 };
|