@defcomm/meetingsdk 0.5.3 → 0.5.4
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.js +26 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -260,9 +260,9 @@ var MeetingState = class {
|
|
|
260
260
|
cameraTrack: void 0,
|
|
261
261
|
screenTrack: void 0,
|
|
262
262
|
audioTrack: void 0,
|
|
263
|
-
micEnabled:
|
|
264
|
-
camEnabled:
|
|
265
|
-
isScreenSharing: false,
|
|
263
|
+
micEnabled: p.media?.micEnabled ?? false,
|
|
264
|
+
camEnabled: p.media?.camEnabled ?? false,
|
|
265
|
+
isScreenSharing: p.media?.isScreenSharing ?? false,
|
|
266
266
|
...p.media,
|
|
267
267
|
...patch
|
|
268
268
|
}
|
|
@@ -2241,10 +2241,24 @@ var VideoSDKCore = class {
|
|
|
2241
2241
|
this.handleSFUState(state);
|
|
2242
2242
|
},
|
|
2243
2243
|
onConnected: (payload, resumed) => {
|
|
2244
|
-
|
|
2244
|
+
const local = (payload?.participants || []).find(
|
|
2245
|
+
(participant) => participant?.participant_id === this.myId
|
|
2246
|
+
);
|
|
2247
|
+
const permissions = local?.permissions ?? payload?.permissions ?? {};
|
|
2248
|
+
const isModerator = Boolean(permissions?.moderate);
|
|
2249
|
+
const isHost = Boolean(
|
|
2250
|
+
local?.is_host ?? local?.isHost ?? permissions?.host
|
|
2251
|
+
);
|
|
2245
2252
|
this.state.updateLocalParticipant({
|
|
2246
2253
|
id: this.myId,
|
|
2247
|
-
name:
|
|
2254
|
+
name: local?.user_metadata?.name,
|
|
2255
|
+
isHost,
|
|
2256
|
+
isModerator,
|
|
2257
|
+
permissions,
|
|
2258
|
+
media: {
|
|
2259
|
+
micEnabled: !Boolean(local?.audio_muted),
|
|
2260
|
+
camEnabled: !Boolean(local?.video_muted)
|
|
2261
|
+
}
|
|
2248
2262
|
});
|
|
2249
2263
|
},
|
|
2250
2264
|
onDisconnected: () => {
|
|
@@ -2363,7 +2377,13 @@ var VideoSDKCore = class {
|
|
|
2363
2377
|
onParticipantPermissionsChanged: (participantId, permissions) => {
|
|
2364
2378
|
if (participantId === this.myId) {
|
|
2365
2379
|
const current = this.state.localParticipant;
|
|
2366
|
-
this.state.updateLocalParticipant({
|
|
2380
|
+
this.state.updateLocalParticipant({
|
|
2381
|
+
id: this.myId,
|
|
2382
|
+
name: this.participantName,
|
|
2383
|
+
isHost: current?.isHost,
|
|
2384
|
+
isModerator: Boolean(permissions?.moderate),
|
|
2385
|
+
permissions
|
|
2386
|
+
});
|
|
2367
2387
|
}
|
|
2368
2388
|
},
|
|
2369
2389
|
onJoinRequested: (request) => {
|