Selaa lähdekoodia

ref: Always use a websocket if offered, remove the openSctp option. (#1426)

dev1
bgrozev 4 vuotta sitten
vanhempi
commit
1285f29f08
No account linked to committer's email address
2 muutettua tiedostoa jossa 5 lisäystä ja 39 poistoa
  1. 5
    20
      JitsiConference.js
  2. 0
    19
      modules/xmpp/moderator.js

+ 5
- 20
JitsiConference.js Näytä tiedosto

99
  * "Math.random() < forceJVB121Ratio" will determine whether a 2 people
99
  * "Math.random() < forceJVB121Ratio" will determine whether a 2 people
100
  * conference should be moved to the JVB instead of P2P. The decision is made on
100
  * conference should be moved to the JVB instead of P2P. The decision is made on
101
  * the responder side, after ICE succeeds on the P2P connection.
101
  * the responder side, after ICE succeeds on the P2P connection.
102
- * @param {*} [options.config.openBridgeChannel] Which kind of communication to
103
- * open with the videobridge. Values can be "datachannel", "websocket", true
104
- * (treat it as "datachannel"), undefined (treat it as "datachannel") and false
105
- * (don't open any channel).
106
  * @constructor
102
  * @constructor
107
  *
103
  *
108
  * FIXME Make all methods which are called from lib-internal classes
104
  * FIXME Make all methods which are called from lib-internal classes
1999
         wsUrl = webSocket[0].getAttribute('url');
1995
         wsUrl = webSocket[0].getAttribute('url');
2000
     }
1996
     }
2001
 
1997
 
2002
-    let bridgeChannelType;
2003
-
2004
-    switch (this.options.config.openBridgeChannel) {
2005
-    case 'datachannel':
2006
-    case true:
2007
-    case undefined:
2008
-        bridgeChannelType = 'datachannel';
2009
-        break;
2010
-    case 'websocket':
2011
-        bridgeChannelType = 'websocket';
2012
-        break;
2013
-    }
2014
-
2015
-    if (bridgeChannelType === 'datachannel') {
2016
-        this.rtc.initializeBridgeChannel(pc, null);
2017
-    } else if (bridgeChannelType === 'websocket' && wsUrl) {
1998
+    if (wsUrl) {
1999
+        // If the offer contains a websocket use it.
2018
         this.rtc.initializeBridgeChannel(null, wsUrl);
2000
         this.rtc.initializeBridgeChannel(null, wsUrl);
2001
+    } else {
2002
+        // Otherwise, fall back to an attempt to use SCTP.
2003
+        this.rtc.initializeBridgeChannel(pc, null);
2019
     }
2004
     }
2020
 };
2005
 };
2021
 
2006
 

+ 0
- 19
modules/xmpp/moderator.js Näytä tiedosto

208
             }).up();
208
             }).up();
209
     }
209
     }
210
 
210
 
211
-    let openSctp;
212
-
213
-    switch (this.options.conference.openBridgeChannel) {
214
-    case 'datachannel':
215
-    case true:
216
-    case undefined:
217
-        openSctp = true;
218
-        break;
219
-    case 'websocket':
220
-        openSctp = false;
221
-        break;
222
-    }
223
-
224
-    elem.c(
225
-        'property', {
226
-            name: 'openSctp',
227
-            value: openSctp
228
-        }).up();
229
-
230
     if (config.opusMaxAverageBitrate) {
211
     if (config.opusMaxAverageBitrate) {
231
         elem.c(
212
         elem.c(
232
             'property', {
213
             'property', {

Loading…
Peruuta
Tallenna