Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 3688ca2

Browse files
authored
Merge branch 'master' into add-to-3rd
2 parents 3211ff9 + 47a0222 commit 3688ca2

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

source/agent/conference/conference.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,18 @@ var Conference = function (rpcClient, selfRpcId) {
10161016
data: subDesc.data,
10171017
legacy: subDesc.legacy,
10181018
};
1019+
if (rtcSubInfo.legacy) {
1020+
// For legacy simulcast rid subscription
1021+
rtcSubInfo.tracks.forEach((subTrack) => {
1022+
if (subTrack.simulcastRid) {
1023+
const trackFrom = streams[subTrack.from].media.tracks.find((t) =>
1024+
(t.type === subTrack.type && t.rid === subTrack.simulcastRid));
1025+
if (trackFrom && trackFrom.id) {
1026+
subTrack.from = trackFrom.id;
1027+
}
1028+
}
1029+
});
1030+
}
10191031
return rtcSubInfo;
10201032
};
10211033

source/agent/webrtc/sdpInfo.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class SdpInfo {
175175
}
176176
const payloadList = mediaInfo.payloads.toString().split(' ');
177177
if (selectedPayload !== -1) {
178-
payloadList.unshift(selectedPayload);
178+
payloadList.unshift(selectedPayload.toString());
179179
}
180180
mediaInfo.payloads = payloadList
181181
.filter((p) => relatedPayloads.has(parseInt(p)))
@@ -265,7 +265,7 @@ class SdpInfo {
265265
}
266266
const payloadList = mediaInfo.payloads.toString().split(' ');
267267
if (selectedPayload !== -1) {
268-
payloadList.unshift(selectedPayload);
268+
payloadList.unshift(selectedPayload.toString());
269269
}
270270
mediaInfo.payloads = payloadList
271271
.filter((p) => relatedPayloads.has(parseInt(p)))

source/portal/versions/portalDataAdapter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ const AdatperV1_1 = {
9595
mid: subReq.media.tracks.length.toString(),
9696
from: data.media.video.from,
9797
parameters: data.media.video.parameters,
98+
simulcastRid: data.media.video.simulcastRid,
9899
});
99100
}
100101
return subReq;

0 commit comments

Comments
 (0)