|
@@ -12,16 +12,19 @@ import Statistics from '../statistics/statistics';
|
12
|
12
|
const logger = getLogger(__filename);
|
13
|
13
|
|
14
|
14
|
/**
|
15
|
|
- * Default value of 500 milliseconds for
|
16
|
|
- * {@link ParticipantConnectionStatus.outOfLastNTimeout}.
|
|
15
|
+ * Default value of 500 milliseconds for {@link ParticipantConnectionStatus.outOfLastNTimeout}.
|
17
|
16
|
*
|
18
|
17
|
* @type {number}
|
19
|
18
|
*/
|
20
|
19
|
const DEFAULT_NOT_IN_LAST_N_TIMEOUT = 500;
|
21
|
20
|
|
22
|
21
|
/**
|
23
|
|
- * Default value of 2000 milliseconds for
|
24
|
|
- * {@link ParticipantConnectionStatus.rtcMuteTimeout}.
|
|
22
|
+ * Default value of 2500 milliseconds for {@link ParticipantConnectionStatus.p2pRtcMuteTimeout}.
|
|
23
|
+ */
|
|
24
|
+const DEFAULT_P2P_RTC_MUTE_TIMEOUT = 2500;
|
|
25
|
+
|
|
26
|
+/**
|
|
27
|
+ * Default value of 10000 milliseconds for {@link ParticipantConnectionStatus.rtcMuteTimeout}.
|
25
|
28
|
*
|
26
|
29
|
* @type {number}
|
27
|
30
|
*/
|
|
@@ -170,6 +173,8 @@ export default class ParticipantConnectionStatusHandler {
|
170
|
173
|
* @param {RTC} rtc the RTC service instance
|
171
|
174
|
* @param {JitsiConference} conference parent conference instance
|
172
|
175
|
* @param {Object} options
|
|
176
|
+ * @param {number} [options.p2pRtcMuteTimeout=2500] custom value for
|
|
177
|
+ * {@link ParticipantConnectionStatus.p2pRtcMuteTimeout}.
|
173
|
178
|
* @param {number} [options.rtcMuteTimeout=2000] custom value for
|
174
|
179
|
* {@link ParticipantConnectionStatus.rtcMuteTimeout}.
|
175
|
180
|
* @param {number} [options.outOfLastNTimeout=500] custom value for
|
|
@@ -210,6 +215,16 @@ export default class ParticipantConnectionStatusHandler {
|
210
|
215
|
= typeof options.outOfLastNTimeout === 'number'
|
211
|
216
|
? options.outOfLastNTimeout : DEFAULT_NOT_IN_LAST_N_TIMEOUT;
|
212
|
217
|
|
|
218
|
+ /**
|
|
219
|
+ * How long we are going to wait for the corresponding signaling mute event after the RTC video track muted
|
|
220
|
+ * event is fired on the Media stream, before the connection interrupted is fired. The default value is
|
|
221
|
+ * {@link DEFAULT_P2P_RTC_MUTE_TIMEOUT}.
|
|
222
|
+ *
|
|
223
|
+ * @type {number} amount of time in milliseconds.
|
|
224
|
+ */
|
|
225
|
+ this.p2pRtcMuteTimeout = typeof options.p2pRtcMuteTimeout === 'number'
|
|
226
|
+ ? options.p2pRtcMuteTimeout : DEFAULT_P2P_RTC_MUTE_TIMEOUT;
|
|
227
|
+
|
213
|
228
|
/**
|
214
|
229
|
* How long we're going to wait after the RTC video track muted event
|
215
|
230
|
* for the corresponding signalling mute event, before the connection
|
|
@@ -285,7 +300,8 @@ export default class ParticipantConnectionStatusHandler {
|
285
|
300
|
*/
|
286
|
301
|
_getVideoFrozenTimeout(id) {
|
287
|
302
|
return this.rtc.isInLastN(id)
|
288
|
|
- ? this.rtcMuteTimeout : this.outOfLastNTimeout;
|
|
303
|
+ ? this.rtcMuteTimeout
|
|
304
|
+ : this.conference.isP2PActive() ? this.p2pRtcMuteTimeout : this.outOfLastNTimeout;
|
289
|
305
|
}
|
290
|
306
|
|
291
|
307
|
/**
|