Browse Source

Converts ssltcp candidate to tcp one on FF.

j8
damencho 9 years ago
parent
commit
d7317a94bb
2 changed files with 13 additions and 4 deletions
  1. 11
    2
      modules/xmpp/SDPUtil.js
  2. 2
    2
      package.json

+ 11
- 2
modules/xmpp/SDPUtil.js View File

@@ -1,4 +1,6 @@
1 1
 /* jshint -W101 */
2
+var RTCBrowserType = require("../RTC/RTCBrowserType");
3
+
2 4
 var SDPUtil = {
3 5
     filter_special_chars: function (text) {
4 6
         return text.replace(/[\\\/\{,\}\+]/g, "");
@@ -311,7 +313,14 @@ var SDPUtil = {
311 313
         line += ' ';
312 314
         line += cand.getAttribute('component');
313 315
         line += ' ';
314
-        line += cand.getAttribute('protocol'); //.toUpperCase(); // chrome M23 doesn't like this
316
+
317
+        var protocol = cand.getAttribute('protocol');
318
+        // use tcp candidates for FF
319
+        if (RTCBrowserType.isFirefox() && protocol.toLowerCase() == 'ssltcp') {
320
+            protocol = 'tcp';
321
+        }
322
+
323
+        line += protocol; //.toUpperCase(); // chrome M23 doesn't like this
315 324
         line += ' ';
316 325
         line += cand.getAttribute('priority');
317 326
         line += ' ';
@@ -338,7 +347,7 @@ var SDPUtil = {
338 347
                 }
339 348
                 break;
340 349
         }
341
-        if (cand.getAttribute('protocol').toLowerCase() == 'tcp') {
350
+        if (protocol.toLowerCase() == 'tcp') {
342 351
             line += 'tcptype';
343 352
             line += ' ';
344 353
             line += cand.getAttribute('tcptype');

+ 2
- 2
package.json View File

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

Loading…
Cancel
Save