From faddd76de005b2bdc4e0f3e34b9098e762cc6ca8 Mon Sep 17 00:00:00 2001 From: mgeeky Date: Mon, 7 Mar 2016 18:20:08 +0100 Subject: [PATCH] Added try..catch to avoid looped mozRTCSessionDescription undefined exceptions in Firefox (as occured in 43.0). Shouldn't do much havoc I guess. --- core/main/client/lib/webrtcadapter.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/core/main/client/lib/webrtcadapter.js b/core/main/client/lib/webrtcadapter.js index 80233a2c2..8232b8684 100644 --- a/core/main/client/lib/webrtcadapter.js +++ b/core/main/client/lib/webrtcadapter.js @@ -77,11 +77,16 @@ if (navigator.mozGetUserMedia) { return new mozRTCPeerConnection(pcConfig, pcConstraints); }; - // The RTCSessionDescription object. - window.RTCSessionDescription = mozRTCSessionDescription; + try { + // The RTCSessionDescription object. + window.RTCSessionDescription = mozRTCSessionDescription; - // The RTCIceCandidate object. - window.RTCIceCandidate = mozRTCIceCandidate; + // The RTCIceCandidate object. + window.RTCIceCandidate = mozRTCIceCandidate; + + }catch(err) { + + } // getUserMedia constraints shim. getUserMedia = (webrtcDetectedVersion < 38) ?