Browse Source

feat(stats): log events for ICE disconnected,reconnected and failed

When ICE disconnects, reconnects or fails the events will be logged
on both Callstats and "analytics".
dev1
paweldomas 8 years ago
parent
commit
453346264e
2 changed files with 7 additions and 2 deletions
  1. 5
    1
      JitsiConferenceEventManager.js
  2. 2
    1
      modules/statistics/statistics.js

+ 5
- 1
JitsiConferenceEventManager.js View File

@@ -194,7 +194,7 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function () {
194 194
         JitsiConferenceEvents.CONNECTION_INTERRUPTED);
195 195
     chatRoom.addListener(XMPPEvents.CONNECTION_INTERRUPTED,
196 196
         function () {
197
-            Statistics.analytics.sendEvent('connection.interrupted');
197
+            Statistics.sendEventToAll('connection.interrupted');
198 198
         });
199 199
 
200 200
     this.chatRoomForwarder.forward(XMPPEvents.RECORDER_STATE_CHANGED,
@@ -205,6 +205,10 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function () {
205 205
 
206 206
     this.chatRoomForwarder.forward(XMPPEvents.CONNECTION_RESTORED,
207 207
         JitsiConferenceEvents.CONNECTION_RESTORED);
208
+    chatRoom.addListener(XMPPEvents.CONNECTION_RESTORED,
209
+        function () {
210
+            Statistics.sendEventToAll('connection.restored');
211
+        });
208 212
 
209 213
     this.chatRoomForwarder.forward(XMPPEvents.CONFERENCE_SETUP_FAILED,
210 214
         JitsiConferenceEvents.CONFERENCE_FAILED,

+ 2
- 1
modules/statistics/statistics.js View File

@@ -293,12 +293,13 @@ Statistics.prototype.isCallstatsEnabled = function () {
293 293
 };
294 294
 
295 295
 /**
296
- * Notifies CallStats for ice connection failed
296
+ * Notifies CallStats and analytics(if present) for ice connection failed
297 297
  * @param {RTCPeerConnection} pc connection on which failure occured.
298 298
  */
299 299
 Statistics.prototype.sendIceConnectionFailedEvent = function (pc) {
300 300
     if(this.callstats)
301 301
         this.callstats.sendIceConnectionFailedEvent(pc, this.callstats);
302
+    Statistics.analytics.sendEvent('connection.ice_failed');
302 303
 };
303 304
 
304 305
 /**

Loading…
Cancel
Save