瀏覽代碼

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

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

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

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

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

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

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

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

3
 import UIEvents from '../../../../service/UI/UIEvents';
3
 import UIEvents from '../../../../service/UI/UIEvents';
4
 import Settings from '../../../settings/Settings';
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
 const sidePanelsContainerId = 'sideToolbarContainer';
12
 const sidePanelsContainerId = 'sideToolbarContainer';
9
 const htmlStr = `
13
 const htmlStr = `
91
          *
95
          *
92
          */
96
          */
93
         function loginClicked() {
97
         function loginClicked() {
94
-            sendAnalyticsEvent('authenticate.login.clicked');
98
+            sendAnalyticsEvent(AUTHENTICATE_LOGIN_CLICKED);
95
             emitter.emit(UIEvents.AUTH_CLICKED);
99
             emitter.emit(UIEvents.AUTH_CLICKED);
96
         }
100
         }
97
 
101
 
104
             const titleKey = 'dialog.logoutTitle';
108
             const titleKey = 'dialog.logoutTitle';
105
             const msgKey = 'dialog.logoutQuestion';
109
             const msgKey = 'dialog.logoutQuestion';
106
 
110
 
107
-            sendAnalyticsEvent('authenticate.logout.clicked');
111
+            sendAnalyticsEvent(AUTHENTICATE_LOGOUT_CLICKED);
108
 
112
 
109
             // Ask for confirmation
113
             // Ask for confirmation
110
             APP.UI.messageHandler.openTwoButtonDialog({
114
             APP.UI.messageHandler.openTwoButtonDialog({

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

5
 import UIEvents from '../../../service/UI/UIEvents';
5
 import UIEvents from '../../../service/UI/UIEvents';
6
 import UIUtil from '../util/UIUtil';
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
 const Filmstrip = {
13
 const Filmstrip = {
11
     /**
14
     /**
150
             return;
153
             return;
151
         }
154
         }
152
         if (sendAnalytics) {
155
         if (sendAnalytics) {
153
-            sendAnalyticsEvent('toolbar.filmstrip.toggled');
156
+            sendAnalyticsEvent(TOOLBAR_FILMSTRIP_TOGGLED);
154
         }
157
         }
155
         this.filmstrip.toggleClass('hidden');
158
         this.filmstrip.toggleClass('hidden');
156
 
159
 

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

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

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

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
+export * from './AnalyticsEvents';
1
 export * from './functions';
2
 export * from './functions';
2
 
3
 
3
 import './middleware';
4
 import './middleware';

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

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

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

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

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

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

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

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

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

6
 import React, { Component } from 'react';
6
 import React, { Component } from 'react';
7
 import { connect } from 'react-redux';
7
 import { connect } from 'react-redux';
8
 
8
 
9
-import { sendAnalyticsEvent } from '../../analytics';
9
+import {
10
+    FEEDBACK_OPEN,
11
+    sendAnalyticsEvent
12
+} from '../../analytics';
10
 import { Dialog } from '../../base/dialog';
13
 import { Dialog } from '../../base/dialog';
11
 import { translate } from '../../base/i18n';
14
 import { translate } from '../../base/i18n';
12
 
15
 
145
      * @inheritdoc
148
      * @inheritdoc
146
      */
149
      */
147
     componentDidMount() {
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
 import React, { Component } from 'react';
2
 import React, { Component } from 'react';
3
 import { connect } from 'react-redux';
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
 import { getInviteURL } from '../../base/connection';
9
 import { getInviteURL } from '../../base/connection';
7
 import { Dialog } from '../../base/dialog';
10
 import { Dialog } from '../../base/dialog';
8
 import { translate } from '../../base/i18n';
11
 import { translate } from '../../base/i18n';
51
      * @inheritdoc
54
      * @inheritdoc
52
      */
55
      */
53
     componentWillUnmount() {
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
 /* @flow */
1
 /* @flow */
2
 
2
 
3
-import { sendAnalyticsEvent } from '../../analytics';
3
+import {
4
+    CALLKIT_BACKGROUND_VIDEO_MUTED,
5
+    sendAnalyticsEvent
6
+} from '../../analytics';
4
 import { setLastN } from '../../base/conference';
7
 import { setLastN } from '../../base/conference';
5
 import { setVideoMuted, VIDEO_MUTISM_AUTHORITY } from '../../base/media';
8
 import { setVideoMuted, VIDEO_MUTISM_AUTHORITY } from '../../base/media';
6
 
9
 
43
 
46
 
44
         audioOnly || dispatch(setLastN(muted ? 0 : undefined));
47
         audioOnly || dispatch(setLastN(muted ? 0 : undefined));
45
 
48
 
46
-        sendAnalyticsEvent('callkit.background.video.muted');
49
+        sendAnalyticsEvent(CALLKIT_BACKGROUND_VIDEO_MUTED);
47
 
50
 
48
         dispatch(setVideoMuted(muted, VIDEO_MUTISM_AUTHORITY.BACKGROUND));
51
         dispatch(setVideoMuted(muted, VIDEO_MUTISM_AUTHORITY.BACKGROUND));
49
     };
52
     };

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

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

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

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

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

2
 import React, { Component } from 'react';
2
 import React, { Component } from 'react';
3
 import { connect } from 'react-redux';
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
 import { translate } from '../../base/i18n';
9
 import { translate } from '../../base/i18n';
7
 import { kickParticipant } from '../../base/participants';
10
 import { kickParticipant } from '../../base/participants';
8
 
11
 
84
         const { dispatch, onClick, participantID } = this.props;
87
         const { dispatch, onClick, participantID } = this.props;
85
 
88
 
86
         sendAnalyticsEvent(
89
         sendAnalyticsEvent(
87
-            'remotevideomenu.kick',
90
+            REMOTE_VIDEO_MENU_KICK,
88
             {
91
             {
89
                 value: 1,
92
                 value: 1,
90
                 label: participantID
93
                 label: participantID

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

2
 import React, { Component } from 'react';
2
 import React, { Component } from 'react';
3
 import { connect } from 'react-redux';
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
 import { translate } from '../../base/i18n';
9
 import { translate } from '../../base/i18n';
7
 import { openDialog } from '../../base/dialog';
10
 import { openDialog } from '../../base/dialog';
8
 
11
 
99
         const { dispatch, onClick, participantID } = this.props;
102
         const { dispatch, onClick, participantID } = this.props;
100
 
103
 
101
         sendAnalyticsEvent(
104
         sendAnalyticsEvent(
102
-            'remotevideomenu.mute.clicked',
105
+            REMOTE_VIDEO_MENU_MUTE_CLICKED,
103
             {
106
             {
104
                 value: 1,
107
                 value: 1,
105
                 label: participantID
108
                 label: participantID

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

5
 import { Dialog } from '../../base/dialog';
5
 import { Dialog } from '../../base/dialog';
6
 import { translate } from '../../base/i18n';
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
 import { muteRemoteParticipant } from '../../base/participants';
12
 import { muteRemoteParticipant } from '../../base/participants';
10
 
13
 
11
 /**
14
 /**
80
         const { dispatch, participantID } = this.props;
83
         const { dispatch, participantID } = this.props;
81
 
84
 
82
         sendAnalyticsEvent(
85
         sendAnalyticsEvent(
83
-            'remotevideomenu.mute.confirmed',
86
+            REMOTE_VIDEO_MENU_MUTE_CONFIRMED,
84
             {
87
             {
85
                 value: 1,
88
                 value: 1,
86
                 label: participantID
89
                 label: participantID

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

1
 import PropTypes from 'prop-types';
1
 import PropTypes from 'prop-types';
2
 import React, { Component } from 'react';
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
 import { translate } from '../../base/i18n';
8
 import { translate } from '../../base/i18n';
6
 
9
 
7
 import RemoteVideoMenuButton from './RemoteVideoMenuButton';
10
 import RemoteVideoMenuButton from './RemoteVideoMenuButton';
131
 
134
 
132
         if (eventName) {
135
         if (eventName) {
133
             sendAnalyticsEvent(
136
             sendAnalyticsEvent(
134
-                `remotevideomenu.remotecontrol.${eventName}`,
137
+                `${REMOTE_VIDEO_MENU_REMOTE_CONTROL_}.${eventName}`,
135
                 {
138
                 {
136
                     value: 1,
139
                     value: 1,
137
                     label: participantID
140
                     label: participantID

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

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

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

3
 import { View } from 'react-native';
3
 import { View } from 'react-native';
4
 import { connect } from 'react-redux';
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
 import {
12
 import {
8
     isNarrowAspectRatio,
13
     isNarrowAspectRatio,
9
     makeAspectRatioAware
14
     makeAspectRatioAware
183
     _onToggleAudio() {
188
     _onToggleAudio() {
184
         const mute = !this.props._audioMuted;
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
         // The user sees the reality i.e. the state of base/tracks and intends
193
         // The user sees the reality i.e. the state of base/tracks and intends
189
         // to change reality by tapping on the respective button i.e. the user
194
         // to change reality by tapping on the respective button i.e. the user
206
     _onToggleVideo() {
211
     _onToggleVideo() {
207
         const mute = !this.props._videoMuted;
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
         // The user sees the reality i.e. the state of base/tracks and intends
216
         // The user sees the reality i.e. the state of base/tracks and intends
212
         // to change reality by tapping on the respective button i.e. the user
217
         // to change reality by tapping on the respective button i.e. the user

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

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

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

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

Loading…
取消
儲存