@defcomm/meetingsdk 0.3.7 → 0.3.8
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 +31 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1015,9 +1015,22 @@ var SFUClient = class {
|
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
1017
|
rememberTrack(track) {
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1018
|
+
if (!track?.track_id || !track?.participant_id) return;
|
|
1019
|
+
const normalizedSource = track.source ? String(track.source).trim().toLowerCase() : void 0;
|
|
1020
|
+
const normalized = {
|
|
1021
|
+
...track,
|
|
1022
|
+
source: normalizedSource
|
|
1023
|
+
};
|
|
1024
|
+
this.trackMetadata.set(normalized.track_id, normalized);
|
|
1025
|
+
this.trackToParticipant.set(
|
|
1026
|
+
normalized.track_id,
|
|
1027
|
+
normalized.participant_id
|
|
1028
|
+
);
|
|
1029
|
+
if (normalizedSource) {
|
|
1030
|
+
this.trackToSource.set(normalized.track_id, normalizedSource);
|
|
1031
|
+
} else {
|
|
1032
|
+
this.trackToSource.delete(normalized.track_id);
|
|
1033
|
+
}
|
|
1021
1034
|
}
|
|
1022
1035
|
async handleJoined(payload) {
|
|
1023
1036
|
const resumed = this.joiningWithResume;
|
|
@@ -1046,7 +1059,12 @@ var SFUClient = class {
|
|
|
1046
1059
|
await this.initializePeerConnections();
|
|
1047
1060
|
this.setState("connected");
|
|
1048
1061
|
this.onConnected(payload, resumed);
|
|
1049
|
-
if (payload.recording
|
|
1062
|
+
if (payload.recording?.status === "recording") {
|
|
1063
|
+
console.log("[SFU] Recording already active when joining", {
|
|
1064
|
+
recording_id: payload.recording.recording_id,
|
|
1065
|
+
started_at: payload.recording.started_at,
|
|
1066
|
+
status: payload.recording.status
|
|
1067
|
+
});
|
|
1050
1068
|
this.onRecordingStarted({
|
|
1051
1069
|
recording_id: payload.recording.recording_id,
|
|
1052
1070
|
started_at: payload.recording.started_at
|
|
@@ -1171,6 +1189,13 @@ var SFUClient = class {
|
|
|
1171
1189
|
const source = String(
|
|
1172
1190
|
metadata.source || this.trackToSource.get(metadata.track_id) || ""
|
|
1173
1191
|
).trim().toLowerCase();
|
|
1192
|
+
console.debug("[SFU] Remote track source resolved", {
|
|
1193
|
+
participantId,
|
|
1194
|
+
browserTrackId: event.track.id,
|
|
1195
|
+
serverTrackId: metadata.track_id,
|
|
1196
|
+
kind: event.track.kind,
|
|
1197
|
+
source
|
|
1198
|
+
});
|
|
1174
1199
|
if (source === "screen" || source === "screen_share") {
|
|
1175
1200
|
let screenStream = this.remoteScreenStreams.get(participantId);
|
|
1176
1201
|
if (!screenStream) {
|
|
@@ -2434,8 +2459,8 @@ var VideoSDKCore = class {
|
|
|
2434
2459
|
if (!participantId || participantId === this.myId) {
|
|
2435
2460
|
return;
|
|
2436
2461
|
}
|
|
2437
|
-
const source = metadata.source;
|
|
2438
|
-
if (source === "screen") {
|
|
2462
|
+
const source = String(metadata.source || "").trim().toLowerCase();
|
|
2463
|
+
if (source === "screen" || source === "screen_share") {
|
|
2439
2464
|
let screenStream = this.remoteScreenStreams.get(participantId);
|
|
2440
2465
|
if (!screenStream) {
|
|
2441
2466
|
screenStream = new MediaStream();
|