@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.mjs
CHANGED
|
@@ -757,7 +757,12 @@ var SFUClient = class {
|
|
|
757
757
|
room_code: this.room,
|
|
758
758
|
resume_token: this.resumeToken,
|
|
759
759
|
display_name: this.joinOptions.displayName,
|
|
760
|
-
avatar_url: this.joinOptions.avatarUrl
|
|
760
|
+
avatar_url: this.joinOptions.avatarUrl,
|
|
761
|
+
// Preserve the media state requested before host approval.
|
|
762
|
+
// The approval continuation is a second JOIN, so these values
|
|
763
|
+
// must be sent again instead of falling back to the SFU defaults.
|
|
764
|
+
audio_muted: this.desiredAudioMuted,
|
|
765
|
+
video_muted: this.desiredVideoMuted
|
|
761
766
|
}
|
|
762
767
|
});
|
|
763
768
|
}
|
|
@@ -1015,9 +1020,19 @@ var SFUClient = class {
|
|
|
1015
1020
|
}
|
|
1016
1021
|
}
|
|
1017
1022
|
rememberTrack(track) {
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1023
|
+
if (!track?.track_id || !track?.participant_id) return;
|
|
1024
|
+
const normalizedSource = track.source ? String(track.source).trim().toLowerCase() : void 0;
|
|
1025
|
+
const normalized = {
|
|
1026
|
+
...track,
|
|
1027
|
+
source: normalizedSource
|
|
1028
|
+
};
|
|
1029
|
+
this.trackMetadata.set(normalized.track_id, normalized);
|
|
1030
|
+
this.trackToParticipant.set(normalized.track_id, normalized.participant_id);
|
|
1031
|
+
if (normalizedSource) {
|
|
1032
|
+
this.trackToSource.set(normalized.track_id, normalizedSource);
|
|
1033
|
+
} else {
|
|
1034
|
+
this.trackToSource.delete(normalized.track_id);
|
|
1035
|
+
}
|
|
1021
1036
|
}
|
|
1022
1037
|
async handleJoined(payload) {
|
|
1023
1038
|
const resumed = this.joiningWithResume;
|
|
@@ -1046,7 +1061,12 @@ var SFUClient = class {
|
|
|
1046
1061
|
await this.initializePeerConnections();
|
|
1047
1062
|
this.setState("connected");
|
|
1048
1063
|
this.onConnected(payload, resumed);
|
|
1049
|
-
if (payload.recording
|
|
1064
|
+
if (payload.recording?.status === "recording") {
|
|
1065
|
+
console.log("[SFU] Recording already active when joining", {
|
|
1066
|
+
recording_id: payload.recording.recording_id,
|
|
1067
|
+
started_at: payload.recording.started_at,
|
|
1068
|
+
status: payload.recording.status
|
|
1069
|
+
});
|
|
1050
1070
|
this.onRecordingStarted({
|
|
1051
1071
|
recording_id: payload.recording.recording_id,
|
|
1052
1072
|
started_at: payload.recording.started_at
|
|
@@ -1171,6 +1191,13 @@ var SFUClient = class {
|
|
|
1171
1191
|
const source = String(
|
|
1172
1192
|
metadata.source || this.trackToSource.get(metadata.track_id) || ""
|
|
1173
1193
|
).trim().toLowerCase();
|
|
1194
|
+
console.debug("[SFU] Remote track source resolved", {
|
|
1195
|
+
participantId,
|
|
1196
|
+
browserTrackId: event.track.id,
|
|
1197
|
+
serverTrackId: metadata.track_id,
|
|
1198
|
+
kind: event.track.kind,
|
|
1199
|
+
source
|
|
1200
|
+
});
|
|
1174
1201
|
if (source === "screen" || source === "screen_share") {
|
|
1175
1202
|
let screenStream = this.remoteScreenStreams.get(participantId);
|
|
1176
1203
|
if (!screenStream) {
|
|
@@ -2434,8 +2461,8 @@ var VideoSDKCore = class {
|
|
|
2434
2461
|
if (!participantId || participantId === this.myId) {
|
|
2435
2462
|
return;
|
|
2436
2463
|
}
|
|
2437
|
-
const source = metadata.source;
|
|
2438
|
-
if (source === "screen") {
|
|
2464
|
+
const source = String(metadata.source || "").trim().toLowerCase();
|
|
2465
|
+
if (source === "screen" || source === "screen_share") {
|
|
2439
2466
|
let screenStream = this.remoteScreenStreams.get(participantId);
|
|
2440
2467
|
if (!screenStream) {
|
|
2441
2468
|
screenStream = new MediaStream();
|