Skip to content

Commit 2a8ec3f

Browse files
committed
Added compatibility fix for Chrome 38 which stopped working when called from Chrome 46+ (Munge remote offer UDP/TLS/RTP/SAVPF to RTP/SAVPF).
1 parent 7577d98 commit 2a8ec3f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

static/js/mediastream/utils.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,15 @@ define([], function() {
439439
return sdp;
440440
},
441441
fixRemote: function(sdp) {
442+
if (window.webrtcDetectedBrowser === "chrome" && window.webrtcDetectedVersion <= 38) {
443+
// Chrome 46 started to send m lines as UDP/TLS/RTP/SAVPF
444+
// https://bugs.chromium.org/p/webrtc/issues/detail?id=2796
445+
// https://groups.google.com/forum/#!searchin/discuss-webrtc/psa$20savpf/discuss-webrtc/ZOjSMolpP40/gF5_1Tk8xRAJ
446+
// https://groups.google.com/forum/#!topic/mozilla.dev.media/vNCjLFgc97c
447+
// This change breaks very old versions of WebRTC. So we change it back locally
448+
// for Chrome <= 38 which makes things work fine again.
449+
sdp = sdp.replace(/UDP\/TLS\/RTP\/SAVPF/g, "RTP/SAVPF")
450+
}
442451
return sdp;
443452
}
444453
}

0 commit comments

Comments
 (0)