From d7317a94bb74e049ac47f253db1fe84d8cc63fb9 Mon Sep 17 00:00:00 2001 From: damencho Date: Wed, 2 Dec 2015 16:35:00 -0600 Subject: [PATCH] Converts ssltcp candidate to tcp one on FF. --- modules/xmpp/SDPUtil.js | 13 +++++++++++-- package.json | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/xmpp/SDPUtil.js b/modules/xmpp/SDPUtil.js index ad581fc06..ed1057050 100644 --- a/modules/xmpp/SDPUtil.js +++ b/modules/xmpp/SDPUtil.js @@ -1,4 +1,6 @@ /* jshint -W101 */ +var RTCBrowserType = require("../RTC/RTCBrowserType"); + var SDPUtil = { filter_special_chars: function (text) { return text.replace(/[\\\/\{,\}\+]/g, ""); @@ -311,7 +313,14 @@ var SDPUtil = { line += ' '; line += cand.getAttribute('component'); line += ' '; - line += cand.getAttribute('protocol'); //.toUpperCase(); // chrome M23 doesn't like this + + var protocol = cand.getAttribute('protocol'); + // use tcp candidates for FF + if (RTCBrowserType.isFirefox() && protocol.toLowerCase() == 'ssltcp') { + protocol = 'tcp'; + } + + line += protocol; //.toUpperCase(); // chrome M23 doesn't like this line += ' '; line += cand.getAttribute('priority'); line += ' '; @@ -338,7 +347,7 @@ var SDPUtil = { } break; } - if (cand.getAttribute('protocol').toLowerCase() == 'tcp') { + if (protocol.toLowerCase() == 'tcp') { line += 'tcptype'; line += ' '; line += cand.getAttribute('tcptype'); diff --git a/package.json b/package.json index 9e74f9791..c133f3c07 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,8 @@ "pako": "*", "retry": "0.6.1", "sdp-interop": "0.1.11", - "sdp-simulcast": "0.1.2", - "sdp-transform": "1.5.2", + "sdp-simulcast": "0.1.3", + "sdp-transform": "1.5.*", "socket.io-client": "1.3.6", "strophe": "^1.2.2", "strophejs-plugins": "^0.0.6",