浏览代码

ref(analytics): centralize all event names (#2272)

* ref(analytics): centralize all event names

* squash: fix typo and alpha ordering

* squash: rename file to AnalyticsEvents to parallel lib-jitsi-meet
master
virtuacoplenny 7 年前
父节点
当前提交
9b67e796bd
共有 26 个文件被更改,包括 899 次插入111 次删除
  1. 26
    16
      conference.js
  2. 7
    3
      modules/API/API.js
  3. 11
    7
      modules/UI/recording/Recording.js
  4. 19
    9
      modules/UI/shared_video/SharedVideo.js
  5. 7
    3
      modules/UI/side_pannels/profile/Profile.js
  6. 5
    2
      modules/UI/videolayout/Filmstrip.js
  7. 11
    5
      modules/keyboardshortcut/keyboardshortcut.js
  8. 663
    0
      react/features/analytics/AnalyticsEvents.js
  9. 1
    0
      react/features/analytics/index.js
  10. 9
    3
      react/features/base/conference/actions.js
  11. 12
    5
      react/features/base/conference/middleware.js
  12. 12
    5
      react/features/base/media/middleware.js
  13. 5
    2
      react/features/base/tracks/actions.js
  14. 5
    2
      react/features/feedback/components/FeedbackDialog.web.js
  15. 5
    2
      react/features/invite/components/InviteDialog.web.js
  16. 5
    2
      react/features/mobile/background/actions.js
  17. 6
    2
      react/features/mobile/callkit/middleware.js
  18. 2
    1
      react/features/overlay/components/AbstractPageReloadOverlay.js
  19. 5
    2
      react/features/remote-video-menu/components/KickButton.js
  20. 5
    2
      react/features/remote-video-menu/components/MuteButton.js
  21. 5
    2
      react/features/remote-video-menu/components/MuteRemoteParticipantDialog.web.js
  22. 5
    2
      react/features/remote-video-menu/components/RemoteControlButton.js
  23. 2
    2
      react/features/toolbox/components/ProfileButton.web.js
  24. 8
    3
      react/features/toolbox/components/Toolbox.native.js
  25. 47
    24
      react/features/toolbox/defaultToolbarButtons.web.js
  26. 11
    5
      react/features/video-quality/components/VideoQualityDialog.web.js

+ 26
- 16
conference.js 查看文件

@@ -15,7 +15,21 @@ import UIEvents from './service/UI/UIEvents';
15 15
 import UIUtil from './modules/UI/util/UIUtil';
16 16
 import * as JitsiMeetConferenceEvents from './ConferenceEvents';
17 17
 
18
-import { initAnalytics, sendAnalyticsEvent } from './react/features/analytics';
18
+import {
19
+    CONFERENCE_AUDIO_INITIALLY_MUTED,
20
+    CONFERENCE_SHARING_DESKTOP_START,
21
+    CONFERENCE_SHARING_DESKTOP_STOP,
22
+    CONFERENCE_VIDEO_INITIALLY_MUTED,
23
+    DEVICE_LIST_CHANGED_AUDIO_MUTED,
24
+    DEVICE_LIST_CHANGED_VIDEO_MUTED,
25
+    SELECT_PARTICIPANT_FAILED,
26
+    SETTINGS_CHANGE_DEVICE_AUDIO_OUT,
27
+    SETTINGS_CHANGE_DEVICE_AUDIO_IN,
28
+    SETTINGS_CHANGE_DEVICE_VIDEO,
29
+    STREAM_SWITCH_DELAY,
30
+    initAnalytics,
31
+    sendAnalyticsEvent
32
+} from './react/features/analytics';
19 33
 
20 34
 import EventEmitter from 'events';
21 35
 
@@ -724,12 +738,12 @@ export default {
724 738
             .then(([ tracks, con ]) => {
725 739
                 tracks.forEach(track => {
726 740
                     if (track.isAudioTrack() && this.isLocalAudioMuted()) {
727
-                        sendAnalyticsEvent('conference.audio.initiallyMuted');
741
+                        sendAnalyticsEvent(CONFERENCE_AUDIO_INITIALLY_MUTED);
728 742
                         logger.log('Audio mute: initially muted');
729 743
                         track.mute();
730 744
                     } else if (track.isVideoTrack()
731 745
                                     && this.isLocalVideoMuted()) {
732
-                        sendAnalyticsEvent('conference.video.initiallyMuted');
746
+                        sendAnalyticsEvent(CONFERENCE_VIDEO_INITIALLY_MUTED);
733 747
                         logger.log('Video mute: initially muted');
734 748
                         track.mute();
735 749
                     }
@@ -1434,8 +1448,7 @@ export default {
1434 1448
             promise = createLocalTracksF({ devices: [ 'video' ] })
1435 1449
                 .then(([ stream ]) => this.useVideoStream(stream))
1436 1450
                 .then(() => {
1437
-                    sendAnalyticsEvent(
1438
-                        'conference.sharingDesktop.stop');
1451
+                    sendAnalyticsEvent(CONFERENCE_SHARING_DESKTOP_STOP);
1439 1452
                     logger.log('switched back to local video');
1440 1453
                     if (!this.localVideo && wasVideoMuted) {
1441 1454
                         return Promise.reject('No local video to be muted!');
@@ -1614,7 +1627,7 @@ export default {
1614 1627
             .then(stream => this.useVideoStream(stream))
1615 1628
             .then(() => {
1616 1629
                 this.videoSwitchInProgress = false;
1617
-                sendAnalyticsEvent('conference.sharingDesktop.start');
1630
+                sendAnalyticsEvent(CONFERENCE_SHARING_DESKTOP_START);
1618 1631
                 logger.log('sharing local desktop');
1619 1632
             })
1620 1633
             .catch(error => {
@@ -1910,8 +1923,7 @@ export default {
1910 1923
 
1911 1924
                     room.selectParticipant(id);
1912 1925
                 } catch (e) {
1913
-                    sendAnalyticsEvent(
1914
-                        'selectParticipant.failed');
1926
+                    sendAnalyticsEvent(SELECT_PARTICIPANT_FAILED);
1915 1927
                     reportError(e);
1916 1928
                 }
1917 1929
             });
@@ -2151,7 +2163,7 @@ export default {
2151 2163
                 // Longer delays will be caused by something else and will just
2152 2164
                 // poison the data.
2153 2165
                 if (delay < 2000) {
2154
-                    sendAnalyticsEvent('stream.switch.delay', { value: delay });
2166
+                    sendAnalyticsEvent(STREAM_SWITCH_DELAY, { value: delay });
2155 2167
                 }
2156 2168
             });
2157 2169
 
@@ -2178,7 +2190,7 @@ export default {
2178 2190
             cameraDeviceId => {
2179 2191
                 const videoWasMuted = this.isLocalVideoMuted();
2180 2192
 
2181
-                sendAnalyticsEvent('settings.changeDevice.video');
2193
+                sendAnalyticsEvent(SETTINGS_CHANGE_DEVICE_VIDEO);
2182 2194
                 createLocalTracksF({
2183 2195
                     devices: [ 'video' ],
2184 2196
                     cameraDeviceId,
@@ -2217,8 +2229,7 @@ export default {
2217 2229
             micDeviceId => {
2218 2230
                 const audioWasMuted = this.isLocalAudioMuted();
2219 2231
 
2220
-                sendAnalyticsEvent(
2221
-                    'settings.changeDevice.audioIn');
2232
+                sendAnalyticsEvent(SETTINGS_CHANGE_DEVICE_AUDIO_IN);
2222 2233
                 createLocalTracksF({
2223 2234
                     devices: [ 'audio' ],
2224 2235
                     cameraDeviceId: null,
@@ -2248,8 +2259,7 @@ export default {
2248 2259
         APP.UI.addListener(
2249 2260
             UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED,
2250 2261
             audioOutputDeviceId => {
2251
-                sendAnalyticsEvent(
2252
-                    'settings.changeDevice.audioOut');
2262
+                sendAnalyticsEvent(SETTINGS_CHANGE_DEVICE_AUDIO_OUT);
2253 2263
                 APP.settings.setAudioOutputDeviceId(audioOutputDeviceId)
2254 2264
                     .then(() => logger.log('changed audio output device'))
2255 2265
                     .catch(err => {
@@ -2514,7 +2524,7 @@ export default {
2514 2524
                     // If audio was muted before, or we unplugged current device
2515 2525
                     // and selected new one, then mute new audio track.
2516 2526
                     if (audioWasMuted) {
2517
-                        sendAnalyticsEvent('deviceListChanged.audio.muted');
2527
+                        sendAnalyticsEvent(DEVICE_LIST_CHANGED_AUDIO_MUTED);
2518 2528
                         logger.log('Audio mute: device list changed');
2519 2529
                         muteLocalAudio(true);
2520 2530
                     }
@@ -2522,7 +2532,7 @@ export default {
2522 2532
                     // If video was muted before, or we unplugged current device
2523 2533
                     // and selected new one, then mute new video track.
2524 2534
                     if (!this.isSharingScreen && videoWasMuted) {
2525
-                        sendAnalyticsEvent('deviceListChanged.video.muted');
2535
+                        sendAnalyticsEvent(DEVICE_LIST_CHANGED_VIDEO_MUTED);
2526 2536
                         logger.log('Video mute: device list changed');
2527 2537
                         muteLocalVideo(true);
2528 2538
                     }

+ 7
- 3
modules/API/API.js 查看文件

@@ -2,7 +2,11 @@
2 2
 
3 3
 import * as JitsiMeetConferenceEvents from '../../ConferenceEvents';
4 4
 import { parseJWTFromURLParams } from '../../react/features/base/jwt';
5
-import { sendAnalyticsEvent } from '../../react/features/analytics';
5
+import {
6
+    API_TOGGLE_AUDIO,
7
+    API_TOGGLE_VIDEO,
8
+    sendAnalyticsEvent
9
+} from '../../react/features/analytics';
6 10
 import { getJitsiMeetTransport } from '../transport';
7 11
 
8 12
 import { API_ID } from './constants';
@@ -55,12 +59,12 @@ function initCommands() {
55 59
         'display-name':
56 60
             APP.conference.changeLocalDisplayName.bind(APP.conference),
57 61
         'toggle-audio': () => {
58
-            sendAnalyticsEvent('api.toggle.audio');
62
+            sendAnalyticsEvent(API_TOGGLE_AUDIO);
59 63
             logger.log('Audio toggle: API command received');
60 64
             APP.conference.toggleAudioMuted(false /* no UI */);
61 65
         },
62 66
         'toggle-video': () => {
63
-            sendAnalyticsEvent('api.toggle.video');
67
+            sendAnalyticsEvent(API_TOGGLE_VIDEO);
64 68
             logger.log('Video toggle: API command received');
65 69
             APP.conference.toggleVideoMuted(false /* no UI */);
66 70
         },

+ 11
- 7
modules/UI/recording/Recording.js 查看文件

@@ -24,6 +24,10 @@ import {
24 24
     JitsiRecordingStatus
25 25
 } from '../../../react/features/base/lib-jitsi-meet';
26 26
 import {
27
+    RECORDING_CANCELED,
28
+    RECORDING_CLICKED,
29
+    RECORDING_STARTED,
30
+    RECORDING_STOPPED,
27 31
     sendAnalyticsEvent
28 32
 } from '../../../react/features/analytics';
29 33
 import { setToolboxEnabled } from '../../../react/features/toolbox';
@@ -467,7 +471,7 @@ const Recording = {
467 471
             return;
468 472
         }
469 473
 
470
-        sendAnalyticsEvent('recording.clicked');
474
+        sendAnalyticsEvent(RECORDING_CLICKED);
471 475
         switch (this.currentState) {
472 476
         case JitsiRecordingStatus.ON:
473 477
         case JitsiRecordingStatus.RETRYING:
@@ -475,7 +479,7 @@ const Recording = {
475 479
             _showStopRecordingPrompt(this.recordingType).then(
476 480
                 () => {
477 481
                     this.eventEmitter.emit(UIEvents.RECORDING_TOGGLED);
478
-                    sendAnalyticsEvent('recording.stopped');
482
+                    sendAnalyticsEvent(RECORDING_STOPPED);
479 483
                 },
480 484
                 () => {}); // eslint-disable-line no-empty-function
481 485
             break;
@@ -488,11 +492,11 @@ const Recording = {
488 492
                     this.eventEmitter.emit(
489 493
                         UIEvents.RECORDING_TOGGLED,
490 494
                         { streamId });
491
-                    sendAnalyticsEvent('recording.started');
495
+                    sendAnalyticsEvent(RECORDING_STARTED);
492 496
                 })
493 497
                 .catch(reason => {
494 498
                     if (reason === APP.UI.messageHandler.CANCEL) {
495
-                        sendAnalyticsEvent('recording.canceled');
499
+                        sendAnalyticsEvent(RECORDING_CANCELED);
496 500
                     } else {
497 501
                         logger.error(reason);
498 502
                     }
@@ -502,7 +506,7 @@ const Recording = {
502 506
                     this.eventEmitter.emit(
503 507
                         UIEvents.RECORDING_TOGGLED,
504 508
                         { token: this.predefinedToken });
505
-                    sendAnalyticsEvent('recording.started');
509
+                    sendAnalyticsEvent(RECORDING_STARTED);
506 510
 
507 511
                     return;
508 512
                 }
@@ -511,11 +515,11 @@ const Recording = {
511 515
                     this.eventEmitter.emit(
512 516
                         UIEvents.RECORDING_TOGGLED,
513 517
                         { token });
514
-                    sendAnalyticsEvent('recording.started');
518
+                    sendAnalyticsEvent(RECORDING_STARTED);
515 519
                 })
516 520
                 .catch(reason => {
517 521
                     if (reason === APP.UI.messageHandler.CANCEL) {
518
-                        sendAnalyticsEvent('recording.canceled');
522
+                        sendAnalyticsEvent(RECORDING_CANCELED);
519 523
                     } else {
520 524
                         logger.error(reason);
521 525
                     }

+ 19
- 9
modules/UI/shared_video/SharedVideo.js 查看文件

@@ -10,7 +10,17 @@ import VideoLayout from '../videolayout/VideoLayout';
10 10
 import LargeContainer from '../videolayout/LargeContainer';
11 11
 import Filmstrip from '../videolayout/Filmstrip';
12 12
 
13
-import { sendAnalyticsEvent } from '../../../react/features/analytics';
13
+import {
14
+    SHARED_VIDEO_ALREADY_SHARED,
15
+    SHARED_VIDEO_AUDIO_MUTED,
16
+    SHARED_VIDEO_AUDIO_UNMUTED,
17
+    SHARED_VIDEO_CANCELED,
18
+    SHARED_VIDEO_PAUSED,
19
+    SHARED_VIDEO_STARTED,
20
+    SHARED_VIDEO_STOPPED,
21
+    SHARED_VIDEO_VOLUME_CHANGED,
22
+    sendAnalyticsEvent
23
+} from '../../../react/features/analytics';
14 24
 import {
15 25
     participantJoined,
16 26
     participantLeft
@@ -85,11 +95,11 @@ export default class SharedVideoManager {
85 95
                     url => {
86 96
                         this.emitter.emit(
87 97
                             UIEvents.UPDATE_SHARED_VIDEO, url, 'start');
88
-                        sendAnalyticsEvent('sharedvideo.started');
98
+                        sendAnalyticsEvent(SHARED_VIDEO_STARTED);
89 99
                     },
90 100
                     err => {
91 101
                         logger.log('SHARED VIDEO CANCELED', err);
92
-                        sendAnalyticsEvent('sharedvideo.canceled');
102
+                        sendAnalyticsEvent(SHARED_VIDEO_CANCELED);
93 103
                     }
94 104
             );
95 105
 
@@ -109,7 +119,7 @@ export default class SharedVideoManager {
109 119
                     }
110 120
                     this.emitter.emit(
111 121
                         UIEvents.UPDATE_SHARED_VIDEO, this.url, 'stop');
112
-                    sendAnalyticsEvent('sharedvideo.stoped');
122
+                    sendAnalyticsEvent(SHARED_VIDEO_STOPPED);
113 123
                 },
114 124
                 () => {}); // eslint-disable-line no-empty-function
115 125
         } else {
@@ -117,7 +127,7 @@ export default class SharedVideoManager {
117 127
                 descriptionKey: 'dialog.alreadySharedVideoMsg',
118 128
                 titleKey: 'dialog.alreadySharedVideoTitle'
119 129
             });
120
-            sendAnalyticsEvent('sharedvideo.alreadyshared');
130
+            sendAnalyticsEvent(SHARED_VIDEO_ALREADY_SHARED);
121 131
         }
122 132
     }
123 133
 
@@ -226,7 +236,7 @@ export default class SharedVideoManager {
226 236
                 // eslint-disable-next-line eqeqeq
227 237
             } else if (event.data == YT.PlayerState.PAUSED) {
228 238
                 self.smartAudioUnmute();
229
-                sendAnalyticsEvent('sharedvideo.paused');
239
+                sendAnalyticsEvent(SHARED_VIDEO_PAUSED);
230 240
             }
231 241
             // eslint-disable-next-line eqeqeq
232 242
             self.fireSharedVideoEvent(event.data == YT.PlayerState.PAUSED);
@@ -258,7 +268,7 @@ export default class SharedVideoManager {
258 268
             } else if (event.data.volume <= 0 || event.data.muted) {
259 269
                 self.smartAudioUnmute();
260 270
             }
261
-            sendAnalyticsEvent('sharedvideo.volumechanged');
271
+            sendAnalyticsEvent(SHARED_VIDEO_VOLUME_CHANGED);
262 272
         };
263 273
 
264 274
         window.onPlayerReady = function(event) {
@@ -564,7 +574,7 @@ export default class SharedVideoManager {
564 574
         if (APP.conference.isLocalAudioMuted()
565 575
             && !this.mutedWithUserInteraction
566 576
             && !this.isSharedVideoVolumeOn()) {
567
-            sendAnalyticsEvent('sharedvideo.audio.unmuted');
577
+            sendAnalyticsEvent(SHARED_VIDEO_AUDIO_UNMUTED);
568 578
             logger.log('Shared video: audio unmuted');
569 579
             this.emitter.emit(UIEvents.AUDIO_MUTED, false, false);
570 580
             this.showMicMutedPopup(false);
@@ -578,7 +588,7 @@ export default class SharedVideoManager {
578 588
     smartAudioMute() {
579 589
         if (!APP.conference.isLocalAudioMuted()
580 590
             && this.isSharedVideoVolumeOn()) {
581
-            sendAnalyticsEvent('sharedvideo.audio.muted');
591
+            sendAnalyticsEvent(SHARED_VIDEO_AUDIO_MUTED);
582 592
             logger.log('Shared video: audio muted');
583 593
             this.emitter.emit(UIEvents.AUDIO_MUTED, true, false);
584 594
             this.showMicMutedPopup(true);

+ 7
- 3
modules/UI/side_pannels/profile/Profile.js 查看文件

@@ -3,7 +3,11 @@ import UIUtil from '../../util/UIUtil';
3 3
 import UIEvents from '../../../../service/UI/UIEvents';
4 4
 import Settings from '../../../settings/Settings';
5 5
 
6
-import { sendAnalyticsEvent } from '../../../../react/features/analytics';
6
+import {
7
+    AUTHENTICATE_LOGIN_CLICKED,
8
+    AUTHENTICATE_LOGOUT_CLICKED,
9
+    sendAnalyticsEvent
10
+} from '../../../../react/features/analytics';
7 11
 
8 12
 const sidePanelsContainerId = 'sideToolbarContainer';
9 13
 const htmlStr = `
@@ -91,7 +95,7 @@ export default {
91 95
          *
92 96
          */
93 97
         function loginClicked() {
94
-            sendAnalyticsEvent('authenticate.login.clicked');
98
+            sendAnalyticsEvent(AUTHENTICATE_LOGIN_CLICKED);
95 99
             emitter.emit(UIEvents.AUTH_CLICKED);
96 100
         }
97 101
 
@@ -104,7 +108,7 @@ export default {
104 108
             const titleKey = 'dialog.logoutTitle';
105 109
             const msgKey = 'dialog.logoutQuestion';
106 110
 
107
-            sendAnalyticsEvent('authenticate.logout.clicked');
111
+            sendAnalyticsEvent(AUTHENTICATE_LOGOUT_CLICKED);
108 112
 
109 113
             // Ask for confirmation
110 114
             APP.UI.messageHandler.openTwoButtonDialog({

+ 5
- 2
modules/UI/videolayout/Filmstrip.js 查看文件

@@ -5,7 +5,10 @@ import { setFilmstripVisibility } from '../../../react/features/filmstrip';
5 5
 import UIEvents from '../../../service/UI/UIEvents';
6 6
 import UIUtil from '../util/UIUtil';
7 7
 
8
-import { sendAnalyticsEvent } from '../../../react/features/analytics';
8
+import {
9
+    TOOLBAR_FILMSTRIP_TOGGLED,
10
+    sendAnalyticsEvent
11
+} from '../../../react/features/analytics';
9 12
 
10 13
 const Filmstrip = {
11 14
     /**
@@ -150,7 +153,7 @@ const Filmstrip = {
150 153
             return;
151 154
         }
152 155
         if (sendAnalytics) {
153
-            sendAnalyticsEvent('toolbar.filmstrip.toggled');
156
+            sendAnalyticsEvent(TOOLBAR_FILMSTRIP_TOGGLED);
154 157
         }
155 158
         this.filmstrip.toggleClass('hidden');
156 159
 

+ 11
- 5
modules/keyboardshortcut/keyboardshortcut.js 查看文件

@@ -1,7 +1,13 @@
1 1
 /* global APP, $, interfaceConfig */
2 2
 
3 3
 import { toggleDialog } from '../../react/features/base/dialog';
4
-import { sendAnalyticsEvent } from '../../react/features/analytics';
4
+import {
5
+    SHORTCUT_HELP,
6
+    SHORTCUT_SPEAKER_STATS_CLICKED,
7
+    SHORTCUT_TALK_CLICKED,
8
+    SHORTCUT_TALK_RELEASED,
9
+    sendAnalyticsEvent
10
+} from '../../react/features/analytics';
5 11
 import { KeyboardShortcutsDialog }
6 12
     from '../../react/features/keyboard-shortcuts';
7 13
 import { SpeakerStats } from '../../react/features/speaker-stats';
@@ -66,7 +72,7 @@ const KeyboardShortcut = {
66 72
                 || $(':focus').is('textarea'))) {
67 73
                 if (this._getKeyboardKey(e).toUpperCase() === ' ') {
68 74
                     if (APP.conference.isLocalAudioMuted()) {
69
-                        sendAnalyticsEvent('shortcut.talk.released');
75
+                        sendAnalyticsEvent(SHORTCUT_TALK_RELEASED);
70 76
                         logger.log('Talk shortcut released');
71 77
                         APP.conference.muteAudio(false);
72 78
                     }
@@ -169,7 +175,7 @@ const KeyboardShortcut = {
169 175
      */
170 176
     _initGlobalShortcuts() {
171 177
         this.registerShortcut('?', null, () => {
172
-            sendAnalyticsEvent('shortcut.shortcut.help');
178
+            sendAnalyticsEvent(SHORTCUT_HELP);
173 179
             APP.store.dispatch(toggleDialog(KeyboardShortcutsDialog, {
174 180
                 shortcutDescriptions: _shortcutsHelp
175 181
             }));
@@ -178,7 +184,7 @@ const KeyboardShortcut = {
178 184
         // register SPACE shortcut in two steps to insure visibility of help
179 185
         // message
180 186
         this.registerShortcut(' ', null, () => {
181
-            sendAnalyticsEvent('shortcut.talk.clicked');
187
+            sendAnalyticsEvent(SHORTCUT_TALK_CLICKED);
182 188
             logger.log('Talk shortcut pressed');
183 189
             APP.conference.muteAudio(true);
184 190
         });
@@ -186,7 +192,7 @@ const KeyboardShortcut = {
186 192
 
187 193
         if (!interfaceConfig.filmStripOnly) {
188 194
             this.registerShortcut('T', null, () => {
189
-                sendAnalyticsEvent('shortcut.speakerStats.clicked');
195
+                sendAnalyticsEvent(SHORTCUT_SPEAKER_STATS_CLICKED);
190 196
                 APP.store.dispatch(toggleDialog(SpeakerStats, {
191 197
                     conference: APP.conference
192 198
                 }));

+ 663
- 0
react/features/analytics/AnalyticsEvents.js 查看文件

@@ -0,0 +1,663 @@
1
+/**
2
+ * The target of a pin or unpin event was the local participant.
3
+ *
4
+ * Known full event names:
5
+ * pinned.local
6
+ * unpinned.local
7
+ *
8
+ * @type {String}
9
+ */
10
+export const _LOCAL = 'local';
11
+
12
+/**
13
+ * The target of a pin or unpin event was a remote participant.
14
+ *
15
+ * Known full event names:
16
+ * pinned.remote
17
+ * unpinned.remote
18
+ *
19
+ * @type {String}
20
+ */
21
+export const _REMOTE = 'remote';
22
+
23
+/**
24
+ * Audio mute toggled was triggered through the jitsi-meet api.
25
+ *
26
+ * @type {String}
27
+ */
28
+export const API_TOGGLE_AUDIO = 'api.toggle.audio';
29
+
30
+/**
31
+ * Video mute toggling was triggered through the jitsi-meet api.
32
+ *
33
+ * @type {String}
34
+ */
35
+export const API_TOGGLE_VIDEO = 'api.toggle.video';
36
+
37
+/**
38
+ * Audio only mode has been turned off.
39
+ *
40
+ * @type {String}
41
+ */
42
+export const AUDIO_ONLY_DISABLED = 'audioonly.disabled';
43
+
44
+/**
45
+ * The login button in the profile pane was clicked.
46
+ *
47
+ * @type {String}
48
+ */
49
+export const AUTHENTICATE_LOGIN_CLICKED = 'authenticate.login.clicked';
50
+
51
+/**
52
+ * The logout button in the profile pane was clicked.
53
+ *
54
+ * @type {String}
55
+ */
56
+export const AUTHENTICATE_LOGOUT_CLICKED = 'authenticate.logout.clicked';
57
+
58
+/**
59
+ * Performing a mute or unmute event based on a callkit setMuted event.
60
+ *
61
+ * Known full event names:
62
+ * callkit.audio.muted
63
+ * callkit.audio.unmuted
64
+ *
65
+ * @type {String}
66
+ */
67
+export const CALLKIT_AUDIO_ = 'callkit.audio';
68
+
69
+/**
70
+ * Toggling remote and local video display when entering or exiting backgrounded
71
+ * app state.
72
+ *
73
+ * @type {String}
74
+ */
75
+export const CALLKIT_BACKGROUND_VIDEO_MUTED = 'callkit.background.video.muted';
76
+
77
+/**
78
+ * The local participant joined audio muted.
79
+ *
80
+ * @type {String}
81
+ */
82
+export const CONFERENCE_AUDIO_INITIALLY_MUTED
83
+    = 'conference.audio.initiallyMuted';
84
+
85
+/**
86
+ * The local participant has started desktop sharing.
87
+ *
88
+ * @type {String}
89
+ */
90
+export const CONFERENCE_SHARING_DESKTOP_START
91
+    = 'conference.sharingDesktop.start';
92
+
93
+/**
94
+ * The local participant was desktop sharing but has stopped.
95
+ *
96
+ * @type {String}
97
+ */
98
+export const CONFERENCE_SHARING_DESKTOP_STOP
99
+    = 'conference.sharingDesktop.stop';
100
+
101
+/**
102
+ * The local participant joined video muted.
103
+ *
104
+ * @type {String}
105
+ */
106
+export const CONFERENCE_VIDEO_INITIALLY_MUTED
107
+    = 'conference.video.initiallyMuted';
108
+
109
+/**
110
+ * The list of known input/output devices was changed and new audio input has
111
+ * been used and should start as muted.
112
+ *
113
+ * @type {String}
114
+ */
115
+export const DEVICE_LIST_CHANGED_AUDIO_MUTED = 'deviceListChanged.audio.muted';
116
+
117
+/**
118
+ * The list of known devices was changed and new video input has been used
119
+ * and should start as muted.
120
+ *
121
+ * @type {String}
122
+ */
123
+export const DEVICE_LIST_CHANGED_VIDEO_MUTED = 'deviceListChanged.video.muted';
124
+
125
+/**
126
+ * The feedback dialog is displayed.
127
+ *
128
+ * @type {String}
129
+ */
130
+export const FEEDBACK_OPEN = 'feedback.open';
131
+
132
+/**
133
+ * Page reload overlay has been displayed.
134
+ *
135
+ * Properties: label: reason for reload
136
+ *
137
+ * @type {String}
138
+ */
139
+export const PAGE_RELOAD = 'page.reload';
140
+
141
+/**
142
+ * The local participant has pinned a participant to remain on large video.
143
+ *
144
+ * Known full event names:
145
+ * pinned.local
146
+ * pinned.remote
147
+ *
148
+ * @type {String}
149
+ */
150
+export const PINNED_ = 'pinned';
151
+
152
+/**
153
+ * Recording start was attempted but the local user canceled the request.
154
+ *
155
+ * @type {String}
156
+ */
157
+export const RECORDING_CANCELED = 'recording.canceled';
158
+
159
+/**
160
+ * Recording button has been clicked.
161
+ *
162
+ * @type {String}
163
+ */
164
+export const RECORDING_CLICKED = 'recording.clicked';
165
+
166
+/**
167
+ * Recording has been started.
168
+ *
169
+ * @type {String}
170
+ */
171
+export const RECORDING_STARTED = 'recording.started';
172
+
173
+/**
174
+ * Recording has been stopped by clicking the recording button.
175
+ *
176
+ * @type {String}
177
+ */
178
+export const RECORDING_STOPPED = 'recording.stopped';
179
+
180
+/**
181
+ * Clicked on the button to kick a remote participant from the conference.
182
+ *
183
+ * Properties: value: 1, label: participantID
184
+ *
185
+ * @type {String}
186
+ */
187
+export const REMOTE_VIDEO_MENU_KICK = 'remotevideomenu.kick';
188
+
189
+/**
190
+ * Clicked on the button to audio mute a remote participant.
191
+ *
192
+ * Properties: value: 1, label: participantID
193
+ *
194
+ * @type {String}
195
+ */
196
+export const REMOTE_VIDEO_MENU_MUTE_CLICKED = 'remotevideomenu.mute.clicked';
197
+
198
+/**
199
+ * Confirmed the muting of a remote participant.
200
+ *
201
+ * Properties: value: 1, label: participantID
202
+ *
203
+ * @type {String}
204
+ */
205
+export const REMOTE_VIDEO_MENU_MUTE_CONFIRMED
206
+    = 'remotevideomenu.mute.confirmed';
207
+
208
+/**
209
+ * Clicked on the remote control option in the remote menu.
210
+ *
211
+ * Properties: value: 1, label: participantID
212
+ *
213
+ * Known full event names:
214
+ * remotevideomenu.remotecontrol.stop
215
+ * remotevideomenu.remotecontrol.start
216
+ *
217
+ * @type {String}
218
+ */
219
+export const REMOTE_VIDEO_MENU_REMOTE_CONTROL_
220
+    = 'remotevideomenu.remotecontrol';
221
+
222
+/**
223
+ * Replacing the currently used track of specified type with a new track of the
224
+ * same type. The event is fired when changing devices.
225
+ *
226
+ * Known full event names:
227
+ * replacetrack.audio
228
+ * replacetrack.video
229
+ *
230
+ * @type {String}
231
+ */
232
+export const REPLACE_TRACK_ = 'replacetrack';
233
+
234
+/**
235
+ * The local participant failed to start receiving high quality video from
236
+ * a remote participant, which is usually initiated by the remote participant
237
+ * being put on large video.
238
+ *
239
+ * @type {String}
240
+ */
241
+export const SELECT_PARTICIPANT_FAILED = 'selectParticipant.failed';
242
+
243
+/**
244
+ * The local participant began using a different audio input device (mic).
245
+ *
246
+ * @type {String}
247
+ */
248
+export const SETTINGS_CHANGE_DEVICE_AUDIO_IN = 'settings.changeDevice.audioIn';
249
+
250
+/**
251
+ * The local participant began using a different audio output device (speaker).
252
+ *
253
+ * @type {String}
254
+ */
255
+export const SETTINGS_CHANGE_DEVICE_AUDIO_OUT
256
+    = 'settings.changeDevice.audioOut';
257
+
258
+/**
259
+ * The local participant began using a different camera.
260
+ *
261
+ * @type {String}
262
+ */
263
+export const SETTINGS_CHANGE_DEVICE_VIDEO = 'settings.changeDevice.video';
264
+
265
+/**
266
+ * Attempted to start sharing a YouTube video but one is already being shared.
267
+ *
268
+ * @type {String}
269
+ */
270
+export const SHARED_VIDEO_ALREADY_SHARED = 'sharedvideo.alreadyshared';
271
+
272
+/**
273
+ * The local participant's mic was muted automatically during a shared video.
274
+ *
275
+ * @type {String}
276
+ */
277
+export const SHARED_VIDEO_AUDIO_MUTED = 'sharedvideo.audio.muted';
278
+
279
+/**
280
+ * The local participant's mic was unmuted automatically during a shared video.
281
+ *
282
+ * @type {String}
283
+ */
284
+export const SHARED_VIDEO_AUDIO_UNMUTED = 'sharedvideo.audio.unmuted';
285
+
286
+/**
287
+ * Canceled the prompt to enter a YouTube video to share.
288
+ *
289
+ * @type {String}
290
+ */
291
+export const SHARED_VIDEO_CANCELED = 'sharedvideo.canceled';
292
+
293
+/**
294
+ * The shared YouTube video has been paused.
295
+ *
296
+ * @type {String}
297
+ */
298
+export const SHARED_VIDEO_PAUSED = 'sharedvideo.paused';
299
+
300
+/**
301
+ * Started sharing a YouTube video.
302
+ *
303
+ * @type {String}
304
+ */
305
+export const SHARED_VIDEO_STARTED = 'sharedvideo.started';
306
+
307
+/**
308
+ * Confirmed stoppage of the shared YouTube video.
309
+ *
310
+ * @type {String}
311
+ */
312
+export const SHARED_VIDEO_STOPPED = 'sharedvideo.stoped';
313
+
314
+/**
315
+ * The shared YouTube video had its volume change.
316
+ *
317
+ * @type {String}
318
+ */
319
+export const SHARED_VIDEO_VOLUME_CHANGED = 'sharedvideo.volumechanged';
320
+
321
+/**
322
+ * Pressed the keyboard shortcut for toggling audio mute.
323
+ *
324
+ * @type {String}
325
+ */
326
+export const SHORTCUT_AUDIO_MUTE_TOGGLED = 'shortcut.audiomute.toggled';
327
+
328
+/**
329
+ * Pressed the keyboard shortcut for toggling chat panel display.
330
+ *
331
+ * @type {String}
332
+ */
333
+export const SHORTCUT_CHAT_TOGGLED = 'shortcut.chat.toggled';
334
+
335
+/**
336
+ * Toggled the display of the keyboard shortcuts help dialog.
337
+ *
338
+ * @type {String}
339
+ */
340
+export const SHORTCUT_HELP = 'shortcut.shortcut.help';
341
+
342
+/**
343
+ * Pressed the keyboard shortcut for togglgin raise hand status.
344
+ *
345
+ * @type {String}
346
+ */
347
+export const SHORTCUT_RAISE_HAND_CLICKED = 'shortcut.raisehand.clicked';
348
+
349
+/**
350
+ * Pressed the keyboard shortcut for toggling screenshare.
351
+ *
352
+ * @type {String}
353
+ */
354
+export const SHORTCUT_SCREEN_TOGGLED = 'shortcut.screen.toggled';
355
+
356
+/**
357
+ * Toggled the display of the speaker stats dialog.
358
+ *
359
+ * @type {String}
360
+ */
361
+export const SHORTCUT_SPEAKER_STATS_CLICKED = 'shortcut.speakerStats.clicked';
362
+
363
+/**
364
+ * Started pressing the key that undoes audio mute while the key is pressed.
365
+ *
366
+ * @type {String}
367
+ */
368
+export const SHORTCUT_TALK_CLICKED = 'shortcut.talk.clicked';
369
+
370
+/**
371
+ * Released the key used to talk while audio muted, returning to the audio muted
372
+ * state.
373
+ *
374
+ * @type {String}
375
+ */
376
+export const SHORTCUT_TALK_RELEASED = 'shortcut.talk.released';
377
+
378
+/**
379
+ * Toggling video mute state using a keyboard shortcut.
380
+ *
381
+ * @type {String}
382
+ */
383
+export const SHORTCUT_VIDEO_MUTE_TOGGLED = 'shortcut.videomute.toggled';
384
+
385
+/**
386
+ * The config specifies the local participant should start with audio only mode
387
+ * enabled or disabled.
388
+ *
389
+ * Known full event names:
390
+ * startaudioonly.enabled
391
+ * startaudioonly.disabled
392
+ *
393
+ * @type {String}
394
+ */
395
+export const START_AUDIO_ONLY_ = 'startaudioonly';
396
+
397
+/**
398
+ * The config specifies the local participant should start with audio mute
399
+ * enabled or disabled.
400
+ *
401
+ * Known full event names:
402
+ * startmuted.client.audio.muted
403
+ * startmuted.client.audio.unmuted
404
+ *
405
+ * @type {String}
406
+ */
407
+export const START_MUTED_CLIENT_AUDIO_ = 'startmuted.client.audio';
408
+
409
+/**
410
+ * The config specifies the local participant should start with video mute
411
+ * enabled or disabled.
412
+ *
413
+ * Known full event names:
414
+ * startmuted.client.video.muted
415
+ * startmuted.client.video.unmuted
416
+ *
417
+ * @type {String}
418
+ */
419
+export const START_MUTED_CLIENT_VIDEO_ = 'startmuted.client.video';
420
+
421
+/**
422
+ * The local participant has received an event from the server stating to
423
+ * start audio muted or unmuted.
424
+ *
425
+ * Known full event names:
426
+ * startmuted.server.audio.muted
427
+ * startmuted.server.audio.unmuted
428
+ *
429
+ * @type {String}
430
+ */
431
+export const START_MUTED_SERVER_AUDIO_ = 'startmuted.server.audio';
432
+
433
+/**
434
+ * The local participant has received an event from the server stating to
435
+ * start video muted or unmuted.
436
+ *
437
+ * Known full event names:
438
+ * startmuted.server.video.muted
439
+ * startmuted.server.video.unmuted
440
+ *
441
+ * @type {String}
442
+ */
443
+export const START_MUTED_SERVER_VIDEO_ = 'startmuted.server.video';
444
+
445
+/**
446
+ * How long it took to switch between simulcast streams.
447
+ *
448
+ * Properties: value
449
+ *
450
+ * @type {String}
451
+ */
452
+export const STREAM_SWITCH_DELAY = 'stream.switch.delay';
453
+
454
+/**
455
+ * Automatically changing the mute state of a media track in order to match
456
+ * the current stored state in redux.
457
+ *
458
+ * Known full event names:
459
+ * synctrackstate.audio.muted
460
+ * synctrackstate.audio.unmuted
461
+ * synctrackstate.video.muted
462
+ * synctrackstate.video.unmuted
463
+ *
464
+ * @type {String}
465
+ */
466
+export const SYNC_TRACK_STATE_ = 'synctrackstate';
467
+
468
+/**
469
+ * Clicked the toolbar button to enter audio mute state.
470
+ *
471
+ * @type {String}
472
+ */
473
+export const TOOLBAR_AUDIO_MUTED = 'toolbar.audio.muted';
474
+
475
+/**
476
+ * Clicked within a toolbar menu to enable audio only.
477
+ *
478
+ * @type {String}
479
+ */
480
+export const TOOLBAR_AUDIO_ONLY_ENABLED = 'toolbar.audioonly.enabled';
481
+
482
+/**
483
+ * Clicked the toolbar button to exit audio mute state.
484
+ *
485
+ * @type {String}
486
+ */
487
+export const TOOLBAR_AUDIO_UNMUTED = 'toolbar.audio.unmuted';
488
+
489
+/**
490
+ * Clicked the toolbar button for toggling chat panel display.
491
+ *
492
+ * @type {String}
493
+ */
494
+export const TOOLBAR_CHAT_TOGGLED = 'toolbar.chat.toggled';
495
+
496
+/**
497
+ * Clicked the toolbar button for toggling contact list panel display.
498
+ *
499
+ * @type {String}
500
+ */
501
+export const TOOLBAR_CONTACTS_TOGGLED = 'toolbar.contacts.toggled';
502
+
503
+/**
504
+ * Clicked the toolbar button to toggle display of etherpad (collaborative
505
+ * document writing).
506
+ *
507
+ * @type {String}
508
+ */
509
+export const TOOLBAR_ETHERPACK_CLICKED = 'toolbar.etherpad.clicked';
510
+
511
+/**
512
+ * Pressed the keyboard shortcut to open the device selection window while in
513
+ * filmstrip only mode.
514
+ *
515
+ * @type {String}
516
+ */
517
+export const TOOLBAR_FILMSTRIP_ONLY_DEVICE_SELECTION_TOGGLED
518
+    = 'toolbar.fodeviceselection.toggled';
519
+
520
+/**
521
+ * Visibility of the filmstrip has been toggled.
522
+ *
523
+ * @type {String}
524
+ */
525
+export const TOOLBAR_FILMSTRIP_TOGGLED = 'toolbar.filmstrip.toggled';
526
+
527
+/**
528
+ * Clicked the toolbar button to toggle display full screen mode.
529
+ *
530
+ * @type {String}
531
+ */
532
+export const TOOLBAR_FULLSCREEN_ENABLED = 'toolbar.fullscreen.enabled';
533
+
534
+/**
535
+ * Clicked the toolbar button to leave the conference.
536
+ *
537
+ * @type {String}
538
+ */
539
+export const TOOLBAR_HANGUP = 'toolbar.hangup';
540
+
541
+/**
542
+ * Clicked the toolbar button to open the invite dialog.
543
+ *
544
+ * @type {String}
545
+ */
546
+export const TOOLBAR_INVITE_CLICKED = 'toolbar.invite.clicked';
547
+
548
+/**
549
+ * The invite dialog has been dismissed.
550
+ *
551
+ * @type {String}
552
+ */
553
+export const TOOLBAR_INVITE_CLOSE = 'toolbar.invite.close';
554
+
555
+/**
556
+ * Clicked the toolbar button for toggling the display of the profile panel.
557
+ *
558
+ * @type {String}
559
+ */
560
+export const TOOLBAR_PROFILE_TOGGLED = 'toolbar.profile.toggled';
561
+
562
+/**
563
+ * Clicked the toolbar button for toggling raise hand status.
564
+ *
565
+ * @type {String}
566
+ */
567
+export const TOOLBAR_RAISE_HAND_CLICKED = 'toolbar.raiseHand.clicked';
568
+
569
+/**
570
+ * Clicked the toolbar button to stop screensharing.
571
+ *
572
+ * @type {String}
573
+ */
574
+export const TOOLBAR_SCREEN_DISABLED = 'toolbar.screen.disabled';
575
+
576
+/**
577
+ * Clicked the toolbar button to start screensharing.
578
+ *
579
+ * @type {String}
580
+ */
581
+export const TOOLBAR_SCREEN_ENABLED = 'toolbar.screen.enabled';
582
+
583
+/**
584
+ * Clicked the toolbar button for toggling display of the settings menu.
585
+ *
586
+ * @type {String}
587
+ */
588
+export const TOOLBAR_SETTINGS_TOGGLED = 'toolbar.settings.toggled';
589
+
590
+/**
591
+ * Clicked the toolbar button for toggling a shared YouTube video.
592
+ *
593
+ * @type {String}
594
+ */
595
+export const TOOLBAR_SHARED_VIDEO_CLICKED = 'toolbar.sharedvideo.clicked';
596
+
597
+/**
598
+ * Clicked the toolbar button to open the dial-out feature.
599
+ *
600
+ * @type {String}
601
+ */
602
+export const TOOLBAR_SIP_DIALPAD_CLICKED = 'toolbar.sip.dialpad.clicked';
603
+
604
+/**
605
+ * In the mobile app, clicked on the toolbar button to toggle video mute.
606
+ *
607
+ * Known full event names:
608
+ * toolbar.video.muted
609
+ * toolbar.video.unmuted
610
+ *
611
+ * @type {String}
612
+ */
613
+export const TOOLBAR_VIDEO_ = 'toolbar.video';
614
+
615
+/**
616
+ * Clicked on the toolbar to video unmute.
617
+ *
618
+ * @type {String}
619
+ */
620
+export const TOOLBAR_VIDEO_DISABLED = 'toolbar.video.disabled';
621
+
622
+/**
623
+ * Clicked on the toolbar to video mute.
624
+ *
625
+ * @type {String}
626
+ */
627
+export const TOOLBAR_VIDEO_ENABLED = 'toolbar.video.enabled';
628
+
629
+/**
630
+ * Clicked within a toolbar menu to set max incoming video quality to high
631
+ * definition.
632
+ *
633
+ * @type {String}
634
+ */
635
+export const TOOLBAR_VIDEO_QUALITY_HIGH = 'toolbar.videoquality.high';
636
+
637
+/**
638
+ * Clicked within a toolbar menu to set max incoming video quality to low
639
+ * definition.
640
+ *
641
+ * @type {String}
642
+ */
643
+export const TOOLBAR_VIDEO_QUALITY_LOW = 'toolbar.videoquality.low';
644
+
645
+/**
646
+ * Clicked within a toolbar menu to set max incoming video quality to standard
647
+ * definition.
648
+ *
649
+ * @type {String}
650
+ */
651
+export const TOOLBAR_VIDEO_QUALITY_STANDARD = 'toolbar.videoquality.standard';
652
+
653
+/**
654
+ * The local participant has unpinned a participant so the participant doesn't
655
+ * remain permanently on local large video.
656
+ *
657
+ * Known full event names:
658
+ * unpinned.local
659
+ * unpinned.remote
660
+ *
661
+ * @type {String}
662
+ */
663
+export const UNPINNED_ = 'unpinned';

+ 1
- 0
react/features/analytics/index.js 查看文件

@@ -1,3 +1,4 @@
1
+export * from './AnalyticsEvents';
1 2
 export * from './functions';
2 3
 
3 4
 import './middleware';

+ 9
- 3
react/features/base/conference/actions.js 查看文件

@@ -2,7 +2,11 @@
2 2
 
3 3
 import UIEvents from '../../../../service/UI/UIEvents';
4 4
 
5
-import { sendAnalyticsEvent } from '../../analytics';
5
+import {
6
+    START_MUTED_SERVER_AUDIO_,
7
+    START_MUTED_SERVER_VIDEO_,
8
+    sendAnalyticsEvent
9
+} from '../../analytics';
6 10
 import { getName } from '../../app';
7 11
 import { JitsiConferenceEvents } from '../lib-jitsi-meet';
8 12
 import { setAudioMuted, setVideoMuted } from '../media';
@@ -85,9 +89,11 @@ function _addConferenceListeners(conference, dispatch) {
85 89
             const videoMuted = Boolean(conference.startVideoMuted);
86 90
 
87 91
             sendAnalyticsEvent(
88
-                `startmuted.server.audio.${audioMuted ? 'muted' : 'unmuted'}`);
92
+                `${START_MUTED_SERVER_AUDIO_}.${
93
+                    audioMuted ? 'muted' : 'unmuted'}`);
89 94
             sendAnalyticsEvent(
90
-                `startmuted.server.video.${videoMuted ? 'muted' : 'unmuted'}`);
95
+                `${START_MUTED_SERVER_VIDEO_}.${
96
+                    videoMuted ? 'muted' : 'unmuted'}`);
91 97
             logger.log(`Start muted: ${audioMuted ? 'audio, ' : ''}${
92 98
                 videoMuted ? 'video' : ''}`);
93 99
 

+ 12
- 5
react/features/base/conference/middleware.js 查看文件

@@ -2,7 +2,14 @@
2 2
 
3 3
 import UIEvents from '../../../../service/UI/UIEvents';
4 4
 
5
-import { sendAnalyticsEvent } from '../../analytics';
5
+import {
6
+    _LOCAL,
7
+    _REMOTE,
8
+    AUDIO_ONLY_DISABLED,
9
+    PINNED_,
10
+    UNPINNED_,
11
+    sendAnalyticsEvent
12
+} from '../../analytics';
6 13
 import { CONNECTION_ESTABLISHED } from '../connection';
7 14
 import { setVideoMuted, VIDEO_MUTISM_AUTHORITY } from '../media';
8 15
 import {
@@ -124,7 +131,7 @@ function _conferenceFailedOrLeft({ dispatch, getState }, next, action) {
124 131
     const result = next(action);
125 132
 
126 133
     if (getState()['features/base/conference'].audioOnly) {
127
-        sendAnalyticsEvent('audioonly.disabled');
134
+        sendAnalyticsEvent(AUDIO_ONLY_DISABLED);
128 135
         logger.log('Audio only disabled');
129 136
         dispatch(setAudioOnly(false));
130 137
     }
@@ -186,14 +193,14 @@ function _pinParticipant(store, next, action) {
186 193
 
187 194
     if (typeof APP !== 'undefined') {
188 195
         const pinnedParticipant = getPinnedParticipant(participants);
189
-        const actionName = action.participant.id ? 'pinned' : 'unpinned';
196
+        const actionName = action.participant.id ? PINNED_ : UNPINNED_;
190 197
         let videoType;
191 198
 
192 199
         if ((participantById && participantById.local)
193 200
                 || (!id && pinnedParticipant && pinnedParticipant.local)) {
194
-            videoType = 'local';
201
+            videoType = _LOCAL;
195 202
         } else {
196
-            videoType = 'remote';
203
+            videoType = _REMOTE;
197 204
         }
198 205
 
199 206
         sendAnalyticsEvent(

+ 12
- 5
react/features/base/media/middleware.js 查看文件

@@ -1,6 +1,12 @@
1 1
 /* @flow */
2 2
 
3
-import { sendAnalyticsEvent } from '../../analytics';
3
+import {
4
+    START_AUDIO_ONLY_,
5
+    START_MUTED_CLIENT_AUDIO_,
6
+    START_MUTED_CLIENT_VIDEO_,
7
+    SYNC_TRACK_STATE_,
8
+    sendAnalyticsEvent
9
+} from '../../analytics';
4 10
 import { SET_ROOM, setAudioOnly } from '../conference';
5 11
 import { parseURLParams } from '../config';
6 12
 import JitsiMeetJS from '../lib-jitsi-meet';
@@ -87,9 +93,9 @@ function _setRoom({ dispatch, getState }, next, action) {
87 93
     // Apply the config.
88 94
 
89 95
     sendAnalyticsEvent(
90
-        `startmuted.client.audio.${audioMuted ? 'muted' : 'unmuted'}`);
96
+        `${START_MUTED_CLIENT_AUDIO_}.${audioMuted ? 'muted' : 'unmuted'}`);
91 97
     sendAnalyticsEvent(
92
-        `startmuted.client.video.${videoMuted ? 'muted' : 'unmuted'}`);
98
+        `${START_MUTED_CLIENT_VIDEO_}.${videoMuted ? 'muted' : 'unmuted'}`);
93 99
 
94 100
     logger.log(`Start muted: ${audioMuted ? 'audio, ' : ''}${
95 101
         videoMuted ? 'video' : ''}`);
@@ -123,7 +129,7 @@ function _setRoom({ dispatch, getState }, next, action) {
123 129
         }
124 130
 
125 131
         sendAnalyticsEvent(
126
-            `startaudioonly.${audioOnly ? 'enabled' : 'disabled'}`);
132
+            `${START_AUDIO_ONLY_}.${audioOnly ? 'enabled' : 'disabled'}`);
127 133
         logger.log(`Start audio only set to ${audioOnly.toString()}`);
128 134
         dispatch(setAudioOnly(audioOnly));
129 135
     }
@@ -150,7 +156,8 @@ function _syncTrackMutedState({ getState }, track) {
150 156
     // fired before track gets to state.
151 157
     if (track.muted !== muted) {
152 158
         sendAnalyticsEvent(
153
-            `synctrackstate.${track.mediaType}.${muted ? 'muted' : 'unmuted'}`);
159
+            `${SYNC_TRACK_STATE_}.${track.mediaType}.${
160
+                muted ? 'muted' : 'unmuted'}`);
154 161
         logger.log(`Sync ${track.mediaType} track muted state to ${
155 162
             muted ? 'muted' : 'unmuted'}`);
156 163
         track.muted = muted;

+ 5
- 2
react/features/base/tracks/actions.js 查看文件

@@ -1,4 +1,7 @@
1
-import { sendAnalyticsEvent } from '../../analytics';
1
+import {
2
+    REPLACE_TRACK_,
3
+    sendAnalyticsEvent
4
+} from '../../analytics';
2 5
 import { JitsiTrackErrors, JitsiTrackEvents } from '../lib-jitsi-meet';
3 6
 import {
4 7
     CAMERA_FACING_MODE,
@@ -217,7 +220,7 @@ export function replaceLocalTrack(oldTrack, newTrack, conference) {
217 220
                                     : setAudioMuted;
218 221
                             const isMuted = newTrack.isMuted();
219 222
 
220
-                            sendAnalyticsEvent(`replacetrack.${
223
+                            sendAnalyticsEvent(`${REPLACE_TRACK_}.${
221 224
                                 newTrack.getType()}.${
222 225
                                 isMuted ? 'muted' : 'unmuted'}`);
223 226
                             logger.log(`Replace ${newTrack.getType()} track - ${

+ 5
- 2
react/features/feedback/components/FeedbackDialog.web.js 查看文件

@@ -6,7 +6,10 @@ import PropTypes from 'prop-types';
6 6
 import React, { Component } from 'react';
7 7
 import { connect } from 'react-redux';
8 8
 
9
-import { sendAnalyticsEvent } from '../../analytics';
9
+import {
10
+    FEEDBACK_OPEN,
11
+    sendAnalyticsEvent
12
+} from '../../analytics';
10 13
 import { Dialog } from '../../base/dialog';
11 14
 import { translate } from '../../base/i18n';
12 15
 
@@ -145,7 +148,7 @@ class FeedbackDialog extends Component {
145 148
      * @inheritdoc
146 149
      */
147 150
     componentDidMount() {
148
-        sendAnalyticsEvent('feedback.open');
151
+        sendAnalyticsEvent(FEEDBACK_OPEN);
149 152
     }
150 153
 
151 154
     /**

+ 5
- 2
react/features/invite/components/InviteDialog.web.js 查看文件

@@ -2,7 +2,10 @@ import PropTypes from 'prop-types';
2 2
 import React, { Component } from 'react';
3 3
 import { connect } from 'react-redux';
4 4
 
5
-import { sendAnalyticsEvent } from '../../analytics';
5
+import {
6
+    TOOLBAR_INVITE_CLOSE,
7
+    sendAnalyticsEvent
8
+} from '../../analytics';
6 9
 import { getInviteURL } from '../../base/connection';
7 10
 import { Dialog } from '../../base/dialog';
8 11
 import { translate } from '../../base/i18n';
@@ -51,7 +54,7 @@ class InviteDialog extends Component {
51 54
      * @inheritdoc
52 55
      */
53 56
     componentWillUnmount() {
54
-        sendAnalyticsEvent('toolbar.invite.close');
57
+        sendAnalyticsEvent(TOOLBAR_INVITE_CLOSE);
55 58
     }
56 59
 
57 60
     /**

+ 5
- 2
react/features/mobile/background/actions.js 查看文件

@@ -1,6 +1,9 @@
1 1
 /* @flow */
2 2
 
3
-import { sendAnalyticsEvent } from '../../analytics';
3
+import {
4
+    CALLKIT_BACKGROUND_VIDEO_MUTED,
5
+    sendAnalyticsEvent
6
+} from '../../analytics';
4 7
 import { setLastN } from '../../base/conference';
5 8
 import { setVideoMuted, VIDEO_MUTISM_AUTHORITY } from '../../base/media';
6 9
 
@@ -43,7 +46,7 @@ export function _setBackgroundVideoMuted(muted: boolean) {
43 46
 
44 47
         audioOnly || dispatch(setLastN(muted ? 0 : undefined));
45 48
 
46
-        sendAnalyticsEvent('callkit.background.video.muted');
49
+        sendAnalyticsEvent(CALLKIT_BACKGROUND_VIDEO_MUTED);
47 50
 
48 51
         dispatch(setVideoMuted(muted, VIDEO_MUTISM_AUTHORITY.BACKGROUND));
49 52
     };

+ 6
- 2
react/features/mobile/callkit/middleware.js 查看文件

@@ -3,7 +3,10 @@
3 3
 import { NativeModules } from 'react-native';
4 4
 import uuid from 'uuid';
5 5
 
6
-import { sendAnalyticsEvent } from '../../analytics';
6
+import {
7
+    CALLKIT_AUDIO_,
8
+    sendAnalyticsEvent
9
+} from '../../analytics';
7 10
 import { APP_WILL_MOUNT, APP_WILL_UNMOUNT, appNavigate } from '../../app';
8 11
 import {
9 12
     CONFERENCE_FAILED,
@@ -276,7 +279,8 @@ function _onPerformSetMutedCallAction({ callUUID, muted: newValue }) {
276 279
         if (oldValue !== newValue) {
277 280
             const value = Boolean(newValue);
278 281
 
279
-            sendAnalyticsEvent(`callkit.audio.${value ? 'muted' : 'unmuted'}`);
282
+            sendAnalyticsEvent(`${CALLKIT_AUDIO_}.${
283
+                value ? 'muted' : 'unmuted'}`);
280 284
             dispatch(setAudioMuted(value));
281 285
         }
282 286
     }

+ 2
- 1
react/features/overlay/components/AbstractPageReloadOverlay.js 查看文件

@@ -3,6 +3,7 @@
3 3
 import PropTypes from 'prop-types';
4 4
 import React, { Component } from 'react';
5 5
 
6
+import { PAGE_RELOAD } from '../../analytics';
6 7
 import {
7 8
     isFatalJitsiConferenceError,
8 9
     isFatalJitsiConnectionError
@@ -156,7 +157,7 @@ export default class AbstractPageReloadOverlay extends Component<*, *> {
156 157
         // sent to the backed.
157 158
         // FIXME: We should dispatch action for this.
158 159
         APP.conference.logEvent(
159
-            'page.reload',
160
+            PAGE_RELOAD,
160 161
             /* value */ undefined,
161 162
             /* label */ this.props.reason);
162 163
         logger.info(

+ 5
- 2
react/features/remote-video-menu/components/KickButton.js 查看文件

@@ -2,7 +2,10 @@ import PropTypes from 'prop-types';
2 2
 import React, { Component } from 'react';
3 3
 import { connect } from 'react-redux';
4 4
 
5
-import { sendAnalyticsEvent } from '../../analytics';
5
+import {
6
+    REMOTE_VIDEO_MENU_KICK,
7
+    sendAnalyticsEvent
8
+} from '../../analytics';
6 9
 import { translate } from '../../base/i18n';
7 10
 import { kickParticipant } from '../../base/participants';
8 11
 
@@ -84,7 +87,7 @@ class KickButton extends Component {
84 87
         const { dispatch, onClick, participantID } = this.props;
85 88
 
86 89
         sendAnalyticsEvent(
87
-            'remotevideomenu.kick',
90
+            REMOTE_VIDEO_MENU_KICK,
88 91
             {
89 92
                 value: 1,
90 93
                 label: participantID

+ 5
- 2
react/features/remote-video-menu/components/MuteButton.js 查看文件

@@ -2,7 +2,10 @@ import PropTypes from 'prop-types';
2 2
 import React, { Component } from 'react';
3 3
 import { connect } from 'react-redux';
4 4
 
5
-import { sendAnalyticsEvent } from '../../analytics';
5
+import {
6
+    REMOTE_VIDEO_MENU_MUTE_CLICKED,
7
+    sendAnalyticsEvent
8
+} from '../../analytics';
6 9
 import { translate } from '../../base/i18n';
7 10
 import { openDialog } from '../../base/dialog';
8 11
 
@@ -99,7 +102,7 @@ class MuteButton extends Component {
99 102
         const { dispatch, onClick, participantID } = this.props;
100 103
 
101 104
         sendAnalyticsEvent(
102
-            'remotevideomenu.mute.clicked',
105
+            REMOTE_VIDEO_MENU_MUTE_CLICKED,
103 106
             {
104 107
                 value: 1,
105 108
                 label: participantID

+ 5
- 2
react/features/remote-video-menu/components/MuteRemoteParticipantDialog.web.js 查看文件

@@ -5,7 +5,10 @@ import { connect } from 'react-redux';
5 5
 import { Dialog } from '../../base/dialog';
6 6
 import { translate } from '../../base/i18n';
7 7
 
8
-import { sendAnalyticsEvent } from '../../analytics';
8
+import {
9
+    REMOTE_VIDEO_MENU_MUTE_CONFIRMED,
10
+    sendAnalyticsEvent
11
+} from '../../analytics';
9 12
 import { muteRemoteParticipant } from '../../base/participants';
10 13
 
11 14
 /**
@@ -80,7 +83,7 @@ class MuteRemoteParticipantDialog extends Component {
80 83
         const { dispatch, participantID } = this.props;
81 84
 
82 85
         sendAnalyticsEvent(
83
-            'remotevideomenu.mute.confirmed',
86
+            REMOTE_VIDEO_MENU_MUTE_CONFIRMED,
84 87
             {
85 88
                 value: 1,
86 89
                 label: participantID

+ 5
- 2
react/features/remote-video-menu/components/RemoteControlButton.js 查看文件

@@ -1,7 +1,10 @@
1 1
 import PropTypes from 'prop-types';
2 2
 import React, { Component } from 'react';
3 3
 
4
-import { sendAnalyticsEvent } from '../../analytics';
4
+import {
5
+    REMOTE_VIDEO_MENU_REMOTE_CONTROL_,
6
+    sendAnalyticsEvent
7
+} from '../../analytics';
5 8
 import { translate } from '../../base/i18n';
6 9
 
7 10
 import RemoteVideoMenuButton from './RemoteVideoMenuButton';
@@ -131,7 +134,7 @@ class RemoteControlButton extends Component {
131 134
 
132 135
         if (eventName) {
133 136
             sendAnalyticsEvent(
134
-                `remotevideomenu.remotecontrol.${eventName}`,
137
+                `${REMOTE_VIDEO_MENU_REMOTE_CONTROL_}.${eventName}`,
135 138
                 {
136 139
                     value: 1,
137 140
                     label: participantID

+ 2
- 2
react/features/toolbox/components/ProfileButton.web.js 查看文件

@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
4 4
 import React, { Component } from 'react';
5 5
 import { connect } from 'react-redux';
6 6
 
7
-import { sendAnalyticsEvent } from '../../analytics';
7
+import { TOOLBAR_PROFILE_TOGGLED, sendAnalyticsEvent } from '../../analytics';
8 8
 import { DEFAULT_AVATAR_RELATIVE_PATH } from '../../base/participants';
9 9
 import UIEvents from '../../../../service/UI/UIEvents';
10 10
 
@@ -102,7 +102,7 @@ class ProfileButton extends Component<*> {
102 102
      */
103 103
     _onClick() {
104 104
         if (!this.props._unclickable) {
105
-            sendAnalyticsEvent('toolbar.profile.toggled');
105
+            sendAnalyticsEvent(TOOLBAR_PROFILE_TOGGLED);
106 106
             APP.UI.emitEvent(UIEvents.TOGGLE_PROFILE);
107 107
         }
108 108
     }

+ 8
- 3
react/features/toolbox/components/Toolbox.native.js 查看文件

@@ -3,7 +3,12 @@ import React, { Component } from 'react';
3 3
 import { View } from 'react-native';
4 4
 import { connect } from 'react-redux';
5 5
 
6
-import { sendAnalyticsEvent } from '../../analytics';
6
+import {
7
+    TOOLBAR_AUDIO_MUTED,
8
+    TOOLBAR_AUDIO_UNMUTED,
9
+    TOOLBAR_VIDEO_,
10
+    sendAnalyticsEvent
11
+} from '../../analytics';
7 12
 import {
8 13
     isNarrowAspectRatio,
9 14
     makeAspectRatioAware
@@ -183,7 +188,7 @@ class Toolbox extends Component {
183 188
     _onToggleAudio() {
184 189
         const mute = !this.props._audioMuted;
185 190
 
186
-        sendAnalyticsEvent(`toolbar.audio.${mute ? 'muted' : 'unmuted'}`);
191
+        sendAnalyticsEvent(mute ? TOOLBAR_AUDIO_MUTED : TOOLBAR_AUDIO_UNMUTED);
187 192
 
188 193
         // The user sees the reality i.e. the state of base/tracks and intends
189 194
         // to change reality by tapping on the respective button i.e. the user
@@ -206,7 +211,7 @@ class Toolbox extends Component {
206 211
     _onToggleVideo() {
207 212
         const mute = !this.props._videoMuted;
208 213
 
209
-        sendAnalyticsEvent(`toolbar.video.${mute ? 'muted' : 'unmuted'}`);
214
+        sendAnalyticsEvent(`${TOOLBAR_VIDEO_}.${mute ? 'muted' : 'unmuted'}`);
210 215
 
211 216
         // The user sees the reality i.e. the state of base/tracks and intends
212 217
         // to change reality by tapping on the respective button i.e. the user

+ 47
- 24
react/features/toolbox/defaultToolbarButtons.web.js 查看文件

@@ -2,7 +2,31 @@
2 2
 
3 3
 import React from 'react';
4 4
 
5
-import { sendAnalyticsEvent } from '../analytics';
5
+import {
6
+    SHORTCUT_AUDIO_MUTE_TOGGLED,
7
+    SHORTCUT_CHAT_TOGGLED,
8
+    SHORTCUT_RAISE_HAND_CLICKED,
9
+    SHORTCUT_SCREEN_TOGGLED,
10
+    SHORTCUT_VIDEO_MUTE_TOGGLED,
11
+    TOOLBAR_AUDIO_MUTED,
12
+    TOOLBAR_AUDIO_UNMUTED,
13
+    TOOLBAR_CHAT_TOGGLED,
14
+    TOOLBAR_CONTACTS_TOGGLED,
15
+    TOOLBAR_ETHERPACK_CLICKED,
16
+    TOOLBAR_FILMSTRIP_ONLY_DEVICE_SELECTION_TOGGLED,
17
+    TOOLBAR_FULLSCREEN_ENABLED,
18
+    TOOLBAR_HANGUP,
19
+    TOOLBAR_INVITE_CLICKED,
20
+    TOOLBAR_RAISE_HAND_CLICKED,
21
+    TOOLBAR_SCREEN_DISABLED,
22
+    TOOLBAR_SCREEN_ENABLED,
23
+    TOOLBAR_SETTINGS_TOGGLED,
24
+    TOOLBAR_SHARED_VIDEO_CLICKED,
25
+    TOOLBAR_SIP_DIALPAD_CLICKED,
26
+    TOOLBAR_VIDEO_DISABLED,
27
+    TOOLBAR_VIDEO_ENABLED,
28
+    sendAnalyticsEvent
29
+} from '../analytics';
6 30
 import { ParticipantCounter } from '../contact-list';
7 31
 import { openDeviceSelectionDialog } from '../device-selection';
8 32
 import { InfoDialogButton, openInviteDialog } from '../invite';
@@ -42,9 +66,9 @@ export default function getDefaultButtons() {
42 66
                 const newVideoMutedState = !APP.conference.isLocalVideoMuted();
43 67
 
44 68
                 if (newVideoMutedState) {
45
-                    sendAnalyticsEvent('toolbar.video.enabled');
69
+                    sendAnalyticsEvent(TOOLBAR_VIDEO_ENABLED);
46 70
                 } else {
47
-                    sendAnalyticsEvent('toolbar.video.disabled');
71
+                    sendAnalyticsEvent(TOOLBAR_VIDEO_DISABLED);
48 72
                 }
49 73
                 APP.UI.emitEvent(UIEvents.VIDEO_MUTED, newVideoMutedState);
50 74
             },
@@ -64,7 +88,7 @@ export default function getDefaultButtons() {
64 88
                     return;
65 89
                 }
66 90
 
67
-                sendAnalyticsEvent('shortcut.videomute.toggled');
91
+                sendAnalyticsEvent(SHORTCUT_VIDEO_MUTE_TOGGLED);
68 92
                 APP.conference.toggleVideoMuted();
69 93
             },
70 94
             shortcutDescription: 'keyboardShortcuts.videoMute',
@@ -81,13 +105,13 @@ export default function getDefaultButtons() {
81 105
                 <span id = 'unreadMessages' /></span>,
82 106
             id: 'toolbar_button_chat',
83 107
             onClick() {
84
-                sendAnalyticsEvent('toolbar.chat.toggled');
108
+                sendAnalyticsEvent(TOOLBAR_CHAT_TOGGLED);
85 109
                 APP.UI.emitEvent(UIEvents.TOGGLE_CHAT);
86 110
             },
87 111
             shortcut: 'C',
88 112
             shortcutAttr: 'toggleChatPopover',
89 113
             shortcutFunc() {
90
-                sendAnalyticsEvent('shortcut.chat.toggled');
114
+                sendAnalyticsEvent(SHORTCUT_CHAT_TOGGLED);
91 115
                 APP.UI.toggleChat();
92 116
             },
93 117
             shortcutDescription: 'keyboardShortcuts.toggleChat',
@@ -104,8 +128,7 @@ export default function getDefaultButtons() {
104 128
             enabled: true,
105 129
             id: 'toolbar_contact_list',
106 130
             onClick() {
107
-                sendAnalyticsEvent(
108
-                    'toolbar.contacts.toggled');
131
+                sendAnalyticsEvent(TOOLBAR_CONTACTS_TOGGLED);
109 132
                 APP.UI.emitEvent(UIEvents.TOGGLE_CONTACT_LIST);
110 133
             },
111 134
             sideContainerId: 'contacts_container',
@@ -121,9 +144,9 @@ export default function getDefaultButtons() {
121 144
             id: 'toolbar_button_desktopsharing',
122 145
             onClick() {
123 146
                 if (APP.conference.isSharingScreen) {
124
-                    sendAnalyticsEvent('toolbar.screen.disabled');
147
+                    sendAnalyticsEvent(TOOLBAR_SCREEN_DISABLED);
125 148
                 } else {
126
-                    sendAnalyticsEvent('toolbar.screen.enabled');
149
+                    sendAnalyticsEvent(TOOLBAR_SCREEN_ENABLED);
127 150
                 }
128 151
                 APP.UI.emitEvent(UIEvents.TOGGLE_SCREENSHARING);
129 152
             },
@@ -137,7 +160,7 @@ export default function getDefaultButtons() {
137 160
             shortcut: 'D',
138 161
             shortcutAttr: 'toggleDesktopSharingPopover',
139 162
             shortcutFunc() {
140
-                sendAnalyticsEvent('shortcut.screen.toggled');
163
+                sendAnalyticsEvent(SHORTCUT_SCREEN_TOGGLED);
141 164
 
142 165
                 // eslint-disable-next-line no-empty-function
143 166
                 APP.conference.toggleScreenSharing().catch(() => {});
@@ -158,7 +181,7 @@ export default function getDefaultButtons() {
158 181
             id: 'toolbar_button_fodeviceselection',
159 182
             onClick(dispatch: Function) {
160 183
                 sendAnalyticsEvent(
161
-                    'toolbar.fodeviceselection.toggled');
184
+                    TOOLBAR_FILMSTRIP_ONLY_DEVICE_SELECTION_TOGGLED);
162 185
 
163 186
                 dispatch(openDeviceSelectionDialog());
164 187
             },
@@ -177,7 +200,7 @@ export default function getDefaultButtons() {
177 200
             hidden: true,
178 201
             id: 'toolbar_button_dialpad',
179 202
             onClick() {
180
-                sendAnalyticsEvent('toolbar.sip.dialpad.clicked');
203
+                sendAnalyticsEvent(TOOLBAR_SIP_DIALPAD_CLICKED);
181 204
             },
182 205
             tooltipKey: 'toolbar.dialpad'
183 206
         },
@@ -191,7 +214,7 @@ export default function getDefaultButtons() {
191 214
             hidden: true,
192 215
             id: 'toolbar_button_etherpad',
193 216
             onClick() {
194
-                sendAnalyticsEvent('toolbar.etherpad.clicked');
217
+                sendAnalyticsEvent(TOOLBAR_ETHERPACK_CLICKED);
195 218
                 APP.UI.emitEvent(UIEvents.ETHERPAD_CLICKED);
196 219
             },
197 220
             tooltipKey: 'toolbar.etherpad'
@@ -205,7 +228,7 @@ export default function getDefaultButtons() {
205 228
             enabled: true,
206 229
             id: 'toolbar_button_fullScreen',
207 230
             onClick() {
208
-                sendAnalyticsEvent('toolbar.fullscreen.enabled');
231
+                sendAnalyticsEvent(TOOLBAR_FULLSCREEN_ENABLED);
209 232
 
210 233
                 APP.UI.emitEvent(UIEvents.TOGGLE_FULLSCREEN);
211 234
             },
@@ -229,7 +252,7 @@ export default function getDefaultButtons() {
229 252
             isDisplayed: () => true,
230 253
             id: 'toolbar_button_hangup',
231 254
             onClick() {
232
-                sendAnalyticsEvent('toolbar.hangup');
255
+                sendAnalyticsEvent(TOOLBAR_HANGUP);
233 256
                 APP.UI.emitEvent(UIEvents.HANGUP);
234 257
             },
235 258
             tooltipKey: 'toolbar.hangup'
@@ -252,7 +275,7 @@ export default function getDefaultButtons() {
252 275
             enabled: true,
253 276
             id: 'toolbar_button_link',
254 277
             onClick(dispatch: Function) {
255
-                sendAnalyticsEvent('toolbar.invite.clicked');
278
+                sendAnalyticsEvent(TOOLBAR_INVITE_CLICKED);
256 279
 
257 280
                 dispatch(openInviteDialog());
258 281
             },
@@ -280,11 +303,11 @@ export default function getDefaultButtons() {
280 303
                         APP.UI.showCustomToolbarPopup(
281 304
                             'microphone', 'unableToUnmutePopup', true, 5000);
282 305
                     } else {
283
-                        sendAnalyticsEvent('toolbar.audio.unmuted');
306
+                        sendAnalyticsEvent(TOOLBAR_AUDIO_UNMUTED);
284 307
                         APP.UI.emitEvent(UIEvents.AUDIO_MUTED, false, true);
285 308
                     }
286 309
                 } else {
287
-                    sendAnalyticsEvent('toolbar.audio.muted');
310
+                    sendAnalyticsEvent(TOOLBAR_AUDIO_MUTED);
288 311
                     APP.UI.emitEvent(UIEvents.AUDIO_MUTED, true, true);
289 312
                 }
290 313
             },
@@ -305,7 +328,7 @@ export default function getDefaultButtons() {
305 328
             shortcut: 'M',
306 329
             shortcutAttr: 'mutePopover',
307 330
             shortcutFunc() {
308
-                sendAnalyticsEvent('shortcut.audiomute.toggled');
331
+                sendAnalyticsEvent(SHORTCUT_AUDIO_MUTE_TOGGLED);
309 332
                 APP.conference.toggleAudioMuted();
310 333
             },
311 334
             shortcutDescription: 'keyboardShortcuts.mute',
@@ -328,14 +351,14 @@ export default function getDefaultButtons() {
328 351
             enabled: true,
329 352
             id: 'toolbar_button_raisehand',
330 353
             onClick() {
331
-                sendAnalyticsEvent('toolbar.raiseHand.clicked');
354
+                sendAnalyticsEvent(TOOLBAR_RAISE_HAND_CLICKED);
332 355
                 APP.conference.maybeToggleRaisedHand();
333 356
             },
334 357
             shortcut: 'R',
335 358
             shortcutAttr: 'raiseHandPopover',
336 359
             shortcutDescription: 'keyboardShortcuts.raiseHand',
337 360
             shortcutFunc() {
338
-                sendAnalyticsEvent('shortcut.raisehand.clicked');
361
+                sendAnalyticsEvent(SHORTCUT_RAISE_HAND_CLICKED);
339 362
                 APP.conference.maybeToggleRaisedHand();
340 363
             },
341 364
             tooltipKey: 'toolbar.raiseHand'
@@ -363,7 +386,7 @@ export default function getDefaultButtons() {
363 386
             enabled: true,
364 387
             id: 'toolbar_button_settings',
365 388
             onClick() {
366
-                sendAnalyticsEvent('toolbar.settings.toggled');
389
+                sendAnalyticsEvent(TOOLBAR_SETTINGS_TOGGLED);
367 390
                 APP.UI.emitEvent(UIEvents.TOGGLE_SETTINGS);
368 391
             },
369 392
             sideContainerId: 'settings_container',
@@ -378,7 +401,7 @@ export default function getDefaultButtons() {
378 401
             enabled: true,
379 402
             id: 'toolbar_button_sharedvideo',
380 403
             onClick() {
381
-                sendAnalyticsEvent('toolbar.sharedvideo.clicked');
404
+                sendAnalyticsEvent(TOOLBAR_SHARED_VIDEO_CLICKED);
382 405
                 APP.UI.emitEvent(UIEvents.SHARED_VIDEO_CLICKED);
383 406
             },
384 407
             popups: [

+ 11
- 5
react/features/video-quality/components/VideoQualityDialog.web.js 查看文件

@@ -3,7 +3,13 @@ import PropTypes from 'prop-types';
3 3
 import React, { Component } from 'react';
4 4
 import { connect } from 'react-redux';
5 5
 
6
-import { sendAnalyticsEvent } from '../../analytics';
6
+import {
7
+    TOOLBAR_AUDIO_ONLY_ENABLED,
8
+    TOOLBAR_VIDEO_QUALITY_HIGH,
9
+    TOOLBAR_VIDEO_QUALITY_LOW,
10
+    TOOLBAR_VIDEO_QUALITY_STANDARD,
11
+    sendAnalyticsEvent
12
+} from '../../analytics';
7 13
 import {
8 14
     setAudioOnly,
9 15
     setReceiveVideoQuality,
@@ -249,7 +255,7 @@ class VideoQualityDialog extends Component {
249 255
      * @returns {void}
250 256
      */
251 257
     _enableAudioOnly() {
252
-        sendAnalyticsEvent('toolbar.audioonly.enabled');
258
+        sendAnalyticsEvent(TOOLBAR_AUDIO_ONLY_ENABLED);
253 259
         logger.log('Video quality: audio only enabled');
254 260
         this.props.dispatch(setAudioOnly(true));
255 261
     }
@@ -262,7 +268,7 @@ class VideoQualityDialog extends Component {
262 268
      * @returns {void}
263 269
      */
264 270
     _enableHighDefinition() {
265
-        sendAnalyticsEvent('toolbar.videoquality.high');
271
+        sendAnalyticsEvent(TOOLBAR_VIDEO_QUALITY_HIGH);
266 272
         logger.log('Video quality: high enabled');
267 273
         this.props.dispatch(setReceiveVideoQuality(HIGH));
268 274
     }
@@ -275,7 +281,7 @@ class VideoQualityDialog extends Component {
275 281
      * @returns {void}
276 282
      */
277 283
     _enableLowDefinition() {
278
-        sendAnalyticsEvent('toolbar.videoquality.low');
284
+        sendAnalyticsEvent(TOOLBAR_VIDEO_QUALITY_LOW);
279 285
         logger.log('Video quality: low enabled');
280 286
         this.props.dispatch(setReceiveVideoQuality(LOW));
281 287
     }
@@ -288,7 +294,7 @@ class VideoQualityDialog extends Component {
288 294
      * @returns {void}
289 295
      */
290 296
     _enableStandardDefinition() {
291
-        sendAnalyticsEvent('toolbar.videoquality.standard');
297
+        sendAnalyticsEvent(TOOLBAR_VIDEO_QUALITY_STANDARD);
292 298
         logger.log('Video quality: standard enabled');
293 299
         this.props.dispatch(setReceiveVideoQuality(STANDARD));
294 300
     }

正在加载...
取消
保存