Converts ssltcp candidate to tcp one on FF.

This commit is contained in:
damencho 2015-12-02 16:35:00 -06:00
parent d42415959f
commit d7317a94bb
2 changed files with 13 additions and 4 deletions

View File

@ -1,4 +1,6 @@
/* jshint -W101 */ /* jshint -W101 */
var RTCBrowserType = require("../RTC/RTCBrowserType");
var SDPUtil = { var SDPUtil = {
filter_special_chars: function (text) { filter_special_chars: function (text) {
return text.replace(/[\\\/\{,\}\+]/g, ""); return text.replace(/[\\\/\{,\}\+]/g, "");
@ -311,7 +313,14 @@ var SDPUtil = {
line += ' '; line += ' ';
line += cand.getAttribute('component'); line += cand.getAttribute('component');
line += ' '; 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 += ' ';
line += cand.getAttribute('priority'); line += cand.getAttribute('priority');
line += ' '; line += ' ';
@ -338,7 +347,7 @@ var SDPUtil = {
} }
break; break;
} }
if (cand.getAttribute('protocol').toLowerCase() == 'tcp') { if (protocol.toLowerCase() == 'tcp') {
line += 'tcptype'; line += 'tcptype';
line += ' '; line += ' ';
line += cand.getAttribute('tcptype'); line += cand.getAttribute('tcptype');

View File

@ -28,8 +28,8 @@
"pako": "*", "pako": "*",
"retry": "0.6.1", "retry": "0.6.1",
"sdp-interop": "0.1.11", "sdp-interop": "0.1.11",
"sdp-simulcast": "0.1.2", "sdp-simulcast": "0.1.3",
"sdp-transform": "1.5.2", "sdp-transform": "1.5.*",
"socket.io-client": "1.3.6", "socket.io-client": "1.3.6",
"strophe": "^1.2.2", "strophe": "^1.2.2",
"strophejs-plugins": "^0.0.6", "strophejs-plugins": "^0.0.6",