From a728100eb2ec11961d55c4bb8b335cbff0e7d6f7 Mon Sep 17 00:00:00 2001 From: Lorenzo Miniero Date: Thu, 21 Feb 2019 10:50:01 +0100 Subject: [PATCH] Force plan-b semantics if Chrome is < 72 --- html/janus.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/html/janus.js b/html/janus.js index aa86deeb66..c53758bd1d 100644 --- a/html/janus.js +++ b/html/janus.js @@ -1604,7 +1604,10 @@ function Janus(gatewayCallbacks) { // If we still need to create a PeerConnection, let's do that if(!config.pc) { var pc_config = {"iceServers": iceServers, "iceTransportPolicy": iceTransportPolicy, "bundlePolicy": bundlePolicy}; - //~ var pc_constraints = {'mandatory': {'MozDontOfferDataChannel':true}}; + if(Janus.webRTCAdapter.browserDetails.browser === "chrome" && Janus.webRTCAdapter.browserDetails.version < 72) { + // For Chrome versions before 72, we force a plan-b semantic + pc_config["sdpSemantics"] = "plan-b"; + } var pc_constraints = { "optional": [{"DtlsSrtpKeyAgreement": true}] };