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

Commit 47a0222

Browse files
authored
Allow legacy subscription to simulcast stream (#838)
1 parent 14326d7 commit 47a0222

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
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/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)