@afosecure/meetingsdk 1.4.3 → 1.4.5

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
@@ -16,6 +16,7 @@ type Events = {
16
16
  } | string, decision?: EntryDecision) => void;
17
17
  onJoinApproved?: (requestId: string) => void;
18
18
  onJoinRejected?: (requestId: string) => void;
19
+ onRoomUpdate?: (data: any) => void;
19
20
  onUserLeft?: (id: string) => void;
20
21
  onMeetingLeft?: () => void;
21
22
  onChatMessage?: (msg: ChatMessage) => void;
@@ -124,20 +125,18 @@ declare class VideoSDKCore {
124
125
  private events;
125
126
  private url;
126
127
  private ws;
127
- private peers;
128
- private initiators;
129
- private lastPong;
128
+ private pubPC;
129
+ private subPC;
130
130
  private iceServers;
131
+ private lastPong;
131
132
  private intentionalDisconnect;
132
133
  private myId;
133
134
  private room;
134
135
  private localStream;
135
136
  private screenStream;
137
+ private screenSender;
136
138
  private isScreenSharing;
137
- private screenSenders;
138
139
  private pingInterval;
139
- private pendingIceCandidates;
140
- private pendingOffers;
141
140
  private reconnectAttempts;
142
141
  private reconnectTimer?;
143
142
  private participantName;
@@ -147,36 +146,33 @@ declare class VideoSDKCore {
147
146
  private isWaitingForApproval;
148
147
  private pendingRequestId;
149
148
  private iceTransportPolicy;
150
- private emitError;
151
149
  constructor(events?: Events, url?: string);
152
150
  initLocal(video: HTMLVideoElement, name: string): Promise<void>;
153
- connect(roomId: string, name: string): Promise<void>;
154
151
  joinMeeting(config: MeetingConfig): Promise<void>;
155
- getMeeting(): {
156
- id: string | null;
157
- name: string | null;
158
- };
152
+ private setupPublisherPC;
153
+ private setupSubscriberPC;
154
+ connect(roomId: string, name: string): Promise<void>;
155
+ private handle;
156
+ private createPublisherOffer;
159
157
  toggleMic(): void;
160
158
  toggleCam(): void;
159
+ startScreenShare(): Promise<MediaStream>;
160
+ stopScreenShare(): void;
161
+ sendChatMessage(payload: ChatInput): void;
161
162
  private scheduleReconnect;
162
163
  private startHeartbeat;
163
164
  private stopHeartbeat;
164
165
  private reset;
165
- private handleJoinApproved;
166
- private handle;
167
- private createPeer;
168
- private createOffer;
169
- private shouldInitiate;
170
- private handleOffer;
171
- private closePeer;
172
- startScreenShare(): Promise<MediaStream>;
173
- stopScreenShare(): void;
174
- sendChatMessage(payload: ChatInput): void;
175
166
  disconnect(): void;
176
- private flushIce;
167
+ private restartPublisherIce;
168
+ private emitError;
177
169
  private send;
178
170
  approveJoinRequest(requestId: string): void;
179
171
  rejectJoinRequest(requestId: string): void;
172
+ getMeeting(): {
173
+ id: string | null;
174
+ name: string | null;
175
+ };
180
176
  }
181
177
 
182
178
  type PubSubHandle = {
@@ -262,6 +258,7 @@ type LiveRoomState = {
262
258
  canJoin: boolean;
263
259
  approved: boolean;
264
260
  isHost: boolean;
261
+ hasMoreParticipants: boolean;
265
262
  participants: {
266
263
  id: string;
267
264
  name: string;
@@ -273,9 +270,9 @@ type LiveRoomState = {
273
270
  };
274
271
  declare function useMeetingPreview(roomId: string, userId: string): {
275
272
  room: LiveRoomState | null;
273
+ isConnected: boolean;
276
274
  isLoading: boolean;
277
- error: Error | null;
278
- refetch: () => Promise<void>;
275
+ error: string | null;
279
276
  };
280
277
 
281
278
  export { type ChatInput, MeetingProvider, MeetingState, type Participant, VideoSDKCore, useLocalParticipant, useMeeting, useMeetingContext, useMeetingPreview, useParticipants, useRemoteMedia };
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ type Events = {
16
16
  } | string, decision?: EntryDecision) => void;
17
17
  onJoinApproved?: (requestId: string) => void;
18
18
  onJoinRejected?: (requestId: string) => void;
19
+ onRoomUpdate?: (data: any) => void;
19
20
  onUserLeft?: (id: string) => void;
20
21
  onMeetingLeft?: () => void;
21
22
  onChatMessage?: (msg: ChatMessage) => void;
@@ -124,20 +125,18 @@ declare class VideoSDKCore {
124
125
  private events;
125
126
  private url;
126
127
  private ws;
127
- private peers;
128
- private initiators;
129
- private lastPong;
128
+ private pubPC;
129
+ private subPC;
130
130
  private iceServers;
131
+ private lastPong;
131
132
  private intentionalDisconnect;
132
133
  private myId;
133
134
  private room;
134
135
  private localStream;
135
136
  private screenStream;
137
+ private screenSender;
136
138
  private isScreenSharing;
137
- private screenSenders;
138
139
  private pingInterval;
139
- private pendingIceCandidates;
140
- private pendingOffers;
141
140
  private reconnectAttempts;
142
141
  private reconnectTimer?;
143
142
  private participantName;
@@ -147,36 +146,33 @@ declare class VideoSDKCore {
147
146
  private isWaitingForApproval;
148
147
  private pendingRequestId;
149
148
  private iceTransportPolicy;
150
- private emitError;
151
149
  constructor(events?: Events, url?: string);
152
150
  initLocal(video: HTMLVideoElement, name: string): Promise<void>;
153
- connect(roomId: string, name: string): Promise<void>;
154
151
  joinMeeting(config: MeetingConfig): Promise<void>;
155
- getMeeting(): {
156
- id: string | null;
157
- name: string | null;
158
- };
152
+ private setupPublisherPC;
153
+ private setupSubscriberPC;
154
+ connect(roomId: string, name: string): Promise<void>;
155
+ private handle;
156
+ private createPublisherOffer;
159
157
  toggleMic(): void;
160
158
  toggleCam(): void;
159
+ startScreenShare(): Promise<MediaStream>;
160
+ stopScreenShare(): void;
161
+ sendChatMessage(payload: ChatInput): void;
161
162
  private scheduleReconnect;
162
163
  private startHeartbeat;
163
164
  private stopHeartbeat;
164
165
  private reset;
165
- private handleJoinApproved;
166
- private handle;
167
- private createPeer;
168
- private createOffer;
169
- private shouldInitiate;
170
- private handleOffer;
171
- private closePeer;
172
- startScreenShare(): Promise<MediaStream>;
173
- stopScreenShare(): void;
174
- sendChatMessage(payload: ChatInput): void;
175
166
  disconnect(): void;
176
- private flushIce;
167
+ private restartPublisherIce;
168
+ private emitError;
177
169
  private send;
178
170
  approveJoinRequest(requestId: string): void;
179
171
  rejectJoinRequest(requestId: string): void;
172
+ getMeeting(): {
173
+ id: string | null;
174
+ name: string | null;
175
+ };
180
176
  }
181
177
 
182
178
  type PubSubHandle = {
@@ -262,6 +258,7 @@ type LiveRoomState = {
262
258
  canJoin: boolean;
263
259
  approved: boolean;
264
260
  isHost: boolean;
261
+ hasMoreParticipants: boolean;
265
262
  participants: {
266
263
  id: string;
267
264
  name: string;
@@ -273,9 +270,9 @@ type LiveRoomState = {
273
270
  };
274
271
  declare function useMeetingPreview(roomId: string, userId: string): {
275
272
  room: LiveRoomState | null;
273
+ isConnected: boolean;
276
274
  isLoading: boolean;
277
- error: Error | null;
278
- refetch: () => Promise<void>;
275
+ error: string | null;
279
276
  };
280
277
 
281
278
  export { type ChatInput, MeetingProvider, MeetingState, type Participant, VideoSDKCore, useLocalParticipant, useMeeting, useMeetingContext, useMeetingPreview, useParticipants, useRemoteMedia };