Bladeren bron

Sends recorder states to callstats.

master
damencho 9 jaren geleden
bovenliggende
commit
158b3a5463
2 gewijzigde bestanden met toevoegingen van 18 en 0 verwijderingen
  1. 8
    0
      JitsiConference.js
  2. 10
    0
      modules/statistics/statistics.js

+ 8
- 0
JitsiConference.js Bestand weergeven

@@ -1342,6 +1342,14 @@ function setupListeners(conference) {
1342 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 1353
         conference.room.addListener(XMPPEvents.CREATE_OFFER_FAILED, function (e, pc) {
1346 1354
             conference.statistics.sendCreateOfferFailed(e, pc);
1347 1355
         });

+ 10
- 0
modules/statistics/statistics.js Bestand weergeven

@@ -378,6 +378,16 @@ Statistics.sendLog = function (m) {
378 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 392
  * Sends the given feedback through CallStats.
383 393
  *

Laden…
Annuleren
Opslaan