@defcomm/meetingsdk 0.4.1 → 0.4.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 +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -97,7 +97,7 @@ type MeetingConfig = {
|
|
|
97
97
|
videoMuted?: boolean;
|
|
98
98
|
token?: string;
|
|
99
99
|
};
|
|
100
|
-
type PubSubTopic = "SECURE_CHAT";
|
|
100
|
+
type PubSubTopic = "SECURE_CHAT" | "REACTION";
|
|
101
101
|
type RecordingInfo = {
|
|
102
102
|
recording_id: string;
|
|
103
103
|
started_at?: string;
|
|
@@ -145,6 +145,12 @@ interface VideoSDKCoreOptions {
|
|
|
145
145
|
onMuteStateChanged?: (peerId: string, kind: "audio" | "video", muted: boolean) => void;
|
|
146
146
|
}
|
|
147
147
|
type SFUConnectionState = "idle" | "connecting" | "joining" | "waiting_approval" | "connected" | "reconnecting" | "leaving" | "disconnected";
|
|
148
|
+
type JoinState = {
|
|
149
|
+
status: "ready";
|
|
150
|
+
reason: "admitted" | "open" | "moderator";
|
|
151
|
+
} | {
|
|
152
|
+
status: "approval_required";
|
|
153
|
+
};
|
|
148
154
|
|
|
149
155
|
declare const useLocalParticipant: () => {
|
|
150
156
|
participant: Participant | null;
|
|
@@ -212,6 +218,7 @@ declare class VideoSDKCore {
|
|
|
212
218
|
is_private?: boolean;
|
|
213
219
|
}): Promise<any>;
|
|
214
220
|
getRoom(roomCode: string): Promise<any>;
|
|
221
|
+
getJoinState(roomCode: string): Promise<JoinState>;
|
|
215
222
|
deleteRoom(roomCode: string): Promise<any>;
|
|
216
223
|
joinMeeting(config: Omit<MeetingConfig, "participantId">): Promise<void>;
|
|
217
224
|
private connect;
|
|
@@ -239,15 +246,6 @@ declare class VideoSDKCore {
|
|
|
239
246
|
private performDisconnect;
|
|
240
247
|
}
|
|
241
248
|
|
|
242
|
-
/**
|
|
243
|
-
* DefComm SFU client.
|
|
244
|
-
*
|
|
245
|
-
* Signaling is authoritative for admission/session state.
|
|
246
|
-
* WebRTC peer connections are transport state and are recreated only after a
|
|
247
|
-
* successful join/resume. A transient WebSocket close therefore does NOT
|
|
248
|
-
* destroy the local MediaStream or immediately declare the participant gone.
|
|
249
|
-
*/
|
|
250
|
-
|
|
251
249
|
interface TrackInfo {
|
|
252
250
|
track_id: string;
|
|
253
251
|
participant_id: string;
|
|
@@ -272,6 +270,7 @@ type PubSubHandle = {
|
|
|
272
270
|
type MeetingContextValue = {
|
|
273
271
|
sdk: VideoSDKCore;
|
|
274
272
|
join: (config?: Omit<MeetingConfig, "participantId">) => Promise<void>;
|
|
273
|
+
getJoinState: (roomCode: string) => Promise<JoinState>;
|
|
275
274
|
leave: () => void;
|
|
276
275
|
createRoom: (input: {
|
|
277
276
|
name: string;
|
|
@@ -330,9 +329,10 @@ declare const useMeeting: (handlers?: {
|
|
|
330
329
|
onRecordingStopped?: (recording: any) => void;
|
|
331
330
|
onReaction?: (reaction: any) => void;
|
|
332
331
|
onActiveSpeakersChanged?: (participantIds: string[]) => void;
|
|
333
|
-
onConnectionStateChanged
|
|
332
|
+
onConnectionStateChanged?: (state: SFUConnectionState) => void;
|
|
334
333
|
}) => {
|
|
335
334
|
join: (config?: Omit<MeetingConfig, "participantId">) => Promise<void>;
|
|
335
|
+
getJoinState: (roomCode: string) => Promise<JoinState>;
|
|
336
336
|
leave: () => void;
|
|
337
337
|
createRoom: (input: {
|
|
338
338
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -97,7 +97,7 @@ type MeetingConfig = {
|
|
|
97
97
|
videoMuted?: boolean;
|
|
98
98
|
token?: string;
|
|
99
99
|
};
|
|
100
|
-
type PubSubTopic = "SECURE_CHAT";
|
|
100
|
+
type PubSubTopic = "SECURE_CHAT" | "REACTION";
|
|
101
101
|
type RecordingInfo = {
|
|
102
102
|
recording_id: string;
|
|
103
103
|
started_at?: string;
|
|
@@ -145,6 +145,12 @@ interface VideoSDKCoreOptions {
|
|
|
145
145
|
onMuteStateChanged?: (peerId: string, kind: "audio" | "video", muted: boolean) => void;
|
|
146
146
|
}
|
|
147
147
|
type SFUConnectionState = "idle" | "connecting" | "joining" | "waiting_approval" | "connected" | "reconnecting" | "leaving" | "disconnected";
|
|
148
|
+
type JoinState = {
|
|
149
|
+
status: "ready";
|
|
150
|
+
reason: "admitted" | "open" | "moderator";
|
|
151
|
+
} | {
|
|
152
|
+
status: "approval_required";
|
|
153
|
+
};
|
|
148
154
|
|
|
149
155
|
declare const useLocalParticipant: () => {
|
|
150
156
|
participant: Participant | null;
|
|
@@ -212,6 +218,7 @@ declare class VideoSDKCore {
|
|
|
212
218
|
is_private?: boolean;
|
|
213
219
|
}): Promise<any>;
|
|
214
220
|
getRoom(roomCode: string): Promise<any>;
|
|
221
|
+
getJoinState(roomCode: string): Promise<JoinState>;
|
|
215
222
|
deleteRoom(roomCode: string): Promise<any>;
|
|
216
223
|
joinMeeting(config: Omit<MeetingConfig, "participantId">): Promise<void>;
|
|
217
224
|
private connect;
|
|
@@ -239,15 +246,6 @@ declare class VideoSDKCore {
|
|
|
239
246
|
private performDisconnect;
|
|
240
247
|
}
|
|
241
248
|
|
|
242
|
-
/**
|
|
243
|
-
* DefComm SFU client.
|
|
244
|
-
*
|
|
245
|
-
* Signaling is authoritative for admission/session state.
|
|
246
|
-
* WebRTC peer connections are transport state and are recreated only after a
|
|
247
|
-
* successful join/resume. A transient WebSocket close therefore does NOT
|
|
248
|
-
* destroy the local MediaStream or immediately declare the participant gone.
|
|
249
|
-
*/
|
|
250
|
-
|
|
251
249
|
interface TrackInfo {
|
|
252
250
|
track_id: string;
|
|
253
251
|
participant_id: string;
|
|
@@ -272,6 +270,7 @@ type PubSubHandle = {
|
|
|
272
270
|
type MeetingContextValue = {
|
|
273
271
|
sdk: VideoSDKCore;
|
|
274
272
|
join: (config?: Omit<MeetingConfig, "participantId">) => Promise<void>;
|
|
273
|
+
getJoinState: (roomCode: string) => Promise<JoinState>;
|
|
275
274
|
leave: () => void;
|
|
276
275
|
createRoom: (input: {
|
|
277
276
|
name: string;
|
|
@@ -330,9 +329,10 @@ declare const useMeeting: (handlers?: {
|
|
|
330
329
|
onRecordingStopped?: (recording: any) => void;
|
|
331
330
|
onReaction?: (reaction: any) => void;
|
|
332
331
|
onActiveSpeakersChanged?: (participantIds: string[]) => void;
|
|
333
|
-
onConnectionStateChanged
|
|
332
|
+
onConnectionStateChanged?: (state: SFUConnectionState) => void;
|
|
334
333
|
}) => {
|
|
335
334
|
join: (config?: Omit<MeetingConfig, "participantId">) => Promise<void>;
|
|
335
|
+
getJoinState: (roomCode: string) => Promise<JoinState>;
|
|
336
336
|
leave: () => void;
|
|
337
337
|
createRoom: (input: {
|
|
338
338
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -596,6 +596,11 @@ var SFUClient = class {
|
|
|
596
596
|
`${this.apiBase}/rooms/${encodeURIComponent(roomCode)}`
|
|
597
597
|
);
|
|
598
598
|
}
|
|
599
|
+
async getJoinState(roomCode) {
|
|
600
|
+
return this.request(
|
|
601
|
+
`${this.apiBase}/rooms/${encodeURIComponent(roomCode)}/join-state`
|
|
602
|
+
);
|
|
603
|
+
}
|
|
599
604
|
async deleteRoom(roomCode) {
|
|
600
605
|
return this.request(
|
|
601
606
|
`${this.apiBase}/rooms/${encodeURIComponent(roomCode)}`,
|
|
@@ -2054,6 +2059,14 @@ var VideoSDKCore = class {
|
|
|
2054
2059
|
});
|
|
2055
2060
|
return client.getRoom(roomCode);
|
|
2056
2061
|
}
|
|
2062
|
+
async getJoinState(roomCode) {
|
|
2063
|
+
const client = this.sfuClient ?? new SFUClient({
|
|
2064
|
+
apiBase: this.apiBase,
|
|
2065
|
+
wsBase: this.wsBase,
|
|
2066
|
+
participantId: this.myId
|
|
2067
|
+
});
|
|
2068
|
+
return client.getJoinState(roomCode);
|
|
2069
|
+
}
|
|
2057
2070
|
async deleteRoom(roomCode) {
|
|
2058
2071
|
const client = this.sfuClient ?? new SFUClient({
|
|
2059
2072
|
apiBase: this.apiBase,
|
|
@@ -2890,6 +2903,7 @@ var MeetingProvider = ({
|
|
|
2890
2903
|
...config,
|
|
2891
2904
|
...joinConfig
|
|
2892
2905
|
}),
|
|
2906
|
+
getJoinState: (roomCode) => sdk.getJoinState(roomCode),
|
|
2893
2907
|
leave: () => sdk.disconnect(),
|
|
2894
2908
|
createRoom: sdk.createRoom.bind(sdk),
|
|
2895
2909
|
getRoom: sdk.getRoom.bind(sdk),
|