From 9ef02e5e0ddb2979c0b585f9d31017bbacad20aa Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Wed, 7 Sep 2016 11:03:19 +0200 Subject: [PATCH] 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. --- static/js/mediastream/utils.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/mediastream/utils.js b/static/js/mediastream/utils.js index 535ec0ab..da3c4a67 100644 --- a/static/js/mediastream/utils.js +++ b/static/js/mediastream/utils.js @@ -447,6 +447,11 @@ define([], function() { // This change breaks very old versions of WebRTC. So we change it back locally // for Chrome <= 38 which makes things work fine again. sdp = sdp.replace(/UDP\/TLS\/RTP\/SAVPF/g, "RTP/SAVPF") + + // Remove all rtx support from remote sdp, which is geneated by + // Chrome 48+ but does not work with <= 38. + sdp = sdp.replace(/a=rtpmap:\d+ rtx\/\d+\r\n/i, ""); + sdp = sdp.replace(/a=fmtp:\d+ apt=\d+\r\n/i, ""); } return sdp; }