浏览代码

style(analytics): sendEvent -> sendAnalyticsEvent

j8
hristoterezov 8 年前
父节点
当前提交
0b50578de9

+ 13
- 13
conference.js 查看文件

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -8,7 +8,7 @@ import { getJitsiMeetGlobalNS, loadScript } from '../base/util';
8 8
 
9 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 14
  * Loads the analytics scripts and inits JitsiMeetJS.analytics by setting

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

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

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

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

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

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

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

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

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

@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
4 4
 import React, { Component } from 'react';
5 5
 import { connect } from 'react-redux';
6 6
 
7
-import { sendEvent } from '../../analytics';
7
+import { sendAnalyticsEvent } from '../../analytics';
8 8
 import { Dialog } from '../../base/dialog';
9 9
 import { translate } from '../../base/i18n';
10 10
 
@@ -145,7 +145,7 @@ class FeedbackDialog extends Component {
145 145
      * @inheritdoc
146 146
      */
147 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 查看文件

@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
2 2
 import React, { Component } from 'react';
3 3
 import { connect } from 'react-redux';
4 4
 
5
-import { sendEvent } from '../../analytics';
5
+import { sendAnalyticsEvent } from '../../analytics';
6 6
 import { getInviteURL } from '../../base/connection';
7 7
 import { Dialog } from '../../base/dialog';
8 8
 import { translate } from '../../base/i18n';
@@ -51,7 +51,7 @@ class InviteDialog extends Component {
51 51
      * @inheritdoc
52 52
      */
53 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 查看文件

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

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

@@ -3,7 +3,7 @@
3 3
 import { NativeModules } from 'react-native';
4 4
 import uuid from 'uuid';
5 5
 
6
-import { sendEvent } from '../../analytics';
6
+import { sendAnalyticsEvent } from '../../analytics';
7 7
 import { APP_WILL_MOUNT, APP_WILL_UNMOUNT, appNavigate } from '../../app';
8 8
 import {
9 9
     CONFERENCE_FAILED,
@@ -271,7 +271,7 @@ function _onPerformSetMutedCallAction({ callUUID, muted: newValue }) {
271 271
         if (oldValue !== newValue) {
272 272
             const value = Boolean(newValue);
273 273
 
274
-            sendEvent(`callkit.audio.${value ? 'muted' : 'unmuted'}`);
274
+            sendAnalyticsEvent(`callkit.audio.${value ? 'muted' : 'unmuted'}`);
275 275
             dispatch(setAudioMuted(value));
276 276
         }
277 277
     }

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

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

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

@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
2 2
 import React, { Component } from 'react';
3 3
 import { connect } from 'react-redux';
4 4
 
5
-import { sendEvent } from '../../analytics';
5
+import { sendAnalyticsEvent } from '../../analytics';
6 6
 import { translate } from '../../base/i18n';
7 7
 import { muteRemoteParticipant } from '../../base/participants';
8 8
 
@@ -97,7 +97,7 @@ class MuteButton extends Component {
97 97
     _onClick() {
98 98
         const { dispatch, onClick, participantID } = this.props;
99 99
 
100
-        sendEvent(
100
+        sendAnalyticsEvent(
101 101
             'remotevideomenu.mute.clicked',
102 102
             {
103 103
                 value: 1,

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

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

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

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

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

@@ -3,7 +3,7 @@ import React, { Component } from 'react';
3 3
 import { View } from 'react-native';
4 4
 import { connect } from 'react-redux';
5 5
 
6
-import { sendEvent } from '../../analytics';
6
+import { sendAnalyticsEvent } from '../../analytics';
7 7
 import { toggleAudioOnly } from '../../base/conference';
8 8
 import {
9 9
     MEDIA_TYPE,
@@ -177,7 +177,7 @@ class Toolbox extends Component {
177 177
     _onToggleAudio() {
178 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 182
         // The user sees the reality i.e. the state of base/tracks and intends
183 183
         // to change reality by tapping on the respective button i.e. the user
@@ -200,7 +200,7 @@ class Toolbox extends Component {
200 200
     _onToggleVideo() {
201 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 205
         // The user sees the reality i.e. the state of base/tracks and intends
206 206
         // to change reality by tapping on the respective button i.e. the user

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

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

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

@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3 3
 import React, { Component } from 'react';
4 4
 import { connect } from 'react-redux';
5 5
 
6
-import { sendEvent } from '../../analytics';
6
+import { sendAnalyticsEvent } from '../../analytics';
7 7
 import {
8 8
     setAudioOnly,
9 9
     setReceiveVideoQuality,
@@ -214,7 +214,7 @@ class VideoQualityDialog extends Component {
214 214
      * @returns {void}
215 215
      */
216 216
     _enableAudioOnly() {
217
-        sendEvent('toolbar.audioonly.enabled');
217
+        sendAnalyticsEvent('toolbar.audioonly.enabled');
218 218
         logger.log('Video quality: audio only enabled');
219 219
         this.props.dispatch(setAudioOnly(true));
220 220
     }
@@ -227,7 +227,7 @@ class VideoQualityDialog extends Component {
227 227
      * @returns {void}
228 228
      */
229 229
     _enableHighDefinition() {
230
-        sendEvent('toolbar.videoquality.high');
230
+        sendAnalyticsEvent('toolbar.videoquality.high');
231 231
         logger.log('Video quality: high enabled');
232 232
         this.props.dispatch(setReceiveVideoQuality(HIGH));
233 233
     }
@@ -240,7 +240,7 @@ class VideoQualityDialog extends Component {
240 240
      * @returns {void}
241 241
      */
242 242
     _enableLowDefinition() {
243
-        sendEvent('toolbar.videoquality.low');
243
+        sendAnalyticsEvent('toolbar.videoquality.low');
244 244
         logger.log('Video quality: low enabled');
245 245
         this.props.dispatch(setReceiveVideoQuality(LOW));
246 246
     }
@@ -253,7 +253,7 @@ class VideoQualityDialog extends Component {
253 253
      * @returns {void}
254 254
      */
255 255
     _enableStandardDefinition() {
256
-        sendEvent('toolbar.videoquality.standard');
256
+        sendAnalyticsEvent('toolbar.videoquality.standard');
257 257
         logger.log('Video quality: standard enabled');
258 258
         this.props.dispatch(setReceiveVideoQuality(STANDARD));
259 259
     }

正在加载...
取消
保存