Przeglądaj źródła

feat: Logs pin/unpin events via analytics.

master
Boris Grozev 8 lat temu
rodzic
commit
6740b9edf6
1 zmienionych plików z 12 dodań i 2 usunięć
  1. 12
    2
      conference.js

+ 12
- 2
conference.js Wyświetl plik

@@ -1437,11 +1437,21 @@ export default {
1437 1437
         });
1438 1438
 
1439 1439
         APP.UI.addListener(UIEvents.PINNED_ENDPOINT, (smallVideo, isPinned) => {
1440
-            var smallVideoId = smallVideo.getId();
1440
+            let smallVideoId = smallVideo.getId();
1441
+            let isLocal = APP.conference.isLocalId(smallVideoId);
1442
+
1443
+            let eventName
1444
+                = (isPinned ? "pinned" : "unpinned") + "." +
1445
+                        (isLocal ? "local" : "remote");
1446
+            let participantCount = room.getParticipantCount();
1447
+            JitsiMeetJS.analytics.sendEvent(
1448
+                    eventName,
1449
+                    { value: participantCount });
1450
+
1441 1451
             // FIXME why VIDEO_CONTAINER_TYPE instead of checking if
1442 1452
             // the participant is on the large video ?
1443 1453
             if (smallVideo.getVideoType() === VIDEO_CONTAINER_TYPE
1444
-                && !APP.conference.isLocalId(smallVideoId)) {
1454
+                && !isLocal) {
1445 1455
 
1446 1456
                 // When the library starts supporting multiple pins we would
1447 1457
                 // pass the isPinned parameter together with the identifier,

Ładowanie…
Anuluj
Zapisz