|
@@ -351,12 +351,25 @@ export default class JingleSessionPC extends JingleSession {
|
351
|
351
|
let eventName = this.isP2P ? 'p2p.ice.' : 'ice.';
|
352
|
352
|
|
353
|
353
|
eventName += this.isInitiator ? 'initiator.' : 'responder.';
|
354
|
|
- eventName += 'checksDuration';
|
355
|
354
|
Statistics.analytics.sendEvent(
|
356
|
|
- eventName,
|
|
355
|
+ `${eventName}checksDuration`,
|
357
|
356
|
{
|
358
|
357
|
value: now - this._iceCheckingStartedTimestamp
|
359
|
358
|
});
|
|
359
|
+
|
|
360
|
+ // Switch between ICE gathering and ICE checking whichever
|
|
361
|
+ // started first (scenarios are different for initiator
|
|
362
|
+ // vs responder)
|
|
363
|
+ const iceStarted
|
|
364
|
+ = Math.min(
|
|
365
|
+ this._iceCheckingStartedTimestamp,
|
|
366
|
+ this._gatheringStartedTimestamp);
|
|
367
|
+
|
|
368
|
+ Statistics.analytics.sendEvent(
|
|
369
|
+ `${eventName}establishmentDuration`,
|
|
370
|
+ {
|
|
371
|
+ value: now - iceStarted
|
|
372
|
+ });
|
360
|
373
|
this.wasConnected = true;
|
361
|
374
|
this.room.eventEmitter.emit(
|
362
|
375
|
XMPPEvents.CONNECTION_ESTABLISHED, this);
|