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

Commit e8b7a77

Browse files
starwarfanxiandeatintel
authored andcommitted
Fix transport-cc ID issue in simulcast streams (#355)
1 parent 61a95d6 commit e8b7a77

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

source/agent/webrtc/wrtcConnection.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ module.exports = function (spec, on_status, on_mediaUpdate) {
161161
simStreams = [],
162162
ridStreamMap = new Map(),
163163
isSimulcast = false,
164+
transportSeqNumExt = -1,
164165
wrtc;
165166

166167
/*
@@ -219,7 +220,7 @@ module.exports = function (spec, on_status, on_mediaUpdate) {
219220
info: JSON.parse(mediaUpdate)
220221
};
221222
on_mediaUpdate(JSON.stringify(data));
222-
});
223+
}, transportSeqNumExt);
223224
simulcastConstructors.push(vfc);
224225
const simStream = new WrtcStream({
225226
audioFramePacketizer,
@@ -317,7 +318,7 @@ module.exports = function (spec, on_status, on_mediaUpdate) {
317318
info: JSON.parse(mediaUpdate)
318319
};
319320
on_mediaUpdate(JSON.stringify(data));
320-
});
321+
}, transportSeqNumExt);
321322
simulcastConstructors.push(vfc);
322323
const simStream = new WrtcStream({
323324
audioFramePacketizer,
@@ -341,7 +342,7 @@ module.exports = function (spec, on_status, on_mediaUpdate) {
341342
audioFrameConstructor.bindTransport(wrtc.getMediaStream(wrtcId));
342343
}
343344
if (video) {
344-
const transportSeqNumExt = getExtId(sdp, TransportSeqNumUri);
345+
transportSeqNumExt = getExtId(sdp, TransportSeqNumUri);
345346
videoFrameConstructor = new VideoFrameConstructor(on_mediaUpdate, transportSeqNumExt);
346347
videoFrameConstructor.bindTransport(wrtc.getMediaStream(wrtcId));
347348
}
@@ -366,7 +367,7 @@ module.exports = function (spec, on_status, on_mediaUpdate) {
366367
if (video) {
367368
const hasRed = hasCodec(sdp, 'red');
368369
const hasUlpfec = hasCodec(sdp, 'ulpfec');
369-
const transportSeqNumExt = getExtId(sdp, TransportSeqNumUri);
370+
transportSeqNumExt = getExtId(sdp, TransportSeqNumUri);
370371
videoFramePacketizer = new VideoFramePacketizer(hasRed, hasUlpfec, transportSeqNumExt);
371372
videoFramePacketizer.bindTransport(wrtc.getMediaStream(wrtcId));
372373
}

0 commit comments

Comments
 (0)