|
@@ -45,14 +45,14 @@ const logger = getLogger(__filename);
|
45
|
45
|
* @param {number} [options.config.avgRtpStatsN=15] how many samples are to be
|
46
|
46
|
* collected by {@link AvgRTPStatsReporter}, before arithmetic mean is
|
47
|
47
|
* calculated and submitted to the analytics module.
|
48
|
|
- * @param {boolean} [options.config.enableP2P] when set to <tt>true</tt>
|
|
48
|
+ * @param {boolean} [options.config.p2p.enabled] when set to <tt>true</tt>
|
49
|
49
|
* the peer to peer mode will be enabled. It means that when there are only 2
|
50
|
50
|
* participants in the conference an attempt to make direct connection will be
|
51
|
51
|
* made. If the connection succeeds the conference will stop sending data
|
52
|
52
|
* through the JVB connection and will use the direct one instead.
|
53
|
|
- * @param {number} [options.config.backToP2PDelay=5] a delay given in seconds,
|
54
|
|
- * before the conference switches back to P2P, after the 3rd participant has
|
55
|
|
- * left the room.
|
|
53
|
+ * @param {number} [options.config.p2p.backToP2PDelay=5] a delay given in
|
|
54
|
+ * seconds, before the conference switches back to P2P, after the 3rd
|
|
55
|
+ * participant has left the room.
|
56
|
56
|
* @param {number} [options.config.channelLastN=-1] The requested amount of
|
57
|
57
|
* videos are going to be delivered after the value is in effect. Set to -1 for
|
58
|
58
|
* unlimited or all available videos.
|
|
@@ -151,7 +151,8 @@ export default function JitsiConference(options) {
|
151
|
151
|
*/
|
152
|
152
|
this.deferredStartP2PTask = null;
|
153
|
153
|
|
154
|
|
- const delay = parseInt(options.config.backToP2PDelay, 10);
|
|
154
|
+ const delay
|
|
155
|
+ = parseInt(options.config.p2p && options.config.p2p.backToP2PDelay, 10);
|
155
|
156
|
|
156
|
157
|
/**
|
157
|
158
|
* A delay given in seconds, before the conference switches back to P2P
|
|
@@ -2298,7 +2299,8 @@ JitsiConference.prototype._suspendMediaTransferForJvbConnection = function() {
|
2298
|
2299
|
* @private
|
2299
|
2300
|
*/
|
2300
|
2301
|
JitsiConference.prototype._maybeStartOrStopP2P = function(userLeftEvent) {
|
2301
|
|
- if (!this.options.config.enableP2P || !RTCBrowserType.isP2PSupported()) {
|
|
2302
|
+ if (!(RTCBrowserType.isP2PSupported()
|
|
2303
|
+ && this.options.config.p2p && this.options.config.p2p.enabled)) {
|
2302
|
2304
|
logger.info('Auto P2P disabled');
|
2303
|
2305
|
|
2304
|
2306
|
return;
|