@defcomm/meetingsdk 0.3.9 → 0.4.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 +12 -206
- package/dist/index.d.ts +12 -206
- package/dist/index.js +56 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -106,7 +106,7 @@ type RecordingInfo = {
|
|
|
106
106
|
active?: boolean;
|
|
107
107
|
late_join?: boolean;
|
|
108
108
|
};
|
|
109
|
-
type StateScope = "participants" | "localParticipant" | "chat" | "presenter" | "activeSpeakers" | `participant:${string}`;
|
|
109
|
+
type StateScope = "participants" | "localParticipant" | "chat" | "presenter" | "activeSpeakers" | "recording" | `participant:${string}`;
|
|
110
110
|
type SDKError = {
|
|
111
111
|
code: string;
|
|
112
112
|
message: string;
|
|
@@ -144,6 +144,7 @@ interface VideoSDKCoreOptions {
|
|
|
144
144
|
onChatMessage?: (message: ChatMessage) => void;
|
|
145
145
|
onMuteStateChanged?: (peerId: string, kind: "audio" | "video", muted: boolean) => void;
|
|
146
146
|
}
|
|
147
|
+
type SFUConnectionState = "idle" | "connecting" | "joining" | "waiting_approval" | "connected" | "reconnecting" | "leaving" | "disconnected";
|
|
147
148
|
|
|
148
149
|
declare const useLocalParticipant: () => {
|
|
149
150
|
participant: Participant | null;
|
|
@@ -162,11 +163,14 @@ declare class MeetingState {
|
|
|
162
163
|
chatMessages: Map<string, ChatMessage>;
|
|
163
164
|
presenterId: string | null;
|
|
164
165
|
activeSpeakerIds: Set<string>;
|
|
166
|
+
recording: RecordingInfo | null;
|
|
165
167
|
private listeners;
|
|
166
168
|
subscribe(scope: StateScope, fn: Listener): () => void;
|
|
167
169
|
notify(scope: StateScope): void;
|
|
168
170
|
setPresenterId(id: string | null): void;
|
|
169
171
|
setActiveSpeakers(ids: string[]): void;
|
|
172
|
+
setRecording(recording: RecordingInfo | null): void;
|
|
173
|
+
clearRecording(): void;
|
|
170
174
|
addParticipant(p: Participant): boolean;
|
|
171
175
|
removeParticipant(id: string): void;
|
|
172
176
|
updateParticipantMedia(id: string, patch: Partial<NonNullable<Participant["media"]>>): void;
|
|
@@ -243,7 +247,7 @@ declare class VideoSDKCore {
|
|
|
243
247
|
* successful join/resume. A transient WebSocket close therefore does NOT
|
|
244
248
|
* destroy the local MediaStream or immediately declare the participant gone.
|
|
245
249
|
*/
|
|
246
|
-
|
|
250
|
+
|
|
247
251
|
interface TrackInfo {
|
|
248
252
|
track_id: string;
|
|
249
253
|
participant_id: string;
|
|
@@ -260,209 +264,6 @@ interface ParticipantInfo {
|
|
|
260
264
|
display_name?: string;
|
|
261
265
|
[key: string]: any;
|
|
262
266
|
}
|
|
263
|
-
interface JoinPendingInfo {
|
|
264
|
-
request_id: string;
|
|
265
|
-
room_code?: string;
|
|
266
|
-
message?: string;
|
|
267
|
-
}
|
|
268
|
-
interface SFUClientOptions {
|
|
269
|
-
apiBase?: string;
|
|
270
|
-
wsBase?: string;
|
|
271
|
-
participantId?: string;
|
|
272
|
-
onStateChange?: (state: SFUConnectionState) => void;
|
|
273
|
-
onParticipantJoined?: (participant: ParticipantInfo) => void;
|
|
274
|
-
onParticipantLeft?: (participant: string | ParticipantInfo) => void;
|
|
275
|
-
onParticipantPresence?: (participantId: string, presence: string) => void;
|
|
276
|
-
onTrackPublished?: (track: TrackInfo) => void;
|
|
277
|
-
onTrackUnpublished?: (track: TrackInfo) => void;
|
|
278
|
-
onRemoteTrack?: (track: MediaStreamTrack, stream: MediaStream, metadata: TrackInfo) => void;
|
|
279
|
-
onConnected?: (payload: any, resumed: boolean) => void;
|
|
280
|
-
onDisconnected?: () => void;
|
|
281
|
-
onReconnecting?: (attempt: number) => void;
|
|
282
|
-
onJoinPending?: (info: JoinPendingInfo) => void;
|
|
283
|
-
onJoinApproved?: (requestId: string) => void;
|
|
284
|
-
onJoinRejected?: (requestId: string, reason?: string) => void;
|
|
285
|
-
onJoinRequested?: (request: any) => void;
|
|
286
|
-
onScreenShareStarted?: (participantId: string, track?: TrackInfo) => void;
|
|
287
|
-
onScreenShareStopped?: (participantId: string, trackId?: string) => void;
|
|
288
|
-
onTrackStateChanged?: (track: TrackInfo) => void;
|
|
289
|
-
onRecordingStarted?: (recording: {
|
|
290
|
-
recording_id: string;
|
|
291
|
-
started_at: string;
|
|
292
|
-
}) => void;
|
|
293
|
-
onRecordingStopped?: (recording: {
|
|
294
|
-
recording_id: string;
|
|
295
|
-
stopped_at: string;
|
|
296
|
-
}) => void;
|
|
297
|
-
onError?: (error: any) => void;
|
|
298
|
-
onChatMessage?: (message: any) => void;
|
|
299
|
-
onReaction?: (reaction: any) => void;
|
|
300
|
-
onRoomUpdate?: (data: any) => void;
|
|
301
|
-
onParticipantMediaState?: (participantId: string, audioMuted: boolean, videoMuted: boolean) => void;
|
|
302
|
-
autoSubscribe?: boolean;
|
|
303
|
-
}
|
|
304
|
-
declare class SFUClient {
|
|
305
|
-
private apiBase;
|
|
306
|
-
private wsBase;
|
|
307
|
-
private participantId;
|
|
308
|
-
private ws;
|
|
309
|
-
private publisher;
|
|
310
|
-
private subscriber;
|
|
311
|
-
private localStream;
|
|
312
|
-
private screenStream;
|
|
313
|
-
private videoSender;
|
|
314
|
-
private audioSender;
|
|
315
|
-
private screenSender;
|
|
316
|
-
private audioTransceiver;
|
|
317
|
-
private cameraTransceiver;
|
|
318
|
-
private screenTransceiver;
|
|
319
|
-
private iceServers;
|
|
320
|
-
private requestId;
|
|
321
|
-
private publisherRevision;
|
|
322
|
-
private screenShareGeneration;
|
|
323
|
-
private currentParticipantId;
|
|
324
|
-
private token;
|
|
325
|
-
private room;
|
|
326
|
-
private resumeToken;
|
|
327
|
-
private pendingJoinRequestId;
|
|
328
|
-
private joinOptions;
|
|
329
|
-
private state;
|
|
330
|
-
private intentionalClose;
|
|
331
|
-
private leaveAcknowledged;
|
|
332
|
-
private joiningWithResume;
|
|
333
|
-
private desiredAudioMuted;
|
|
334
|
-
private desiredVideoMuted;
|
|
335
|
-
private reconnectTimer;
|
|
336
|
-
private reconnectAttempt;
|
|
337
|
-
private maxReconnectAttempts;
|
|
338
|
-
private reconnectBaseMs;
|
|
339
|
-
private joinWaiter;
|
|
340
|
-
private transportRecoveryInProgress;
|
|
341
|
-
private transportRecoveryTimer;
|
|
342
|
-
private pendingIce;
|
|
343
|
-
private subscriberNegotiating;
|
|
344
|
-
private offerQueue;
|
|
345
|
-
private subscriptionQueue;
|
|
346
|
-
private subscriptionRunning;
|
|
347
|
-
private subscriptionWaiters;
|
|
348
|
-
private subscribedTracks;
|
|
349
|
-
private trackMetadata;
|
|
350
|
-
private participants;
|
|
351
|
-
private remoteStreams;
|
|
352
|
-
private remoteScreenStreams;
|
|
353
|
-
private trackToParticipant;
|
|
354
|
-
private trackToSource;
|
|
355
|
-
private localTrackIds;
|
|
356
|
-
private subscriberStatsTimer;
|
|
357
|
-
private onStateChange;
|
|
358
|
-
private onParticipantJoined;
|
|
359
|
-
private onParticipantLeft;
|
|
360
|
-
private onParticipantPresence;
|
|
361
|
-
private onTrackPublished;
|
|
362
|
-
private onTrackUnpublished;
|
|
363
|
-
private onRemoteTrack;
|
|
364
|
-
private onConnected;
|
|
365
|
-
private onDisconnected;
|
|
366
|
-
private onReconnecting;
|
|
367
|
-
private onJoinPending;
|
|
368
|
-
private onJoinApproved;
|
|
369
|
-
private onJoinRejected;
|
|
370
|
-
private onJoinRequested;
|
|
371
|
-
private onScreenShareStarted;
|
|
372
|
-
private onScreenShareStopped;
|
|
373
|
-
private onTrackStateChanged;
|
|
374
|
-
private onRecordingStarted;
|
|
375
|
-
private onRecordingStopped;
|
|
376
|
-
private onError;
|
|
377
|
-
private onChatMessage;
|
|
378
|
-
private onReaction;
|
|
379
|
-
private onRoomUpdate;
|
|
380
|
-
private onParticipantMediaState;
|
|
381
|
-
private autoSubscribe;
|
|
382
|
-
constructor(options?: SFUClientOptions);
|
|
383
|
-
private heartbeatTimer;
|
|
384
|
-
private startHeartbeat;
|
|
385
|
-
private stopHeartbeat;
|
|
386
|
-
private createId;
|
|
387
|
-
private resumeStorageKey;
|
|
388
|
-
private loadResumeToken;
|
|
389
|
-
private saveResumeToken;
|
|
390
|
-
private clearResumeToken;
|
|
391
|
-
private setState;
|
|
392
|
-
getConnectionState(): SFUConnectionState;
|
|
393
|
-
getParticipantId(): string | null;
|
|
394
|
-
getResumeToken(): string | null;
|
|
395
|
-
getLocalStream(): MediaStream | null;
|
|
396
|
-
getScreenStream(): MediaStream | null;
|
|
397
|
-
getRemoteScreenStream(participantId: string): MediaStream | null;
|
|
398
|
-
setLocalStream(stream: MediaStream | null): void;
|
|
399
|
-
private nextRequestId;
|
|
400
|
-
private request;
|
|
401
|
-
createRoom(input: {
|
|
402
|
-
name: string;
|
|
403
|
-
description?: string;
|
|
404
|
-
capacity?: number;
|
|
405
|
-
is_private?: boolean;
|
|
406
|
-
}): Promise<any>;
|
|
407
|
-
getRoom(roomCode: string): Promise<any>;
|
|
408
|
-
deleteRoom(roomCode: string): Promise<any>;
|
|
409
|
-
getToken(roomCode: string, options?: {
|
|
410
|
-
displayName?: string;
|
|
411
|
-
avatarUrl?: string;
|
|
412
|
-
participantId?: string;
|
|
413
|
-
audioMuted?: boolean;
|
|
414
|
-
videoMuted?: boolean;
|
|
415
|
-
}): Promise<void>;
|
|
416
|
-
private refreshAccessToken;
|
|
417
|
-
private connect;
|
|
418
|
-
private openWebSocket;
|
|
419
|
-
private scheduleReconnect;
|
|
420
|
-
private failJoin;
|
|
421
|
-
private resolveJoin;
|
|
422
|
-
private handleServerMessage;
|
|
423
|
-
private onRoomStateReconciled;
|
|
424
|
-
private rememberTrack;
|
|
425
|
-
private handleJoined;
|
|
426
|
-
private initializePeerConnections;
|
|
427
|
-
private handleRemoteTrack;
|
|
428
|
-
private normalizeRemoteTrackId;
|
|
429
|
-
private resolveRemoteTrackMetadata;
|
|
430
|
-
private sendCandidate;
|
|
431
|
-
private handleIce;
|
|
432
|
-
private flushPendingIce;
|
|
433
|
-
private processOfferQueue;
|
|
434
|
-
private subscribe;
|
|
435
|
-
private subscribeMultiple;
|
|
436
|
-
private processSubscriptionQueue;
|
|
437
|
-
publish({ audio, video }?: {
|
|
438
|
-
audio?: boolean | undefined;
|
|
439
|
-
video?: boolean | undefined;
|
|
440
|
-
}): Promise<MediaStream>;
|
|
441
|
-
private publishExistingTracks;
|
|
442
|
-
shareScreen(): Promise<MediaStream | null>;
|
|
443
|
-
stopScreenShare(): Promise<void>;
|
|
444
|
-
muteAudio(muted: boolean): void;
|
|
445
|
-
muteVideo(muted: boolean): void;
|
|
446
|
-
sendChatMessage(input: {
|
|
447
|
-
message: string;
|
|
448
|
-
reply_to?: any;
|
|
449
|
-
target?: string | null;
|
|
450
|
-
}): boolean;
|
|
451
|
-
startRecording(): Promise<void>;
|
|
452
|
-
stopRecording(): Promise<void>;
|
|
453
|
-
getRecordingStatus(): Promise<any>;
|
|
454
|
-
approveJoinRequest(requestId: string): Promise<void>;
|
|
455
|
-
rejectJoinRequest(requestId: string, reason?: string): Promise<void>;
|
|
456
|
-
private isSocketOpen;
|
|
457
|
-
private send;
|
|
458
|
-
sendReaction(reaction: string): void;
|
|
459
|
-
private removeRemoteParticipant;
|
|
460
|
-
leave(): Promise<void>;
|
|
461
|
-
private closePeerConnectionsOnly;
|
|
462
|
-
private cleanupAll;
|
|
463
|
-
private logSubscriberVideoStats;
|
|
464
|
-
private recoverWebRTC;
|
|
465
|
-
}
|
|
466
267
|
|
|
467
268
|
type PubSubHandle = {
|
|
468
269
|
messages: ChatMessage[];
|
|
@@ -495,6 +296,7 @@ type MeetingContextValue = {
|
|
|
495
296
|
messages: ChatMessage[];
|
|
496
297
|
presenterId: string | null;
|
|
497
298
|
activeSpeakerIds: string[];
|
|
299
|
+
recording: RecordingInfo | null;
|
|
498
300
|
usePubSub: (topic: PubSubTopic) => PubSubHandle;
|
|
499
301
|
approveJoinRequest: (requestId: string) => void;
|
|
500
302
|
rejectJoinRequest: (requestId: string) => void;
|
|
@@ -509,6 +311,7 @@ type MeetingContextValue = {
|
|
|
509
311
|
onRecordingStarted: (cb: (recording: Recording) => void) => () => void;
|
|
510
312
|
onRecordingStopped: (cb: (recording: any) => void) => () => void;
|
|
511
313
|
onReaction: (cb: (reaction: Reaction) => void) => () => void;
|
|
314
|
+
onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
|
|
512
315
|
onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
|
|
513
316
|
};
|
|
514
317
|
declare const MeetingProvider: ({ config, children, }: {
|
|
@@ -527,6 +330,7 @@ declare const useMeeting: (handlers?: {
|
|
|
527
330
|
onRecordingStopped?: (recording: any) => void;
|
|
528
331
|
onReaction?: (reaction: any) => void;
|
|
529
332
|
onActiveSpeakersChanged?: (participantIds: string[]) => void;
|
|
333
|
+
onConnectionStateChanged: (state: SFUConnectionState) => void;
|
|
530
334
|
}) => {
|
|
531
335
|
join: (config?: Omit<MeetingConfig, "participantId">) => Promise<void>;
|
|
532
336
|
leave: () => void;
|
|
@@ -553,6 +357,7 @@ declare const useMeeting: (handlers?: {
|
|
|
553
357
|
messages: ChatMessage[];
|
|
554
358
|
presenterId: string | null;
|
|
555
359
|
activeSpeakerIds: string[];
|
|
360
|
+
recording: RecordingInfo | null;
|
|
556
361
|
usePubSub: (topic: PubSubTopic) => {
|
|
557
362
|
messages: ChatMessage[];
|
|
558
363
|
publish: (input: ChatInput) => void;
|
|
@@ -570,6 +375,7 @@ declare const useMeeting: (handlers?: {
|
|
|
570
375
|
onRecordingStarted: (cb: (recording: Recording) => void) => () => void;
|
|
571
376
|
onRecordingStopped: (cb: (recording: any) => void) => () => void;
|
|
572
377
|
onReaction: (cb: (reaction: Reaction) => void) => () => void;
|
|
378
|
+
onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
|
|
573
379
|
onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
|
|
574
380
|
};
|
|
575
381
|
|
|
@@ -650,4 +456,4 @@ declare class ActiveSpeakerDetector {
|
|
|
650
456
|
destroy(): Promise<void>;
|
|
651
457
|
}
|
|
652
458
|
|
|
653
|
-
export { ActiveSpeakerDetector, type ChatInput, type MeetingConfig, MeetingProvider, MeetingState, type Participant, type ParticipantInfo, type Reaction, type RecordingInfo,
|
|
459
|
+
export { ActiveSpeakerDetector, type ChatInput, type MeetingConfig, MeetingProvider, MeetingState, type Participant, type ParticipantInfo, type Reaction, type RecordingInfo, type SFUConnectionState, type TrackInfo, VideoSDKCore, useLocalParticipant, useMeeting, useMeetingContext, useMeetingPreview, useParticipants, useRemoteMedia };
|
package/dist/index.d.ts
CHANGED
|
@@ -106,7 +106,7 @@ type RecordingInfo = {
|
|
|
106
106
|
active?: boolean;
|
|
107
107
|
late_join?: boolean;
|
|
108
108
|
};
|
|
109
|
-
type StateScope = "participants" | "localParticipant" | "chat" | "presenter" | "activeSpeakers" | `participant:${string}`;
|
|
109
|
+
type StateScope = "participants" | "localParticipant" | "chat" | "presenter" | "activeSpeakers" | "recording" | `participant:${string}`;
|
|
110
110
|
type SDKError = {
|
|
111
111
|
code: string;
|
|
112
112
|
message: string;
|
|
@@ -144,6 +144,7 @@ interface VideoSDKCoreOptions {
|
|
|
144
144
|
onChatMessage?: (message: ChatMessage) => void;
|
|
145
145
|
onMuteStateChanged?: (peerId: string, kind: "audio" | "video", muted: boolean) => void;
|
|
146
146
|
}
|
|
147
|
+
type SFUConnectionState = "idle" | "connecting" | "joining" | "waiting_approval" | "connected" | "reconnecting" | "leaving" | "disconnected";
|
|
147
148
|
|
|
148
149
|
declare const useLocalParticipant: () => {
|
|
149
150
|
participant: Participant | null;
|
|
@@ -162,11 +163,14 @@ declare class MeetingState {
|
|
|
162
163
|
chatMessages: Map<string, ChatMessage>;
|
|
163
164
|
presenterId: string | null;
|
|
164
165
|
activeSpeakerIds: Set<string>;
|
|
166
|
+
recording: RecordingInfo | null;
|
|
165
167
|
private listeners;
|
|
166
168
|
subscribe(scope: StateScope, fn: Listener): () => void;
|
|
167
169
|
notify(scope: StateScope): void;
|
|
168
170
|
setPresenterId(id: string | null): void;
|
|
169
171
|
setActiveSpeakers(ids: string[]): void;
|
|
172
|
+
setRecording(recording: RecordingInfo | null): void;
|
|
173
|
+
clearRecording(): void;
|
|
170
174
|
addParticipant(p: Participant): boolean;
|
|
171
175
|
removeParticipant(id: string): void;
|
|
172
176
|
updateParticipantMedia(id: string, patch: Partial<NonNullable<Participant["media"]>>): void;
|
|
@@ -243,7 +247,7 @@ declare class VideoSDKCore {
|
|
|
243
247
|
* successful join/resume. A transient WebSocket close therefore does NOT
|
|
244
248
|
* destroy the local MediaStream or immediately declare the participant gone.
|
|
245
249
|
*/
|
|
246
|
-
|
|
250
|
+
|
|
247
251
|
interface TrackInfo {
|
|
248
252
|
track_id: string;
|
|
249
253
|
participant_id: string;
|
|
@@ -260,209 +264,6 @@ interface ParticipantInfo {
|
|
|
260
264
|
display_name?: string;
|
|
261
265
|
[key: string]: any;
|
|
262
266
|
}
|
|
263
|
-
interface JoinPendingInfo {
|
|
264
|
-
request_id: string;
|
|
265
|
-
room_code?: string;
|
|
266
|
-
message?: string;
|
|
267
|
-
}
|
|
268
|
-
interface SFUClientOptions {
|
|
269
|
-
apiBase?: string;
|
|
270
|
-
wsBase?: string;
|
|
271
|
-
participantId?: string;
|
|
272
|
-
onStateChange?: (state: SFUConnectionState) => void;
|
|
273
|
-
onParticipantJoined?: (participant: ParticipantInfo) => void;
|
|
274
|
-
onParticipantLeft?: (participant: string | ParticipantInfo) => void;
|
|
275
|
-
onParticipantPresence?: (participantId: string, presence: string) => void;
|
|
276
|
-
onTrackPublished?: (track: TrackInfo) => void;
|
|
277
|
-
onTrackUnpublished?: (track: TrackInfo) => void;
|
|
278
|
-
onRemoteTrack?: (track: MediaStreamTrack, stream: MediaStream, metadata: TrackInfo) => void;
|
|
279
|
-
onConnected?: (payload: any, resumed: boolean) => void;
|
|
280
|
-
onDisconnected?: () => void;
|
|
281
|
-
onReconnecting?: (attempt: number) => void;
|
|
282
|
-
onJoinPending?: (info: JoinPendingInfo) => void;
|
|
283
|
-
onJoinApproved?: (requestId: string) => void;
|
|
284
|
-
onJoinRejected?: (requestId: string, reason?: string) => void;
|
|
285
|
-
onJoinRequested?: (request: any) => void;
|
|
286
|
-
onScreenShareStarted?: (participantId: string, track?: TrackInfo) => void;
|
|
287
|
-
onScreenShareStopped?: (participantId: string, trackId?: string) => void;
|
|
288
|
-
onTrackStateChanged?: (track: TrackInfo) => void;
|
|
289
|
-
onRecordingStarted?: (recording: {
|
|
290
|
-
recording_id: string;
|
|
291
|
-
started_at: string;
|
|
292
|
-
}) => void;
|
|
293
|
-
onRecordingStopped?: (recording: {
|
|
294
|
-
recording_id: string;
|
|
295
|
-
stopped_at: string;
|
|
296
|
-
}) => void;
|
|
297
|
-
onError?: (error: any) => void;
|
|
298
|
-
onChatMessage?: (message: any) => void;
|
|
299
|
-
onReaction?: (reaction: any) => void;
|
|
300
|
-
onRoomUpdate?: (data: any) => void;
|
|
301
|
-
onParticipantMediaState?: (participantId: string, audioMuted: boolean, videoMuted: boolean) => void;
|
|
302
|
-
autoSubscribe?: boolean;
|
|
303
|
-
}
|
|
304
|
-
declare class SFUClient {
|
|
305
|
-
private apiBase;
|
|
306
|
-
private wsBase;
|
|
307
|
-
private participantId;
|
|
308
|
-
private ws;
|
|
309
|
-
private publisher;
|
|
310
|
-
private subscriber;
|
|
311
|
-
private localStream;
|
|
312
|
-
private screenStream;
|
|
313
|
-
private videoSender;
|
|
314
|
-
private audioSender;
|
|
315
|
-
private screenSender;
|
|
316
|
-
private audioTransceiver;
|
|
317
|
-
private cameraTransceiver;
|
|
318
|
-
private screenTransceiver;
|
|
319
|
-
private iceServers;
|
|
320
|
-
private requestId;
|
|
321
|
-
private publisherRevision;
|
|
322
|
-
private screenShareGeneration;
|
|
323
|
-
private currentParticipantId;
|
|
324
|
-
private token;
|
|
325
|
-
private room;
|
|
326
|
-
private resumeToken;
|
|
327
|
-
private pendingJoinRequestId;
|
|
328
|
-
private joinOptions;
|
|
329
|
-
private state;
|
|
330
|
-
private intentionalClose;
|
|
331
|
-
private leaveAcknowledged;
|
|
332
|
-
private joiningWithResume;
|
|
333
|
-
private desiredAudioMuted;
|
|
334
|
-
private desiredVideoMuted;
|
|
335
|
-
private reconnectTimer;
|
|
336
|
-
private reconnectAttempt;
|
|
337
|
-
private maxReconnectAttempts;
|
|
338
|
-
private reconnectBaseMs;
|
|
339
|
-
private joinWaiter;
|
|
340
|
-
private transportRecoveryInProgress;
|
|
341
|
-
private transportRecoveryTimer;
|
|
342
|
-
private pendingIce;
|
|
343
|
-
private subscriberNegotiating;
|
|
344
|
-
private offerQueue;
|
|
345
|
-
private subscriptionQueue;
|
|
346
|
-
private subscriptionRunning;
|
|
347
|
-
private subscriptionWaiters;
|
|
348
|
-
private subscribedTracks;
|
|
349
|
-
private trackMetadata;
|
|
350
|
-
private participants;
|
|
351
|
-
private remoteStreams;
|
|
352
|
-
private remoteScreenStreams;
|
|
353
|
-
private trackToParticipant;
|
|
354
|
-
private trackToSource;
|
|
355
|
-
private localTrackIds;
|
|
356
|
-
private subscriberStatsTimer;
|
|
357
|
-
private onStateChange;
|
|
358
|
-
private onParticipantJoined;
|
|
359
|
-
private onParticipantLeft;
|
|
360
|
-
private onParticipantPresence;
|
|
361
|
-
private onTrackPublished;
|
|
362
|
-
private onTrackUnpublished;
|
|
363
|
-
private onRemoteTrack;
|
|
364
|
-
private onConnected;
|
|
365
|
-
private onDisconnected;
|
|
366
|
-
private onReconnecting;
|
|
367
|
-
private onJoinPending;
|
|
368
|
-
private onJoinApproved;
|
|
369
|
-
private onJoinRejected;
|
|
370
|
-
private onJoinRequested;
|
|
371
|
-
private onScreenShareStarted;
|
|
372
|
-
private onScreenShareStopped;
|
|
373
|
-
private onTrackStateChanged;
|
|
374
|
-
private onRecordingStarted;
|
|
375
|
-
private onRecordingStopped;
|
|
376
|
-
private onError;
|
|
377
|
-
private onChatMessage;
|
|
378
|
-
private onReaction;
|
|
379
|
-
private onRoomUpdate;
|
|
380
|
-
private onParticipantMediaState;
|
|
381
|
-
private autoSubscribe;
|
|
382
|
-
constructor(options?: SFUClientOptions);
|
|
383
|
-
private heartbeatTimer;
|
|
384
|
-
private startHeartbeat;
|
|
385
|
-
private stopHeartbeat;
|
|
386
|
-
private createId;
|
|
387
|
-
private resumeStorageKey;
|
|
388
|
-
private loadResumeToken;
|
|
389
|
-
private saveResumeToken;
|
|
390
|
-
private clearResumeToken;
|
|
391
|
-
private setState;
|
|
392
|
-
getConnectionState(): SFUConnectionState;
|
|
393
|
-
getParticipantId(): string | null;
|
|
394
|
-
getResumeToken(): string | null;
|
|
395
|
-
getLocalStream(): MediaStream | null;
|
|
396
|
-
getScreenStream(): MediaStream | null;
|
|
397
|
-
getRemoteScreenStream(participantId: string): MediaStream | null;
|
|
398
|
-
setLocalStream(stream: MediaStream | null): void;
|
|
399
|
-
private nextRequestId;
|
|
400
|
-
private request;
|
|
401
|
-
createRoom(input: {
|
|
402
|
-
name: string;
|
|
403
|
-
description?: string;
|
|
404
|
-
capacity?: number;
|
|
405
|
-
is_private?: boolean;
|
|
406
|
-
}): Promise<any>;
|
|
407
|
-
getRoom(roomCode: string): Promise<any>;
|
|
408
|
-
deleteRoom(roomCode: string): Promise<any>;
|
|
409
|
-
getToken(roomCode: string, options?: {
|
|
410
|
-
displayName?: string;
|
|
411
|
-
avatarUrl?: string;
|
|
412
|
-
participantId?: string;
|
|
413
|
-
audioMuted?: boolean;
|
|
414
|
-
videoMuted?: boolean;
|
|
415
|
-
}): Promise<void>;
|
|
416
|
-
private refreshAccessToken;
|
|
417
|
-
private connect;
|
|
418
|
-
private openWebSocket;
|
|
419
|
-
private scheduleReconnect;
|
|
420
|
-
private failJoin;
|
|
421
|
-
private resolveJoin;
|
|
422
|
-
private handleServerMessage;
|
|
423
|
-
private onRoomStateReconciled;
|
|
424
|
-
private rememberTrack;
|
|
425
|
-
private handleJoined;
|
|
426
|
-
private initializePeerConnections;
|
|
427
|
-
private handleRemoteTrack;
|
|
428
|
-
private normalizeRemoteTrackId;
|
|
429
|
-
private resolveRemoteTrackMetadata;
|
|
430
|
-
private sendCandidate;
|
|
431
|
-
private handleIce;
|
|
432
|
-
private flushPendingIce;
|
|
433
|
-
private processOfferQueue;
|
|
434
|
-
private subscribe;
|
|
435
|
-
private subscribeMultiple;
|
|
436
|
-
private processSubscriptionQueue;
|
|
437
|
-
publish({ audio, video }?: {
|
|
438
|
-
audio?: boolean | undefined;
|
|
439
|
-
video?: boolean | undefined;
|
|
440
|
-
}): Promise<MediaStream>;
|
|
441
|
-
private publishExistingTracks;
|
|
442
|
-
shareScreen(): Promise<MediaStream | null>;
|
|
443
|
-
stopScreenShare(): Promise<void>;
|
|
444
|
-
muteAudio(muted: boolean): void;
|
|
445
|
-
muteVideo(muted: boolean): void;
|
|
446
|
-
sendChatMessage(input: {
|
|
447
|
-
message: string;
|
|
448
|
-
reply_to?: any;
|
|
449
|
-
target?: string | null;
|
|
450
|
-
}): boolean;
|
|
451
|
-
startRecording(): Promise<void>;
|
|
452
|
-
stopRecording(): Promise<void>;
|
|
453
|
-
getRecordingStatus(): Promise<any>;
|
|
454
|
-
approveJoinRequest(requestId: string): Promise<void>;
|
|
455
|
-
rejectJoinRequest(requestId: string, reason?: string): Promise<void>;
|
|
456
|
-
private isSocketOpen;
|
|
457
|
-
private send;
|
|
458
|
-
sendReaction(reaction: string): void;
|
|
459
|
-
private removeRemoteParticipant;
|
|
460
|
-
leave(): Promise<void>;
|
|
461
|
-
private closePeerConnectionsOnly;
|
|
462
|
-
private cleanupAll;
|
|
463
|
-
private logSubscriberVideoStats;
|
|
464
|
-
private recoverWebRTC;
|
|
465
|
-
}
|
|
466
267
|
|
|
467
268
|
type PubSubHandle = {
|
|
468
269
|
messages: ChatMessage[];
|
|
@@ -495,6 +296,7 @@ type MeetingContextValue = {
|
|
|
495
296
|
messages: ChatMessage[];
|
|
496
297
|
presenterId: string | null;
|
|
497
298
|
activeSpeakerIds: string[];
|
|
299
|
+
recording: RecordingInfo | null;
|
|
498
300
|
usePubSub: (topic: PubSubTopic) => PubSubHandle;
|
|
499
301
|
approveJoinRequest: (requestId: string) => void;
|
|
500
302
|
rejectJoinRequest: (requestId: string) => void;
|
|
@@ -509,6 +311,7 @@ type MeetingContextValue = {
|
|
|
509
311
|
onRecordingStarted: (cb: (recording: Recording) => void) => () => void;
|
|
510
312
|
onRecordingStopped: (cb: (recording: any) => void) => () => void;
|
|
511
313
|
onReaction: (cb: (reaction: Reaction) => void) => () => void;
|
|
314
|
+
onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
|
|
512
315
|
onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
|
|
513
316
|
};
|
|
514
317
|
declare const MeetingProvider: ({ config, children, }: {
|
|
@@ -527,6 +330,7 @@ declare const useMeeting: (handlers?: {
|
|
|
527
330
|
onRecordingStopped?: (recording: any) => void;
|
|
528
331
|
onReaction?: (reaction: any) => void;
|
|
529
332
|
onActiveSpeakersChanged?: (participantIds: string[]) => void;
|
|
333
|
+
onConnectionStateChanged: (state: SFUConnectionState) => void;
|
|
530
334
|
}) => {
|
|
531
335
|
join: (config?: Omit<MeetingConfig, "participantId">) => Promise<void>;
|
|
532
336
|
leave: () => void;
|
|
@@ -553,6 +357,7 @@ declare const useMeeting: (handlers?: {
|
|
|
553
357
|
messages: ChatMessage[];
|
|
554
358
|
presenterId: string | null;
|
|
555
359
|
activeSpeakerIds: string[];
|
|
360
|
+
recording: RecordingInfo | null;
|
|
556
361
|
usePubSub: (topic: PubSubTopic) => {
|
|
557
362
|
messages: ChatMessage[];
|
|
558
363
|
publish: (input: ChatInput) => void;
|
|
@@ -570,6 +375,7 @@ declare const useMeeting: (handlers?: {
|
|
|
570
375
|
onRecordingStarted: (cb: (recording: Recording) => void) => () => void;
|
|
571
376
|
onRecordingStopped: (cb: (recording: any) => void) => () => void;
|
|
572
377
|
onReaction: (cb: (reaction: Reaction) => void) => () => void;
|
|
378
|
+
onConnectionStateChanged: (cb: (state: SFUConnectionState) => void) => () => void;
|
|
573
379
|
onActiveSpeakersChanged: (cb: (participantIds: string[]) => void) => () => void;
|
|
574
380
|
};
|
|
575
381
|
|
|
@@ -650,4 +456,4 @@ declare class ActiveSpeakerDetector {
|
|
|
650
456
|
destroy(): Promise<void>;
|
|
651
457
|
}
|
|
652
458
|
|
|
653
|
-
export { ActiveSpeakerDetector, type ChatInput, type MeetingConfig, MeetingProvider, MeetingState, type Participant, type ParticipantInfo, type Reaction, type RecordingInfo,
|
|
459
|
+
export { ActiveSpeakerDetector, type ChatInput, type MeetingConfig, MeetingProvider, MeetingState, type Participant, type ParticipantInfo, type Reaction, type RecordingInfo, type SFUConnectionState, type TrackInfo, VideoSDKCore, useLocalParticipant, useMeeting, useMeetingContext, useMeetingPreview, useParticipants, useRemoteMedia };
|