Skip to content

Commit 9ef02e5

Browse files
committed
Filter rtx support from remote SDP for Chrone <= 38
Chrome 52 started to send rtx support with their SDP which is not supported on Chrome 38 which is the lowest supported version. This change removes rtx from the remote SDP before setting it as remote description when run on Chrome <= 38.
1 parent ff79f24 commit 9ef02e5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

static/js/mediastream/utils.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,11 @@ define([], function() {
447447
// This change breaks very old versions of WebRTC. So we change it back locally
448448
// for Chrome <= 38 which makes things work fine again.
449449
sdp = sdp.replace(/UDP\/TLS\/RTP\/SAVPF/g, "RTP/SAVPF")
450+
451+
// Remove all rtx support from remote sdp, which is geneated by
452+
// Chrome 48+ but does not work with <= 38.
453+
sdp = sdp.replace(/a=rtpmap:\d+ rtx\/\d+\r\n/i, "");
454+
sdp = sdp.replace(/a=fmtp:\d+ apt=\d+\r\n/i, "");
450455
}
451456
return sdp;
452457
}

0 commit comments

Comments
 (0)