|
@@ -99,10 +99,6 @@ const JINGLE_SI_TIMEOUT = 5000;
|
99
|
99
|
* "Math.random() < forceJVB121Ratio" will determine whether a 2 people
|
100
|
100
|
* conference should be moved to the JVB instead of P2P. The decision is made on
|
101
|
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
|
102
|
* @constructor
|
107
|
103
|
*
|
108
|
104
|
* FIXME Make all methods which are called from lib-internal classes
|
|
@@ -1999,23 +1995,12 @@ JitsiConference.prototype._setBridgeChannel = function(offerIq, pc) {
|
1999
|
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
|
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
|
|