Browse Source

Fixes missing recorder statistics. Adds the errors reported by jibri to the status logs.

dev1
damencho 9 years ago
parent
commit
3cdc7ea35a
1 changed files with 10 additions and 8 deletions
  1. 10
    8
      JitsiConference.js

+ 10
- 8
JitsiConference.js View File

@@ -1098,6 +1098,16 @@ function setupListeners(conference) {
1098 1098
 
1099 1099
     conference.room.addListener(XMPPEvents.LOCAL_ROLE_CHANGED, function (role) {
1100 1100
         conference.eventEmitter.emit(JitsiConferenceEvents.USER_ROLE_CHANGED, conference.myUserId(), role);
1101
+
1102
+        // log all events for the recorder operated by the moderator
1103
+        if (conference.statistics && conference.isModerator()) {
1104
+            conference.on(JitsiConferenceEvents.RECORDER_STATE_CHANGED,
1105
+                function (status, error) {
1106
+                    Statistics.sendLog(
1107
+                        "[Recorder] status: " + status
1108
+                            + (error? " error: " + error : ""));
1109
+                });
1110
+        }
1101 1111
     });
1102 1112
     conference.room.addListener(XMPPEvents.MUC_ROLE_CHANGED, conference.onUserRoleChanged.bind(conference));
1103 1113
 
@@ -1351,14 +1361,6 @@ function setupListeners(conference) {
1351 1361
                 conference.statistics.sendMuteEvent(track.isMuted(), type);
1352 1362
             });
1353 1363
 
1354
-        // log all events for the recorder operated by the moderator
1355
-        if (conference.isModerator()) {
1356
-            conference.on(JitsiConferenceEvents.RECORDER_STATE_CHANGED,
1357
-                function (status, error) {
1358
-                    Statistics.sendLog("Recorder: " + status);
1359
-                });
1360
-        }
1361
-
1362 1364
         conference.room.addListener(XMPPEvents.CREATE_OFFER_FAILED, function (e, pc) {
1363 1365
             conference.statistics.sendCreateOfferFailed(e, pc);
1364 1366
         });

Loading…
Cancel
Save