|
|
@@ -6,6 +6,7 @@ var RTCEvents = require('../../service/RTC/RTCEvents');
|
|
6
|
6
|
|
|
7
|
7
|
import * as JitsiConferenceEvents from '../../JitsiConferenceEvents';
|
|
8
|
8
|
import * as JitsiTrackEvents from '../../JitsiTrackEvents';
|
|
|
9
|
+import Statistics from '../statistics/statistics';
|
|
9
|
10
|
|
|
10
|
11
|
/**
|
|
11
|
12
|
* Default value of 2000 milliseconds for
|
|
|
@@ -178,10 +179,24 @@ ParticipantConnectionStatus.prototype._changeConnectionStatus
|
|
178
|
179
|
return;
|
|
179
|
180
|
}
|
|
180
|
181
|
if (participant.isConnectionActive() !== newStatus) {
|
|
|
182
|
+
|
|
181
|
183
|
participant._setIsConnectionActive(newStatus);
|
|
|
184
|
+
|
|
182
|
185
|
logger.debug(
|
|
183
|
186
|
'Emit endpoint conn status(' + Date.now() + '): ',
|
|
184
|
187
|
endpointId, newStatus);
|
|
|
188
|
+
|
|
|
189
|
+ // Log the event on CallStats
|
|
|
190
|
+ Statistics.sendLog(
|
|
|
191
|
+ JSON.stringify({
|
|
|
192
|
+ id: 'peer.conn.status',
|
|
|
193
|
+ participant: endpointId,
|
|
|
194
|
+ status: newStatus
|
|
|
195
|
+ }));
|
|
|
196
|
+
|
|
|
197
|
+ // and analytics
|
|
|
198
|
+ Statistics.analytics.sendEvent('peer.conn.status', null, newStatus);
|
|
|
199
|
+
|
|
185
|
200
|
this.conference.eventEmitter.emit(
|
|
186
|
201
|
JitsiConferenceEvents.PARTICIPANT_CONN_STATUS_CHANGED,
|
|
187
|
202
|
endpointId, newStatus);
|