@defcomm/meetingsdk 0.3.7 → 0.3.9
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 +34 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -793,7 +793,12 @@ var SFUClient = class {
|
|
|
793
793
|
room_code: this.room,
|
|
794
794
|
resume_token: this.resumeToken,
|
|
795
795
|
display_name: this.joinOptions.displayName,
|
|
796
|
-
avatar_url: this.joinOptions.avatarUrl
|
|
796
|
+
avatar_url: this.joinOptions.avatarUrl,
|
|
797
|
+
// Preserve the media state requested before host approval.
|
|
798
|
+
// The approval continuation is a second JOIN, so these values
|
|
799
|
+
// must be sent again instead of falling back to the SFU defaults.
|
|
800
|
+
audio_muted: this.desiredAudioMuted,
|
|
801
|
+
video_muted: this.desiredVideoMuted
|
|
797
802
|
}
|
|
798
803
|
});
|
|
799
804
|
}
|
|
@@ -1051,9 +1056,19 @@ var SFUClient = class {
|
|
|
1051
1056
|
}
|
|
1052
1057
|
}
|
|
1053
1058
|
rememberTrack(track) {
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1059
|
+
if (!track?.track_id || !track?.participant_id) return;
|
|
1060
|
+
const normalizedSource = track.source ? String(track.source).trim().toLowerCase() : void 0;
|
|
1061
|
+
const normalized = {
|
|
1062
|
+
...track,
|
|
1063
|
+
source: normalizedSource
|
|
1064
|
+
};
|
|
1065
|
+
this.trackMetadata.set(normalized.track_id, normalized);
|
|
1066
|
+
this.trackToParticipant.set(normalized.track_id, normalized.participant_id);
|
|
1067
|
+
if (normalizedSource) {
|
|
1068
|
+
this.trackToSource.set(normalized.track_id, normalizedSource);
|
|
1069
|
+
} else {
|
|
1070
|
+
this.trackToSource.delete(normalized.track_id);
|
|
1071
|
+
}
|
|
1057
1072
|
}
|
|
1058
1073
|
async handleJoined(payload) {
|
|
1059
1074
|
const resumed = this.joiningWithResume;
|
|
@@ -1082,7 +1097,12 @@ var SFUClient = class {
|
|
|
1082
1097
|
await this.initializePeerConnections();
|
|
1083
1098
|
this.setState("connected");
|
|
1084
1099
|
this.onConnected(payload, resumed);
|
|
1085
|
-
if (payload.recording
|
|
1100
|
+
if (payload.recording?.status === "recording") {
|
|
1101
|
+
console.log("[SFU] Recording already active when joining", {
|
|
1102
|
+
recording_id: payload.recording.recording_id,
|
|
1103
|
+
started_at: payload.recording.started_at,
|
|
1104
|
+
status: payload.recording.status
|
|
1105
|
+
});
|
|
1086
1106
|
this.onRecordingStarted({
|
|
1087
1107
|
recording_id: payload.recording.recording_id,
|
|
1088
1108
|
started_at: payload.recording.started_at
|
|
@@ -1207,6 +1227,13 @@ var SFUClient = class {
|
|
|
1207
1227
|
const source = String(
|
|
1208
1228
|
metadata.source || this.trackToSource.get(metadata.track_id) || ""
|
|
1209
1229
|
).trim().toLowerCase();
|
|
1230
|
+
console.debug("[SFU] Remote track source resolved", {
|
|
1231
|
+
participantId,
|
|
1232
|
+
browserTrackId: event.track.id,
|
|
1233
|
+
serverTrackId: metadata.track_id,
|
|
1234
|
+
kind: event.track.kind,
|
|
1235
|
+
source
|
|
1236
|
+
});
|
|
1210
1237
|
if (source === "screen" || source === "screen_share") {
|
|
1211
1238
|
let screenStream = this.remoteScreenStreams.get(participantId);
|
|
1212
1239
|
if (!screenStream) {
|
|
@@ -2470,8 +2497,8 @@ var VideoSDKCore = class {
|
|
|
2470
2497
|
if (!participantId || participantId === this.myId) {
|
|
2471
2498
|
return;
|
|
2472
2499
|
}
|
|
2473
|
-
const source = metadata.source;
|
|
2474
|
-
if (source === "screen") {
|
|
2500
|
+
const source = String(metadata.source || "").trim().toLowerCase();
|
|
2501
|
+
if (source === "screen" || source === "screen_share") {
|
|
2475
2502
|
let screenStream = this.remoteScreenStreams.get(participantId);
|
|
2476
2503
|
if (!screenStream) {
|
|
2477
2504
|
screenStream = new MediaStream();
|