Browse Source

style(analytics): sendEvent -> sendAnalyticsEvent

j8
hristoterezov 8 years ago
parent
commit
0b50578de9

+ 13
- 13
conference.js View File

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, sendEvent } from './react/features/analytics';
18
+import { initAnalytics, sendAnalyticsEvent } from './react/features/analytics';
19
 
19
 
20
 import EventEmitter from 'events';
20
 import EventEmitter from 'events';
21
 
21
 
719
             .then(([ tracks, con ]) => {
719
             .then(([ tracks, con ]) => {
720
                 tracks.forEach(track => {
720
                 tracks.forEach(track => {
721
                     if (track.isAudioTrack() && this.isLocalAudioMuted()) {
721
                     if (track.isAudioTrack() && this.isLocalAudioMuted()) {
722
-                        sendEvent('conference.audio.initiallyMuted');
722
+                        sendAnalyticsEvent('conference.audio.initiallyMuted');
723
                         logger.log('Audio mute: initially muted');
723
                         logger.log('Audio mute: initially muted');
724
                         track.mute();
724
                         track.mute();
725
                     } else if (track.isVideoTrack()
725
                     } else if (track.isVideoTrack()
726
                                     && this.isLocalVideoMuted()) {
726
                                     && this.isLocalVideoMuted()) {
727
-                        sendEvent('conference.video.initiallyMuted');
727
+                        sendAnalyticsEvent('conference.video.initiallyMuted');
728
                         logger.log('Video mute: initially muted');
728
                         logger.log('Video mute: initially muted');
729
                         track.mute();
729
                         track.mute();
730
                     }
730
                     }
1423
             promise = createLocalTracksF({ devices: [ 'video' ] })
1423
             promise = createLocalTracksF({ devices: [ 'video' ] })
1424
                 .then(([ stream ]) => this.useVideoStream(stream))
1424
                 .then(([ stream ]) => this.useVideoStream(stream))
1425
                 .then(() => {
1425
                 .then(() => {
1426
-                    sendEvent(
1426
+                    sendAnalyticsEvent(
1427
                         'conference.sharingDesktop.stop');
1427
                         'conference.sharingDesktop.stop');
1428
                     logger.log('switched back to local video');
1428
                     logger.log('switched back to local video');
1429
                     if (!this.localVideo && wasVideoMuted) {
1429
                     if (!this.localVideo && wasVideoMuted) {
1603
             .then(stream => this.useVideoStream(stream))
1603
             .then(stream => this.useVideoStream(stream))
1604
             .then(() => {
1604
             .then(() => {
1605
                 this.videoSwitchInProgress = false;
1605
                 this.videoSwitchInProgress = false;
1606
-                sendEvent('conference.sharingDesktop.start');
1606
+                sendAnalyticsEvent('conference.sharingDesktop.start');
1607
                 logger.log('sharing local desktop');
1607
                 logger.log('sharing local desktop');
1608
             })
1608
             })
1609
             .catch(error => {
1609
             .catch(error => {
1896
 
1896
 
1897
                     room.selectParticipant(id);
1897
                     room.selectParticipant(id);
1898
                 } catch (e) {
1898
                 } catch (e) {
1899
-                    sendEvent(
1899
+                    sendAnalyticsEvent(
1900
                         'selectParticipant.failed');
1900
                         'selectParticipant.failed');
1901
                     reportError(e);
1901
                     reportError(e);
1902
                 }
1902
                 }
2138
                 // Longer delays will be caused by something else and will just
2138
                 // Longer delays will be caused by something else and will just
2139
                 // poison the data.
2139
                 // poison the data.
2140
                 if (delay < 2000) {
2140
                 if (delay < 2000) {
2141
-                    sendEvent('stream.switch.delay', { value: delay });
2141
+                    sendAnalyticsEvent('stream.switch.delay', { value: delay });
2142
                 }
2142
                 }
2143
             });
2143
             });
2144
 
2144
 
2171
         APP.UI.addListener(
2171
         APP.UI.addListener(
2172
             UIEvents.VIDEO_DEVICE_CHANGED,
2172
             UIEvents.VIDEO_DEVICE_CHANGED,
2173
             cameraDeviceId => {
2173
             cameraDeviceId => {
2174
-                sendEvent('settings.changeDevice.video');
2174
+                sendAnalyticsEvent('settings.changeDevice.video');
2175
                 createLocalTracksF({
2175
                 createLocalTracksF({
2176
                     devices: [ 'video' ],
2176
                     devices: [ 'video' ],
2177
                     cameraDeviceId,
2177
                     cameraDeviceId,
2199
         APP.UI.addListener(
2199
         APP.UI.addListener(
2200
             UIEvents.AUDIO_DEVICE_CHANGED,
2200
             UIEvents.AUDIO_DEVICE_CHANGED,
2201
             micDeviceId => {
2201
             micDeviceId => {
2202
-                sendEvent(
2202
+                sendAnalyticsEvent(
2203
                     'settings.changeDevice.audioIn');
2203
                     'settings.changeDevice.audioIn');
2204
                 createLocalTracksF({
2204
                 createLocalTracksF({
2205
                     devices: [ 'audio' ],
2205
                     devices: [ 'audio' ],
2220
         APP.UI.addListener(
2220
         APP.UI.addListener(
2221
             UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED,
2221
             UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED,
2222
             audioOutputDeviceId => {
2222
             audioOutputDeviceId => {
2223
-                sendEvent(
2223
+                sendAnalyticsEvent(
2224
                     'settings.changeDevice.audioOut');
2224
                     'settings.changeDevice.audioOut');
2225
                 APP.settings.setAudioOutputDeviceId(audioOutputDeviceId)
2225
                 APP.settings.setAudioOutputDeviceId(audioOutputDeviceId)
2226
                     .then(() => logger.log('changed audio output device'))
2226
                     .then(() => logger.log('changed audio output device'))
2428
                     if (audioWasMuted
2428
                     if (audioWasMuted
2429
                         || currentDevices.audioinput.length
2429
                         || currentDevices.audioinput.length
2430
                         > availableAudioInputDevices.length) {
2430
                         > availableAudioInputDevices.length) {
2431
-                        sendEvent('deviceListChanged.audio.muted');
2431
+                        sendAnalyticsEvent('deviceListChanged.audio.muted');
2432
                         logger.log('Audio mute: device list changed');
2432
                         logger.log('Audio mute: device list changed');
2433
                         muteLocalAudio(true);
2433
                         muteLocalAudio(true);
2434
                     }
2434
                     }
2439
                         && (videoWasMuted
2439
                         && (videoWasMuted
2440
                             || currentDevices.videoinput.length
2440
                             || currentDevices.videoinput.length
2441
                                 > availableVideoInputDevices.length)) {
2441
                                 > availableVideoInputDevices.length)) {
2442
-                        sendEvent('deviceListChanged.video.muted');
2442
+                        sendAnalyticsEvent('deviceListChanged.video.muted');
2443
                         logger.log('Video mute: device list changed');
2443
                         logger.log('Video mute: device list changed');
2444
                         muteLocalVideo(true);
2444
                         muteLocalVideo(true);
2445
                     }
2445
                     }
2535
      * NOTE: Should be used after conference.init
2535
      * NOTE: Should be used after conference.init
2536
      */
2536
      */
2537
     logEvent(name, value, label) {
2537
     logEvent(name, value, label) {
2538
-        sendEvent(name, {
2538
+        sendAnalyticsEvent(name, {
2539
             value,
2539
             value,
2540
             label
2540
             label
2541
         });
2541
         });

+ 3
- 3
modules/API/API.js View File

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 { sendEvent } from '../../react/features/analytics';
5
+import { sendAnalyticsEvent } from '../../react/features/analytics';
6
 import { getJitsiMeetTransport } from '../transport';
6
 import { getJitsiMeetTransport } from '../transport';
7
 
7
 
8
 import { API_ID } from './constants';
8
 import { API_ID } from './constants';
55
         'display-name':
55
         'display-name':
56
             APP.conference.changeLocalDisplayName.bind(APP.conference),
56
             APP.conference.changeLocalDisplayName.bind(APP.conference),
57
         'toggle-audio': () => {
57
         'toggle-audio': () => {
58
-            sendEvent('api.toggle.audio');
58
+            sendAnalyticsEvent('api.toggle.audio');
59
             logger.log('Audio toggle: API command received');
59
             logger.log('Audio toggle: API command received');
60
             APP.conference.toggleAudioMuted(false /* no UI */);
60
             APP.conference.toggleAudioMuted(false /* no UI */);
61
         },
61
         },
62
         'toggle-video': () => {
62
         'toggle-video': () => {
63
-            sendEvent('api.toggle.video');
63
+            sendAnalyticsEvent('api.toggle.video');
64
             logger.log('Video toggle: API command received');
64
             logger.log('Video toggle: API command received');
65
             APP.conference.toggleVideoMuted(false /* no UI */);
65
             APP.conference.toggleVideoMuted(false /* no UI */);
66
         },
66
         },

+ 8
- 8
modules/UI/recording/Recording.js View File

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
-    sendEvent
27
+    sendAnalyticsEvent
28
 } from '../../../react/features/analytics';
28
 } from '../../../react/features/analytics';
29
 import { setToolboxEnabled } from '../../../react/features/toolbox';
29
 import { setToolboxEnabled } from '../../../react/features/toolbox';
30
 import { setNotificationsEnabled } from '../../../react/features/notifications';
30
 import { setNotificationsEnabled } from '../../../react/features/notifications';
456
             return;
456
             return;
457
         }
457
         }
458
 
458
 
459
-        sendEvent('recording.clicked');
459
+        sendAnalyticsEvent('recording.clicked');
460
         switch (this.currentState) {
460
         switch (this.currentState) {
461
         case JitsiRecordingStatus.ON:
461
         case JitsiRecordingStatus.ON:
462
         case JitsiRecordingStatus.RETRYING:
462
         case JitsiRecordingStatus.RETRYING:
464
             _showStopRecordingPrompt(this.recordingType).then(
464
             _showStopRecordingPrompt(this.recordingType).then(
465
                 () => {
465
                 () => {
466
                     this.eventEmitter.emit(UIEvents.RECORDING_TOGGLED);
466
                     this.eventEmitter.emit(UIEvents.RECORDING_TOGGLED);
467
-                    sendEvent('recording.stopped');
467
+                    sendAnalyticsEvent('recording.stopped');
468
                 },
468
                 },
469
                 () => {}); // eslint-disable-line no-empty-function
469
                 () => {}); // eslint-disable-line no-empty-function
470
             break;
470
             break;
477
                     this.eventEmitter.emit(
477
                     this.eventEmitter.emit(
478
                         UIEvents.RECORDING_TOGGLED,
478
                         UIEvents.RECORDING_TOGGLED,
479
                         { streamId });
479
                         { streamId });
480
-                    sendEvent('recording.started');
480
+                    sendAnalyticsEvent('recording.started');
481
                 })
481
                 })
482
                 .catch(reason => {
482
                 .catch(reason => {
483
                     if (reason === APP.UI.messageHandler.CANCEL) {
483
                     if (reason === APP.UI.messageHandler.CANCEL) {
484
-                        sendEvent('recording.canceled');
484
+                        sendAnalyticsEvent('recording.canceled');
485
                     } else {
485
                     } else {
486
                         logger.error(reason);
486
                         logger.error(reason);
487
                     }
487
                     }
491
                     this.eventEmitter.emit(
491
                     this.eventEmitter.emit(
492
                         UIEvents.RECORDING_TOGGLED,
492
                         UIEvents.RECORDING_TOGGLED,
493
                         { token: this.predefinedToken });
493
                         { token: this.predefinedToken });
494
-                    sendEvent('recording.started');
494
+                    sendAnalyticsEvent('recording.started');
495
 
495
 
496
                     return;
496
                     return;
497
                 }
497
                 }
500
                     this.eventEmitter.emit(
500
                     this.eventEmitter.emit(
501
                         UIEvents.RECORDING_TOGGLED,
501
                         UIEvents.RECORDING_TOGGLED,
502
                         { token });
502
                         { token });
503
-                    sendEvent('recording.started');
503
+                    sendAnalyticsEvent('recording.started');
504
                 })
504
                 })
505
                 .catch(reason => {
505
                 .catch(reason => {
506
                     if (reason === APP.UI.messageHandler.CANCEL) {
506
                     if (reason === APP.UI.messageHandler.CANCEL) {
507
-                        sendEvent('recording.canceled');
507
+                        sendAnalyticsEvent('recording.canceled');
508
                     } else {
508
                     } else {
509
                         logger.error(reason);
509
                         logger.error(reason);
510
                     }
510
                     }

+ 9
- 9
modules/UI/shared_video/SharedVideo.js View File

8
 import LargeContainer from '../videolayout/LargeContainer';
8
 import LargeContainer from '../videolayout/LargeContainer';
9
 import Filmstrip from '../videolayout/Filmstrip';
9
 import Filmstrip from '../videolayout/Filmstrip';
10
 
10
 
11
-import { sendEvent } from '../../../react/features/analytics';
11
+import { sendAnalyticsEvent } from '../../../react/features/analytics';
12
 import {
12
 import {
13
     participantJoined,
13
     participantJoined,
14
     participantLeft
14
     participantLeft
83
                     url => {
83
                     url => {
84
                         this.emitter.emit(
84
                         this.emitter.emit(
85
                             UIEvents.UPDATE_SHARED_VIDEO, url, 'start');
85
                             UIEvents.UPDATE_SHARED_VIDEO, url, 'start');
86
-                        sendEvent('sharedvideo.started');
86
+                        sendAnalyticsEvent('sharedvideo.started');
87
                     },
87
                     },
88
                     err => {
88
                     err => {
89
                         logger.log('SHARED VIDEO CANCELED', err);
89
                         logger.log('SHARED VIDEO CANCELED', err);
90
-                        sendEvent('sharedvideo.canceled');
90
+                        sendAnalyticsEvent('sharedvideo.canceled');
91
                     }
91
                     }
92
             );
92
             );
93
 
93
 
107
                     }
107
                     }
108
                     this.emitter.emit(
108
                     this.emitter.emit(
109
                         UIEvents.UPDATE_SHARED_VIDEO, this.url, 'stop');
109
                         UIEvents.UPDATE_SHARED_VIDEO, this.url, 'stop');
110
-                    sendEvent('sharedvideo.stoped');
110
+                    sendAnalyticsEvent('sharedvideo.stoped');
111
                 },
111
                 },
112
                 () => {}); // eslint-disable-line no-empty-function
112
                 () => {}); // eslint-disable-line no-empty-function
113
         } else {
113
         } else {
119
                     dialog = null;
119
                     dialog = null;
120
                 }
120
                 }
121
             );
121
             );
122
-            sendEvent('sharedvideo.alreadyshared');
122
+            sendAnalyticsEvent('sharedvideo.alreadyshared');
123
         }
123
         }
124
     }
124
     }
125
 
125
 
228
                 // eslint-disable-next-line eqeqeq
228
                 // eslint-disable-next-line eqeqeq
229
             } else if (event.data == YT.PlayerState.PAUSED) {
229
             } else if (event.data == YT.PlayerState.PAUSED) {
230
                 self.smartAudioUnmute();
230
                 self.smartAudioUnmute();
231
-                sendEvent('sharedvideo.paused');
231
+                sendAnalyticsEvent('sharedvideo.paused');
232
             }
232
             }
233
             // eslint-disable-next-line eqeqeq
233
             // eslint-disable-next-line eqeqeq
234
             self.fireSharedVideoEvent(event.data == YT.PlayerState.PAUSED);
234
             self.fireSharedVideoEvent(event.data == YT.PlayerState.PAUSED);
260
             } else if (event.data.volume <= 0 || event.data.muted) {
260
             } else if (event.data.volume <= 0 || event.data.muted) {
261
                 self.smartAudioUnmute();
261
                 self.smartAudioUnmute();
262
             }
262
             }
263
-            sendEvent('sharedvideo.volumechanged');
263
+            sendAnalyticsEvent('sharedvideo.volumechanged');
264
         };
264
         };
265
 
265
 
266
         window.onPlayerReady = function(event) {
266
         window.onPlayerReady = function(event) {
566
         if (APP.conference.isLocalAudioMuted()
566
         if (APP.conference.isLocalAudioMuted()
567
             && !this.mutedWithUserInteraction
567
             && !this.mutedWithUserInteraction
568
             && !this.isSharedVideoVolumeOn()) {
568
             && !this.isSharedVideoVolumeOn()) {
569
-            sendEvent('sharedvideo.audio.unmuted');
569
+            sendAnalyticsEvent('sharedvideo.audio.unmuted');
570
             logger.log('Shared video: audio unmuted');
570
             logger.log('Shared video: audio unmuted');
571
             this.emitter.emit(UIEvents.AUDIO_MUTED, false, false);
571
             this.emitter.emit(UIEvents.AUDIO_MUTED, false, false);
572
             this.showMicMutedPopup(false);
572
             this.showMicMutedPopup(false);
580
     smartAudioMute() {
580
     smartAudioMute() {
581
         if (!APP.conference.isLocalAudioMuted()
581
         if (!APP.conference.isLocalAudioMuted()
582
             && this.isSharedVideoVolumeOn()) {
582
             && this.isSharedVideoVolumeOn()) {
583
-            sendEvent('sharedvideo.audio.muted');
583
+            sendAnalyticsEvent('sharedvideo.audio.muted');
584
             logger.log('Shared video: audio muted');
584
             logger.log('Shared video: audio muted');
585
             this.emitter.emit(UIEvents.AUDIO_MUTED, true, false);
585
             this.emitter.emit(UIEvents.AUDIO_MUTED, true, false);
586
             this.showMicMutedPopup(true);
586
             this.showMicMutedPopup(true);

+ 3
- 3
modules/UI/side_pannels/profile/Profile.js View File

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 { sendEvent } from '../../../../react/features/analytics';
6
+import { sendAnalyticsEvent } from '../../../../react/features/analytics';
7
 
7
 
8
 const sidePanelsContainerId = 'sideToolbarContainer';
8
 const sidePanelsContainerId = 'sideToolbarContainer';
9
 const htmlStr = `
9
 const htmlStr = `
91
          *
91
          *
92
          */
92
          */
93
         function loginClicked() {
93
         function loginClicked() {
94
-            sendEvent('authenticate.login.clicked');
94
+            sendAnalyticsEvent('authenticate.login.clicked');
95
             emitter.emit(UIEvents.AUTH_CLICKED);
95
             emitter.emit(UIEvents.AUTH_CLICKED);
96
         }
96
         }
97
 
97
 
104
             const titleKey = 'dialog.logoutTitle';
104
             const titleKey = 'dialog.logoutTitle';
105
             const msgKey = 'dialog.logoutQuestion';
105
             const msgKey = 'dialog.logoutQuestion';
106
 
106
 
107
-            sendEvent('authenticate.logout.clicked');
107
+            sendAnalyticsEvent('authenticate.logout.clicked');
108
 
108
 
109
             // Ask for confirmation
109
             // Ask for confirmation
110
             APP.UI.messageHandler.openTwoButtonDialog({
110
             APP.UI.messageHandler.openTwoButtonDialog({

+ 2
- 2
modules/UI/videolayout/Filmstrip.js View File

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 { sendEvent } from '../../../react/features/analytics';
8
+import { sendAnalyticsEvent } from '../../../react/features/analytics';
9
 
9
 
10
 const Filmstrip = {
10
 const Filmstrip = {
11
     /**
11
     /**
150
             return;
150
             return;
151
         }
151
         }
152
         if (sendAnalytics) {
152
         if (sendAnalytics) {
153
-            sendEvent('toolbar.filmstrip.toggled');
153
+            sendAnalyticsEvent('toolbar.filmstrip.toggled');
154
         }
154
         }
155
         this.filmstrip.toggleClass('hidden');
155
         this.filmstrip.toggleClass('hidden');
156
 
156
 

+ 5
- 5
modules/keyboardshortcut/keyboardshortcut.js View File

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 { sendEvent } from '../../react/features/analytics';
4
+import { sendAnalyticsEvent } from '../../react/features/analytics';
5
 import { SpeakerStats } from '../../react/features/speaker-stats';
5
 import { SpeakerStats } from '../../react/features/speaker-stats';
6
 
6
 
7
 const logger = require('jitsi-meet-logger').getLogger(__filename);
7
 const logger = require('jitsi-meet-logger').getLogger(__filename);
81
                 || $(':focus').is('textarea'))) {
81
                 || $(':focus').is('textarea'))) {
82
                 if (this._getKeyboardKey(e).toUpperCase() === ' ') {
82
                 if (this._getKeyboardKey(e).toUpperCase() === ' ') {
83
                     if (APP.conference.isLocalAudioMuted()) {
83
                     if (APP.conference.isLocalAudioMuted()) {
84
-                        sendEvent('shortcut.talk.released');
84
+                        sendAnalyticsEvent('shortcut.talk.released');
85
                         logger.log('Talk shortcut released');
85
                         logger.log('Talk shortcut released');
86
                         APP.conference.muteAudio(false);
86
                         APP.conference.muteAudio(false);
87
                     }
87
                     }
260
         });
260
         });
261
 
261
 
262
         this.registerShortcut('?', null, () => {
262
         this.registerShortcut('?', null, () => {
263
-            sendEvent('shortcut.shortcut.help');
263
+            sendAnalyticsEvent('shortcut.shortcut.help');
264
             showKeyboardShortcutsPanel(true);
264
             showKeyboardShortcutsPanel(true);
265
         }, 'keyboardShortcuts.toggleShortcuts');
265
         }, 'keyboardShortcuts.toggleShortcuts');
266
 
266
 
267
         // register SPACE shortcut in two steps to insure visibility of help
267
         // register SPACE shortcut in two steps to insure visibility of help
268
         // message
268
         // message
269
         this.registerShortcut(' ', null, () => {
269
         this.registerShortcut(' ', null, () => {
270
-            sendEvent('shortcut.talk.clicked');
270
+            sendAnalyticsEvent('shortcut.talk.clicked');
271
             logger.log('Talk shortcut pressed');
271
             logger.log('Talk shortcut pressed');
272
             APP.conference.muteAudio(true);
272
             APP.conference.muteAudio(true);
273
         });
273
         });
275
 
275
 
276
         if (!interfaceConfig.filmStripOnly) {
276
         if (!interfaceConfig.filmStripOnly) {
277
             this.registerShortcut('T', null, () => {
277
             this.registerShortcut('T', null, () => {
278
-                sendEvent('shortcut.speakerStats.clicked');
278
+                sendAnalyticsEvent('shortcut.speakerStats.clicked');
279
                 APP.store.dispatch(toggleDialog(SpeakerStats, {
279
                 APP.store.dispatch(toggleDialog(SpeakerStats, {
280
                     conference: APP.conference
280
                     conference: APP.conference
281
                 }));
281
                 }));

+ 1
- 1
react/features/analytics/functions.js View File

8
 
8
 
9
 const logger = require('jitsi-meet-logger').getLogger(__filename);
9
 const logger = require('jitsi-meet-logger').getLogger(__filename);
10
 
10
 
11
-export const sendEvent = analytics.sendEvent.bind(analytics);
11
+export const sendAnalyticsEvent = analytics.sendEvent.bind(analytics);
12
 
12
 
13
 /**
13
 /**
14
  * Loads the analytics scripts and inits JitsiMeetJS.analytics by setting
14
  * Loads the analytics scripts and inits JitsiMeetJS.analytics by setting

+ 3
- 3
react/features/base/conference/actions.js View File

1
 // @flow
1
 // @flow
2
 
2
 
3
-import { sendEvent } from '../../analytics';
3
+import { sendAnalyticsEvent } from '../../analytics';
4
 import { getName } from '../../app';
4
 import { getName } from '../../app';
5
 import { JitsiConferenceEvents } from '../lib-jitsi-meet';
5
 import { JitsiConferenceEvents } from '../lib-jitsi-meet';
6
 import { setAudioMuted, setVideoMuted } from '../media';
6
 import { setAudioMuted, setVideoMuted } from '../media';
78
             const audioMuted = Boolean(conference.startAudioMuted);
78
             const audioMuted = Boolean(conference.startAudioMuted);
79
             const videoMuted = Boolean(conference.startVideoMuted);
79
             const videoMuted = Boolean(conference.startVideoMuted);
80
 
80
 
81
-            sendEvent(
81
+            sendAnalyticsEvent(
82
                 `startmuted.server.audio.${audioMuted ? 'muted' : 'unmuted'}`);
82
                 `startmuted.server.audio.${audioMuted ? 'muted' : 'unmuted'}`);
83
-            sendEvent(
83
+            sendAnalyticsEvent(
84
                 `startmuted.server.video.${videoMuted ? 'muted' : 'unmuted'}`);
84
                 `startmuted.server.video.${videoMuted ? 'muted' : 'unmuted'}`);
85
             logger.log(`Start muted: ${audioMuted ? 'audio, ' : ''}${
85
             logger.log(`Start muted: ${audioMuted ? 'audio, ' : ''}${
86
                 videoMuted ? 'video' : ''}`);
86
                 videoMuted ? 'video' : ''}`);

+ 3
- 3
react/features/base/conference/middleware.js View File

2
 
2
 
3
 import UIEvents from '../../../../service/UI/UIEvents';
3
 import UIEvents from '../../../../service/UI/UIEvents';
4
 
4
 
5
-import { sendEvent } from '../../analytics';
5
+import { sendAnalyticsEvent } from '../../analytics';
6
 import { CONNECTION_ESTABLISHED } from '../connection';
6
 import { CONNECTION_ESTABLISHED } from '../connection';
7
 import { setVideoMuted, VIDEO_MUTISM_AUTHORITY } from '../media';
7
 import { setVideoMuted, VIDEO_MUTISM_AUTHORITY } from '../media';
8
 import {
8
 import {
124
     const result = next(action);
124
     const result = next(action);
125
 
125
 
126
     if (getState()['features/base/conference'].audioOnly) {
126
     if (getState()['features/base/conference'].audioOnly) {
127
-        sendEvent('audioonly.disabled');
127
+        sendAnalyticsEvent('audioonly.disabled');
128
         logger.log('Audio only disabled');
128
         logger.log('Audio only disabled');
129
         dispatch(setAudioOnly(false));
129
         dispatch(setAudioOnly(false));
130
     }
130
     }
196
             videoType = 'remote';
196
             videoType = 'remote';
197
         }
197
         }
198
 
198
 
199
-        sendEvent(
199
+        sendAnalyticsEvent(
200
                 `${actionName}.${videoType}`,
200
                 `${actionName}.${videoType}`,
201
                 { value: conference.getParticipantCount() });
201
                 { value: conference.getParticipantCount() });
202
     }
202
     }

+ 8
- 5
react/features/base/media/middleware.js View File

1
 /* @flow */
1
 /* @flow */
2
 
2
 
3
-import { sendEvent } from '../../analytics';
3
+import { sendAnalyticsEvent } from '../../analytics';
4
 import { SET_ROOM, setAudioOnly } from '../conference';
4
 import { SET_ROOM, setAudioOnly } from '../conference';
5
 import { parseURLParams } from '../config';
5
 import { parseURLParams } from '../config';
6
 import { MiddlewareRegistry } from '../redux';
6
 import { MiddlewareRegistry } from '../redux';
85
 
85
 
86
     // Apply the config.
86
     // Apply the config.
87
 
87
 
88
-    sendEvent(`startmuted.client.audio.${audioMuted ? 'muted' : 'unmuted'}`);
89
-    sendEvent(`startmuted.client.video.${videoMuted ? 'muted' : 'unmuted'}`);
88
+    sendAnalyticsEvent(
89
+        `startmuted.client.audio.${audioMuted ? 'muted' : 'unmuted'}`);
90
+    sendAnalyticsEvent(
91
+        `startmuted.client.video.${videoMuted ? 'muted' : 'unmuted'}`);
90
 
92
 
91
     logger.log(`Start muted: ${audioMuted ? 'audio, ' : ''}${
93
     logger.log(`Start muted: ${audioMuted ? 'audio, ' : ''}${
92
         videoMuted ? 'video' : ''}`);
94
         videoMuted ? 'video' : ''}`);
110
 
112
 
111
         typeof audioOnly === 'undefined' && (audioOnly = config.startAudioOnly);
113
         typeof audioOnly === 'undefined' && (audioOnly = config.startAudioOnly);
112
         audioOnly = Boolean(audioOnly);
114
         audioOnly = Boolean(audioOnly);
113
-        sendEvent(`startaudioonly.${audioOnly ? 'enabled' : 'disabled'}`);
115
+        sendAnalyticsEvent(
116
+            `startaudioonly.${audioOnly ? 'enabled' : 'disabled'}`);
114
         logger.log(`Start audio only set to ${audioOnly.toString()}`);
117
         logger.log(`Start audio only set to ${audioOnly.toString()}`);
115
         dispatch(setAudioOnly(audioOnly));
118
         dispatch(setAudioOnly(audioOnly));
116
     }
119
     }
136
     // not yet in redux state and JitsiTrackEvents.TRACK_MUTE_CHANGED may be
139
     // not yet in redux state and JitsiTrackEvents.TRACK_MUTE_CHANGED may be
137
     // fired before track gets to state.
140
     // fired before track gets to state.
138
     if (track.muted !== muted) {
141
     if (track.muted !== muted) {
139
-        sendEvent(
142
+        sendAnalyticsEvent(
140
             `synctrackstate.${track.mediaType}.${muted ? 'muted' : 'unmuted'}`);
143
             `synctrackstate.${track.mediaType}.${muted ? 'muted' : 'unmuted'}`);
141
         logger.log(`Sync ${track.mediaType} track muted state to ${
144
         logger.log(`Sync ${track.mediaType} track muted state to ${
142
             muted ? 'muted' : 'unmuted'}`);
145
             muted ? 'muted' : 'unmuted'}`);

+ 3
- 2
react/features/base/tracks/actions.js View File

1
-import { sendEvent } from '../../analytics';
1
+import { sendAnalyticsEvent } from '../../analytics';
2
 import { JitsiTrackErrors, JitsiTrackEvents } from '../lib-jitsi-meet';
2
 import { JitsiTrackErrors, JitsiTrackEvents } from '../lib-jitsi-meet';
3
 import {
3
 import {
4
     CAMERA_FACING_MODE,
4
     CAMERA_FACING_MODE,
159
                                     : setAudioMuted;
159
                                     : setAudioMuted;
160
                             const isMuted = newTrack.isMuted();
160
                             const isMuted = newTrack.isMuted();
161
 
161
 
162
-                            sendEvent(`replacetrack.${newTrack.getType()}.${
162
+                            sendAnalyticsEvent(`replacetrack.${
163
+                                newTrack.getType()}.${
163
                                 isMuted ? 'muted' : 'unmuted'}`);
164
                                 isMuted ? 'muted' : 'unmuted'}`);
164
                             logger.log(`Replace ${newTrack.getType()} track - ${
165
                             logger.log(`Replace ${newTrack.getType()} track - ${
165
                                 isMuted ? 'muted' : 'unmuted'}`);
166
                                 isMuted ? 'muted' : 'unmuted'}`);

+ 2
- 2
react/features/feedback/components/FeedbackDialog.web.js View File

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 { sendEvent } from '../../analytics';
7
+import { sendAnalyticsEvent } from '../../analytics';
8
 import { Dialog } from '../../base/dialog';
8
 import { Dialog } from '../../base/dialog';
9
 import { translate } from '../../base/i18n';
9
 import { translate } from '../../base/i18n';
10
 
10
 
145
      * @inheritdoc
145
      * @inheritdoc
146
      */
146
      */
147
     componentDidMount() {
147
     componentDidMount() {
148
-        sendEvent('feedback.open');
148
+        sendAnalyticsEvent('feedback.open');
149
     }
149
     }
150
 
150
 
151
     /**
151
     /**

+ 2
- 2
react/features/invite/components/InviteDialog.web.js View File

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 { sendEvent } from '../../analytics';
5
+import { sendAnalyticsEvent } from '../../analytics';
6
 import { getInviteURL } from '../../base/connection';
6
 import { getInviteURL } from '../../base/connection';
7
 import { Dialog } from '../../base/dialog';
7
 import { Dialog } from '../../base/dialog';
8
 import { translate } from '../../base/i18n';
8
 import { translate } from '../../base/i18n';
51
      * @inheritdoc
51
      * @inheritdoc
52
      */
52
      */
53
     componentWillUnmount() {
53
     componentWillUnmount() {
54
-        sendEvent('toolbar.invite.close');
54
+        sendAnalyticsEvent('toolbar.invite.close');
55
     }
55
     }
56
 
56
 
57
     /**
57
     /**

+ 2
- 2
react/features/mobile/background/actions.js View File

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

+ 2
- 2
react/features/mobile/callkit/middleware.js View File

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 { sendEvent } from '../../analytics';
6
+import { sendAnalyticsEvent } from '../../analytics';
7
 import { APP_WILL_MOUNT, APP_WILL_UNMOUNT, appNavigate } from '../../app';
7
 import { APP_WILL_MOUNT, APP_WILL_UNMOUNT, appNavigate } from '../../app';
8
 import {
8
 import {
9
     CONFERENCE_FAILED,
9
     CONFERENCE_FAILED,
271
         if (oldValue !== newValue) {
271
         if (oldValue !== newValue) {
272
             const value = Boolean(newValue);
272
             const value = Boolean(newValue);
273
 
273
 
274
-            sendEvent(`callkit.audio.${value ? 'muted' : 'unmuted'}`);
274
+            sendAnalyticsEvent(`callkit.audio.${value ? 'muted' : 'unmuted'}`);
275
             dispatch(setAudioMuted(value));
275
             dispatch(setAudioMuted(value));
276
         }
276
         }
277
     }
277
     }

+ 2
- 2
react/features/remote-video-menu/components/KickButton.js View File

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 { sendEvent } from '../../analytics';
5
+import { sendAnalyticsEvent } from '../../analytics';
6
 import { translate } from '../../base/i18n';
6
 import { translate } from '../../base/i18n';
7
 import { kickParticipant } from '../../base/participants';
7
 import { kickParticipant } from '../../base/participants';
8
 
8
 
83
     _onClick() {
83
     _onClick() {
84
         const { dispatch, onClick, participantID } = this.props;
84
         const { dispatch, onClick, participantID } = this.props;
85
 
85
 
86
-        sendEvent(
86
+        sendAnalyticsEvent(
87
             'remotevideomenu.kick',
87
             'remotevideomenu.kick',
88
             {
88
             {
89
                 value: 1,
89
                 value: 1,

+ 2
- 2
react/features/remote-video-menu/components/MuteButton.js View File

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 { sendEvent } from '../../analytics';
5
+import { sendAnalyticsEvent } from '../../analytics';
6
 import { translate } from '../../base/i18n';
6
 import { translate } from '../../base/i18n';
7
 import { muteRemoteParticipant } from '../../base/participants';
7
 import { muteRemoteParticipant } from '../../base/participants';
8
 
8
 
97
     _onClick() {
97
     _onClick() {
98
         const { dispatch, onClick, participantID } = this.props;
98
         const { dispatch, onClick, participantID } = this.props;
99
 
99
 
100
-        sendEvent(
100
+        sendAnalyticsEvent(
101
             'remotevideomenu.mute.clicked',
101
             'remotevideomenu.mute.clicked',
102
             {
102
             {
103
                 value: 1,
103
                 value: 1,

+ 2
- 2
react/features/remote-video-menu/components/RemoteControlButton.js View File

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 { sendEvent } from '../../analytics';
4
+import { sendAnalyticsEvent } from '../../analytics';
5
 import { translate } from '../../base/i18n';
5
 import { translate } from '../../base/i18n';
6
 
6
 
7
 import RemoteVideoMenuButton from './RemoteVideoMenuButton';
7
 import RemoteVideoMenuButton from './RemoteVideoMenuButton';
130
         }
130
         }
131
 
131
 
132
         if (eventName) {
132
         if (eventName) {
133
-            sendEvent(
133
+            sendAnalyticsEvent(
134
                 `remotevideomenu.remotecontrol.${eventName}`,
134
                 `remotevideomenu.remotecontrol.${eventName}`,
135
                 {
135
                 {
136
                     value: 1,
136
                     value: 1,

+ 2
- 2
react/features/toolbox/components/ProfileButton.web.js View File

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 { sendEvent } from '../../analytics';
7
+import { 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
-            sendEvent('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
     }

+ 3
- 3
react/features/toolbox/components/Toolbox.native.js View File

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 { sendEvent } from '../../analytics';
6
+import { sendAnalyticsEvent } from '../../analytics';
7
 import { toggleAudioOnly } from '../../base/conference';
7
 import { toggleAudioOnly } from '../../base/conference';
8
 import {
8
 import {
9
     MEDIA_TYPE,
9
     MEDIA_TYPE,
177
     _onToggleAudio() {
177
     _onToggleAudio() {
178
         const mute = !this.props._audioMuted;
178
         const mute = !this.props._audioMuted;
179
 
179
 
180
-        sendEvent(`toolbar.audio.${mute ? 'muted' : 'unmuted'}`);
180
+        sendAnalyticsEvent(`toolbar.audio.${mute ? 'muted' : 'unmuted'}`);
181
 
181
 
182
         // The user sees the reality i.e. the state of base/tracks and intends
182
         // The user sees the reality i.e. the state of base/tracks and intends
183
         // to change reality by tapping on the respective button i.e. the user
183
         // to change reality by tapping on the respective button i.e. the user
200
     _onToggleVideo() {
200
     _onToggleVideo() {
201
         const mute = !this.props._videoMuted;
201
         const mute = !this.props._videoMuted;
202
 
202
 
203
-        sendEvent(`toolbar.video.${mute ? 'muted' : 'unmuted'}`);
203
+        sendAnalyticsEvent(`toolbar.video.${mute ? 'muted' : 'unmuted'}`);
204
 
204
 
205
         // The user sees the reality i.e. the state of base/tracks and intends
205
         // The user sees the reality i.e. the state of base/tracks and intends
206
         // to change reality by tapping on the respective button i.e. the user
206
         // to change reality by tapping on the respective button i.e. the user

+ 24
- 24
react/features/toolbox/defaultToolbarButtons.web.js View File

2
 
2
 
3
 import React from 'react';
3
 import React from 'react';
4
 
4
 
5
-import { sendEvent } from '../analytics';
5
+import { sendAnalyticsEvent } from '../analytics';
6
 import { ParticipantCounter } from '../contact-list';
6
 import { ParticipantCounter } from '../contact-list';
7
 import { openDeviceSelectionDialog } from '../device-selection';
7
 import { openDeviceSelectionDialog } from '../device-selection';
8
 import { InfoDialogButton, openInviteDialog } from '../invite';
8
 import { InfoDialogButton, openInviteDialog } from '../invite';
42
                 const newVideoMutedState = !APP.conference.isLocalVideoMuted();
42
                 const newVideoMutedState = !APP.conference.isLocalVideoMuted();
43
 
43
 
44
                 if (newVideoMutedState) {
44
                 if (newVideoMutedState) {
45
-                    sendEvent('toolbar.video.enabled');
45
+                    sendAnalyticsEvent('toolbar.video.enabled');
46
                 } else {
46
                 } else {
47
-                    sendEvent('toolbar.video.disabled');
47
+                    sendAnalyticsEvent('toolbar.video.disabled');
48
                 }
48
                 }
49
                 APP.UI.emitEvent(UIEvents.VIDEO_MUTED, newVideoMutedState);
49
                 APP.UI.emitEvent(UIEvents.VIDEO_MUTED, newVideoMutedState);
50
             },
50
             },
64
                     return;
64
                     return;
65
                 }
65
                 }
66
 
66
 
67
-                sendEvent('shortcut.videomute.toggled');
67
+                sendAnalyticsEvent('shortcut.videomute.toggled');
68
                 APP.conference.toggleVideoMuted();
68
                 APP.conference.toggleVideoMuted();
69
             },
69
             },
70
             shortcutDescription: 'keyboardShortcuts.videoMute',
70
             shortcutDescription: 'keyboardShortcuts.videoMute',
81
                 <span id = 'unreadMessages' /></span>,
81
                 <span id = 'unreadMessages' /></span>,
82
             id: 'toolbar_button_chat',
82
             id: 'toolbar_button_chat',
83
             onClick() {
83
             onClick() {
84
-                sendEvent('toolbar.chat.toggled');
84
+                sendAnalyticsEvent('toolbar.chat.toggled');
85
                 APP.UI.emitEvent(UIEvents.TOGGLE_CHAT);
85
                 APP.UI.emitEvent(UIEvents.TOGGLE_CHAT);
86
             },
86
             },
87
             shortcut: 'C',
87
             shortcut: 'C',
88
             shortcutAttr: 'toggleChatPopover',
88
             shortcutAttr: 'toggleChatPopover',
89
             shortcutFunc() {
89
             shortcutFunc() {
90
-                sendEvent('shortcut.chat.toggled');
90
+                sendAnalyticsEvent('shortcut.chat.toggled');
91
                 APP.UI.toggleChat();
91
                 APP.UI.toggleChat();
92
             },
92
             },
93
             shortcutDescription: 'keyboardShortcuts.toggleChat',
93
             shortcutDescription: 'keyboardShortcuts.toggleChat',
104
             enabled: true,
104
             enabled: true,
105
             id: 'toolbar_contact_list',
105
             id: 'toolbar_contact_list',
106
             onClick() {
106
             onClick() {
107
-                sendEvent(
107
+                sendAnalyticsEvent(
108
                     'toolbar.contacts.toggled');
108
                     'toolbar.contacts.toggled');
109
                 APP.UI.emitEvent(UIEvents.TOGGLE_CONTACT_LIST);
109
                 APP.UI.emitEvent(UIEvents.TOGGLE_CONTACT_LIST);
110
             },
110
             },
121
             id: 'toolbar_button_desktopsharing',
121
             id: 'toolbar_button_desktopsharing',
122
             onClick() {
122
             onClick() {
123
                 if (APP.conference.isSharingScreen) {
123
                 if (APP.conference.isSharingScreen) {
124
-                    sendEvent('toolbar.screen.disabled');
124
+                    sendAnalyticsEvent('toolbar.screen.disabled');
125
                 } else {
125
                 } else {
126
-                    sendEvent('toolbar.screen.enabled');
126
+                    sendAnalyticsEvent('toolbar.screen.enabled');
127
                 }
127
                 }
128
                 APP.UI.emitEvent(UIEvents.TOGGLE_SCREENSHARING);
128
                 APP.UI.emitEvent(UIEvents.TOGGLE_SCREENSHARING);
129
             },
129
             },
137
             shortcut: 'D',
137
             shortcut: 'D',
138
             shortcutAttr: 'toggleDesktopSharingPopover',
138
             shortcutAttr: 'toggleDesktopSharingPopover',
139
             shortcutFunc() {
139
             shortcutFunc() {
140
-                sendEvent('shortcut.screen.toggled');
140
+                sendAnalyticsEvent('shortcut.screen.toggled');
141
 
141
 
142
                 // eslint-disable-next-line no-empty-function
142
                 // eslint-disable-next-line no-empty-function
143
                 APP.conference.toggleScreenSharing().catch(() => {});
143
                 APP.conference.toggleScreenSharing().catch(() => {});
157
             },
157
             },
158
             id: 'toolbar_button_fodeviceselection',
158
             id: 'toolbar_button_fodeviceselection',
159
             onClick(dispatch: Function) {
159
             onClick(dispatch: Function) {
160
-                sendEvent(
160
+                sendAnalyticsEvent(
161
                     'toolbar.fodeviceselection.toggled');
161
                     'toolbar.fodeviceselection.toggled');
162
 
162
 
163
                 dispatch(openDeviceSelectionDialog());
163
                 dispatch(openDeviceSelectionDialog());
177
             hidden: true,
177
             hidden: true,
178
             id: 'toolbar_button_dialpad',
178
             id: 'toolbar_button_dialpad',
179
             onClick() {
179
             onClick() {
180
-                sendEvent('toolbar.sip.dialpad.clicked');
180
+                sendAnalyticsEvent('toolbar.sip.dialpad.clicked');
181
             },
181
             },
182
             tooltipKey: 'toolbar.dialpad'
182
             tooltipKey: 'toolbar.dialpad'
183
         },
183
         },
191
             hidden: true,
191
             hidden: true,
192
             id: 'toolbar_button_etherpad',
192
             id: 'toolbar_button_etherpad',
193
             onClick() {
193
             onClick() {
194
-                sendEvent('toolbar.etherpad.clicked');
194
+                sendAnalyticsEvent('toolbar.etherpad.clicked');
195
                 APP.UI.emitEvent(UIEvents.ETHERPAD_CLICKED);
195
                 APP.UI.emitEvent(UIEvents.ETHERPAD_CLICKED);
196
             },
196
             },
197
             tooltipKey: 'toolbar.etherpad'
197
             tooltipKey: 'toolbar.etherpad'
205
             enabled: true,
205
             enabled: true,
206
             id: 'toolbar_button_fullScreen',
206
             id: 'toolbar_button_fullScreen',
207
             onClick() {
207
             onClick() {
208
-                sendEvent('toolbar.fullscreen.enabled');
208
+                sendAnalyticsEvent('toolbar.fullscreen.enabled');
209
 
209
 
210
                 APP.UI.emitEvent(UIEvents.TOGGLE_FULLSCREEN);
210
                 APP.UI.emitEvent(UIEvents.TOGGLE_FULLSCREEN);
211
             },
211
             },
213
             shortcutAttr: 'toggleFullscreenPopover',
213
             shortcutAttr: 'toggleFullscreenPopover',
214
             shortcutDescription: 'keyboardShortcuts.fullScreen',
214
             shortcutDescription: 'keyboardShortcuts.fullScreen',
215
             shortcutFunc() {
215
             shortcutFunc() {
216
-                sendEvent('shortcut.fullscreen.toggled');
216
+                sendAnalyticsEvent('shortcut.fullscreen.toggled');
217
                 APP.UI.toggleFullScreen();
217
                 APP.UI.toggleFullScreen();
218
             },
218
             },
219
             tooltipKey: 'toolbar.fullscreen'
219
             tooltipKey: 'toolbar.fullscreen'
229
             isDisplayed: () => true,
229
             isDisplayed: () => true,
230
             id: 'toolbar_button_hangup',
230
             id: 'toolbar_button_hangup',
231
             onClick() {
231
             onClick() {
232
-                sendEvent('toolbar.hangup');
232
+                sendAnalyticsEvent('toolbar.hangup');
233
                 APP.UI.emitEvent(UIEvents.HANGUP);
233
                 APP.UI.emitEvent(UIEvents.HANGUP);
234
             },
234
             },
235
             tooltipKey: 'toolbar.hangup'
235
             tooltipKey: 'toolbar.hangup'
252
             enabled: true,
252
             enabled: true,
253
             id: 'toolbar_button_link',
253
             id: 'toolbar_button_link',
254
             onClick(dispatch: Function) {
254
             onClick(dispatch: Function) {
255
-                sendEvent('toolbar.invite.clicked');
255
+                sendAnalyticsEvent('toolbar.invite.clicked');
256
 
256
 
257
                 dispatch(openInviteDialog());
257
                 dispatch(openInviteDialog());
258
             },
258
             },
280
                         APP.UI.showCustomToolbarPopup(
280
                         APP.UI.showCustomToolbarPopup(
281
                             'microphone', 'unableToUnmutePopup', true, 5000);
281
                             'microphone', 'unableToUnmutePopup', true, 5000);
282
                     } else {
282
                     } else {
283
-                        sendEvent('toolbar.audio.unmuted');
283
+                        sendAnalyticsEvent('toolbar.audio.unmuted');
284
                         APP.UI.emitEvent(UIEvents.AUDIO_MUTED, false, true);
284
                         APP.UI.emitEvent(UIEvents.AUDIO_MUTED, false, true);
285
                     }
285
                     }
286
                 } else {
286
                 } else {
287
-                    sendEvent('toolbar.audio.muted');
287
+                    sendAnalyticsEvent('toolbar.audio.muted');
288
                     APP.UI.emitEvent(UIEvents.AUDIO_MUTED, true, true);
288
                     APP.UI.emitEvent(UIEvents.AUDIO_MUTED, true, true);
289
                 }
289
                 }
290
             },
290
             },
305
             shortcut: 'M',
305
             shortcut: 'M',
306
             shortcutAttr: 'mutePopover',
306
             shortcutAttr: 'mutePopover',
307
             shortcutFunc() {
307
             shortcutFunc() {
308
-                sendEvent('shortcut.audiomute.toggled');
308
+                sendAnalyticsEvent('shortcut.audiomute.toggled');
309
                 APP.conference.toggleAudioMuted();
309
                 APP.conference.toggleAudioMuted();
310
             },
310
             },
311
             shortcutDescription: 'keyboardShortcuts.mute',
311
             shortcutDescription: 'keyboardShortcuts.mute',
328
             enabled: true,
328
             enabled: true,
329
             id: 'toolbar_button_raisehand',
329
             id: 'toolbar_button_raisehand',
330
             onClick() {
330
             onClick() {
331
-                sendEvent('toolbar.raiseHand.clicked');
331
+                sendAnalyticsEvent('toolbar.raiseHand.clicked');
332
                 APP.conference.maybeToggleRaisedHand();
332
                 APP.conference.maybeToggleRaisedHand();
333
             },
333
             },
334
             shortcut: 'R',
334
             shortcut: 'R',
335
             shortcutAttr: 'raiseHandPopover',
335
             shortcutAttr: 'raiseHandPopover',
336
             shortcutDescription: 'keyboardShortcuts.raiseHand',
336
             shortcutDescription: 'keyboardShortcuts.raiseHand',
337
             shortcutFunc() {
337
             shortcutFunc() {
338
-                sendEvent('shortcut.raisehand.clicked');
338
+                sendAnalyticsEvent('shortcut.raisehand.clicked');
339
                 APP.conference.maybeToggleRaisedHand();
339
                 APP.conference.maybeToggleRaisedHand();
340
             },
340
             },
341
             tooltipKey: 'toolbar.raiseHand'
341
             tooltipKey: 'toolbar.raiseHand'
363
             enabled: true,
363
             enabled: true,
364
             id: 'toolbar_button_settings',
364
             id: 'toolbar_button_settings',
365
             onClick() {
365
             onClick() {
366
-                sendEvent('toolbar.settings.toggled');
366
+                sendAnalyticsEvent('toolbar.settings.toggled');
367
                 APP.UI.emitEvent(UIEvents.TOGGLE_SETTINGS);
367
                 APP.UI.emitEvent(UIEvents.TOGGLE_SETTINGS);
368
             },
368
             },
369
             sideContainerId: 'settings_container',
369
             sideContainerId: 'settings_container',
378
             enabled: true,
378
             enabled: true,
379
             id: 'toolbar_button_sharedvideo',
379
             id: 'toolbar_button_sharedvideo',
380
             onClick() {
380
             onClick() {
381
-                sendEvent('toolbar.sharedvideo.clicked');
381
+                sendAnalyticsEvent('toolbar.sharedvideo.clicked');
382
                 APP.UI.emitEvent(UIEvents.SHARED_VIDEO_CLICKED);
382
                 APP.UI.emitEvent(UIEvents.SHARED_VIDEO_CLICKED);
383
             },
383
             },
384
             popups: [
384
             popups: [

+ 5
- 5
react/features/video-quality/components/VideoQualityDialog.web.js View File

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 { sendEvent } from '../../analytics';
6
+import { sendAnalyticsEvent } from '../../analytics';
7
 import {
7
 import {
8
     setAudioOnly,
8
     setAudioOnly,
9
     setReceiveVideoQuality,
9
     setReceiveVideoQuality,
214
      * @returns {void}
214
      * @returns {void}
215
      */
215
      */
216
     _enableAudioOnly() {
216
     _enableAudioOnly() {
217
-        sendEvent('toolbar.audioonly.enabled');
217
+        sendAnalyticsEvent('toolbar.audioonly.enabled');
218
         logger.log('Video quality: audio only enabled');
218
         logger.log('Video quality: audio only enabled');
219
         this.props.dispatch(setAudioOnly(true));
219
         this.props.dispatch(setAudioOnly(true));
220
     }
220
     }
227
      * @returns {void}
227
      * @returns {void}
228
      */
228
      */
229
     _enableHighDefinition() {
229
     _enableHighDefinition() {
230
-        sendEvent('toolbar.videoquality.high');
230
+        sendAnalyticsEvent('toolbar.videoquality.high');
231
         logger.log('Video quality: high enabled');
231
         logger.log('Video quality: high enabled');
232
         this.props.dispatch(setReceiveVideoQuality(HIGH));
232
         this.props.dispatch(setReceiveVideoQuality(HIGH));
233
     }
233
     }
240
      * @returns {void}
240
      * @returns {void}
241
      */
241
      */
242
     _enableLowDefinition() {
242
     _enableLowDefinition() {
243
-        sendEvent('toolbar.videoquality.low');
243
+        sendAnalyticsEvent('toolbar.videoquality.low');
244
         logger.log('Video quality: low enabled');
244
         logger.log('Video quality: low enabled');
245
         this.props.dispatch(setReceiveVideoQuality(LOW));
245
         this.props.dispatch(setReceiveVideoQuality(LOW));
246
     }
246
     }
253
      * @returns {void}
253
      * @returns {void}
254
      */
254
      */
255
     _enableStandardDefinition() {
255
     _enableStandardDefinition() {
256
-        sendEvent('toolbar.videoquality.standard');
256
+        sendAnalyticsEvent('toolbar.videoquality.standard');
257
         logger.log('Video quality: standard enabled');
257
         logger.log('Video quality: standard enabled');
258
         this.props.dispatch(setReceiveVideoQuality(STANDARD));
258
         this.props.dispatch(setReceiveVideoQuality(STANDARD));
259
     }
259
     }

Loading…
Cancel
Save