Browse Source

Merge pull request #135 from jitsi/cs-recorder

Logs recorder states to callstats
dev1
hristoterezov 9 years ago
parent
commit
4258ecdbf7
2 changed files with 18 additions and 0 deletions
  1. 8
    0
      JitsiConference.js
  2. 10
    0
      modules/statistics/statistics.js

+ 8
- 0
JitsiConference.js View File

1342
                 conference.statistics.sendMuteEvent(track.isMuted(), type);
1342
                 conference.statistics.sendMuteEvent(track.isMuted(), type);
1343
             });
1343
             });
1344
 
1344
 
1345
+        // log all events for the recorder operated by the moderator
1346
+        if (conference.isModerator()) {
1347
+            conference.on(JitsiConferenceEvents.RECORDER_STATE_CHANGED,
1348
+                function (status, error) {
1349
+                    conference.statistics.sendLog("Recorder: " + status);
1350
+                });
1351
+        }
1352
+
1345
         conference.room.addListener(XMPPEvents.CREATE_OFFER_FAILED, function (e, pc) {
1353
         conference.room.addListener(XMPPEvents.CREATE_OFFER_FAILED, function (e, pc) {
1346
             conference.statistics.sendCreateOfferFailed(e, pc);
1354
             conference.statistics.sendCreateOfferFailed(e, pc);
1347
         });
1355
         });

+ 10
- 0
modules/statistics/statistics.js View File

378
     CallStats.sendUnhandledError(m, null);
378
     CallStats.sendUnhandledError(m, null);
379
 };
379
 };
380
 
380
 
381
+/**
382
+ * Adds to CallStats an application log.
383
+ *
384
+ * @param {String} a log message to send
385
+ */
386
+Statistics.prototype.sendLog = function (m) {
387
+    // uses  the same field for cs stat as unhandled error
388
+    CallStats.sendUnhandledError(m, this.callstats);
389
+};
390
+
381
 /**
391
 /**
382
  * Sends the given feedback through CallStats.
392
  * Sends the given feedback through CallStats.
383
  *
393
  *

Loading…
Cancel
Save