Przeglądaj źródła

Merge pull request #777 from jitsi/analytics-move2

Moves loading of analytics in the library.
j8
hristoterezov 9 lat temu
rodzic
commit
97b9b67768

+ 1
- 0
Makefile Wyświetl plik

34
 	$(OUTPUT_DIR)/app.bundle.js $(OUTPUT_DIR)/app.bundle.js.map \
34
 	$(OUTPUT_DIR)/app.bundle.js $(OUTPUT_DIR)/app.bundle.js.map \
35
 	$(OUTPUT_DIR)/external_api.js.map $(OUTPUT_DIR)/external_api.js \
35
 	$(OUTPUT_DIR)/external_api.js.map $(OUTPUT_DIR)/external_api.js \
36
 	$(OUTPUT_DIR)/external_api.min.map $(OUTPUT_DIR)/external_api.min.js \
36
 	$(OUTPUT_DIR)/external_api.min.map $(OUTPUT_DIR)/external_api.min.js \
37
+	$(OUTPUT_DIR)/analytics.js \
37
 	$(DEPLOY_DIR)
38
 	$(DEPLOY_DIR)
38
 
39
 
39
 deploy-lib-jitsi-meet:
40
 deploy-lib-jitsi-meet:

+ 10
- 7
conference.js Wyświetl plik

13
 import UIEvents from './service/UI/UIEvents';
13
 import UIEvents from './service/UI/UIEvents';
14
 
14
 
15
 import mediaDeviceHelper from './modules/devices/mediaDeviceHelper';
15
 import mediaDeviceHelper from './modules/devices/mediaDeviceHelper';
16
-import AnalyticsAdapter from './modules/statistics/AnalyticsAdapter';
17
 
16
 
18
 import {reportError} from './modules/util/helpers';
17
 import {reportError} from './modules/util/helpers';
19
 
18
 
896
                 return this.useVideoStream(stream);
895
                 return this.useVideoStream(stream);
897
             }).then(() => {
896
             }).then(() => {
898
                 this.videoSwitchInProgress = false;
897
                 this.videoSwitchInProgress = false;
899
-                AnalyticsAdapter.sendEvent('conference.sharingDesktop.start');
898
+                JitsiMeetJS.analytics.sendEvent(
899
+                    'conference.sharingDesktop.start');
900
                 console.log('sharing local desktop');
900
                 console.log('sharing local desktop');
901
             }).catch((err) => {
901
             }).catch((err) => {
902
                 this.videoSwitchInProgress = false;
902
                 this.videoSwitchInProgress = false;
942
                 ([stream]) => this.useVideoStream(stream)
942
                 ([stream]) => this.useVideoStream(stream)
943
             ).then(() => {
943
             ).then(() => {
944
                 this.videoSwitchInProgress = false;
944
                 this.videoSwitchInProgress = false;
945
-                AnalyticsAdapter.sendEvent('conference.sharingDesktop.stop');
945
+                JitsiMeetJS.analytics.sendEvent(
946
+                    'conference.sharingDesktop.stop');
946
                 console.log('sharing local video');
947
                 console.log('sharing local video');
947
             }).catch((err) => {
948
             }).catch((err) => {
948
                 this.useVideoStream(null);
949
                 this.useVideoStream(null);
1306
             try {
1307
             try {
1307
                 room.selectParticipant(id);
1308
                 room.selectParticipant(id);
1308
             } catch (e) {
1309
             } catch (e) {
1309
-                AnalyticsAdapter.sendEvent('selectParticipant.failed');
1310
+                JitsiMeetJS.analytics.sendEvent('selectParticipant.failed');
1310
                 reportError(e);
1311
                 reportError(e);
1311
             }
1312
             }
1312
         });
1313
         });
1331
         APP.UI.addListener(
1332
         APP.UI.addListener(
1332
             UIEvents.VIDEO_DEVICE_CHANGED,
1333
             UIEvents.VIDEO_DEVICE_CHANGED,
1333
             (cameraDeviceId) => {
1334
             (cameraDeviceId) => {
1334
-                AnalyticsAdapter.sendEvent('settings.changeDevice.video');
1335
+                JitsiMeetJS.analytics.sendEvent('settings.changeDevice.video');
1335
                 createLocalTracks({
1336
                 createLocalTracks({
1336
                     devices: ['video'],
1337
                     devices: ['video'],
1337
                     cameraDeviceId: cameraDeviceId,
1338
                     cameraDeviceId: cameraDeviceId,
1352
         APP.UI.addListener(
1353
         APP.UI.addListener(
1353
             UIEvents.AUDIO_DEVICE_CHANGED,
1354
             UIEvents.AUDIO_DEVICE_CHANGED,
1354
             (micDeviceId) => {
1355
             (micDeviceId) => {
1355
-                AnalyticsAdapter.sendEvent('settings.changeDevice.audioIn');
1356
+                JitsiMeetJS.analytics.sendEvent(
1357
+                    'settings.changeDevice.audioIn');
1356
                 createLocalTracks({
1358
                 createLocalTracks({
1357
                     devices: ['audio'],
1359
                     devices: ['audio'],
1358
                     cameraDeviceId: null,
1360
                     cameraDeviceId: null,
1373
         APP.UI.addListener(
1375
         APP.UI.addListener(
1374
             UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED,
1376
             UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED,
1375
             (audioOutputDeviceId) => {
1377
             (audioOutputDeviceId) => {
1376
-                AnalyticsAdapter.sendEvent('settings.changeDevice.audioOut');
1378
+                JitsiMeetJS.analytics.sendEvent(
1379
+                    'settings.changeDevice.audioOut');
1377
                 APP.settings.setAudioOutputDeviceId(audioOutputDeviceId)
1380
                 APP.settings.setAudioOutputDeviceId(audioOutputDeviceId)
1378
                     .then(() => console.log('changed audio output device'))
1381
                     .then(() => console.log('changed audio output device'))
1379
                     .catch((err) => {
1382
                     .catch((err) => {

+ 3
- 4
modules/UI/Feedback.js Wyświetl plik

1
-/* global $, APP, config, interfaceConfig */
1
+/* global $, APP, config, interfaceConfig, JitsiMeetJS */
2
 import UIEvents from "../../service/UI/UIEvents";
2
 import UIEvents from "../../service/UI/UIEvents";
3
-import AnalyticsAdapter from '../statistics/AnalyticsAdapter';
4
 
3
 
5
 /**
4
 /**
6
  * Constructs the html for the overall feedback window.
5
  * Constructs the html for the overall feedback window.
201
                             = document.getElementById("feedbackTextArea").value;
200
                             = document.getElementById("feedbackTextArea").value;
202
 
201
 
203
                         if (feedbackDetails && feedbackDetails.length > 0) {
202
                         if (feedbackDetails && feedbackDetails.length > 0) {
204
-                            AnalyticsAdapter.sendEvent(
203
+                            JitsiMeetJS.analytics.sendEvent(
205
                                 'feedback.rating', Feedback.feedbackScore);
204
                                 'feedback.rating', Feedback.feedbackScore);
206
                             APP.conference.sendFeedback( Feedback.feedbackScore,
205
                             APP.conference.sendFeedback( Feedback.feedbackScore,
207
                                                     feedbackDetails);
206
                                                     feedbackDetails);
231
                     closeText: '',
230
                     closeText: '',
232
                     loaded: onLoadFunction,
231
                     loaded: onLoadFunction,
233
                     position: {width: 500}}, null);
232
                     position: {width: 500}}, null);
234
-        AnalyticsAdapter.sendEvent('feedback.open');
233
+        JitsiMeetJS.analytics.sendEvent('feedback.open');
235
     },
234
     },
236
     /**
235
     /**
237
      * Toggles the appropriate css class for the given number of stars, to
236
      * Toggles the appropriate css class for the given number of stars, to

+ 2
- 4
modules/UI/authentication/RoomLocker.js Wyświetl plik

1
 /* global APP, JitsiMeetJS */
1
 /* global APP, JitsiMeetJS */
2
 import UIUtil from '../util/UIUtil';
2
 import UIUtil from '../util/UIUtil';
3
-//FIXME:
4
-import AnalyticsAdapter from '../../statistics/AnalyticsAdapter';
5
 
3
 
6
 /**
4
 /**
7
  * Show dialog which asks user for new password for the conference.
5
  * Show dialog which asks user for new password for the conference.
152
             return askToUnlock().then(
150
             return askToUnlock().then(
153
                 () => { return lock(); }
151
                 () => { return lock(); }
154
             ).then(function () {
152
             ).then(function () {
155
-                AnalyticsAdapter.sendEvent('toolbar.lock.disabled');
153
+                JitsiMeetJS.analytics.sendEvent('toolbar.lock.disabled');
156
             }).catch(
154
             }).catch(
157
                 reason => {
155
                 reason => {
158
                     if (reason !== APP.UI.messageHandler.CANCEL)
156
                     if (reason !== APP.UI.messageHandler.CANCEL)
170
             return askForNewPassword().then(
168
             return askForNewPassword().then(
171
                 newPass => { return lock(newPass);}
169
                 newPass => { return lock(newPass);}
172
             ).then(function () {
170
             ).then(function () {
173
-                AnalyticsAdapter.sendEvent('toolbar.lock.enabled');
171
+                JitsiMeetJS.analytics.sendEvent('toolbar.lock.enabled');
174
             }).catch(
172
             }).catch(
175
                 reason => {
173
                 reason => {
176
                     if (reason !== APP.UI.messageHandler.CANCEL)
174
                     if (reason !== APP.UI.messageHandler.CANCEL)

+ 12
- 9
modules/UI/recording/Recording.js Wyświetl plik

1
-/* global APP, $, config, interfaceConfig */
1
+/* global APP, $, config, interfaceConfig, JitsiMeetJS */
2
 /*
2
 /*
3
  * Copyright @ 2015 Atlassian Pty Ltd
3
  * Copyright @ 2015 Atlassian Pty Ltd
4
  *
4
  *
20
 import Feedback from '../Feedback.js';
20
 import Feedback from '../Feedback.js';
21
 import Toolbar from '../toolbars/Toolbar';
21
 import Toolbar from '../toolbars/Toolbar';
22
 import BottomToolbar from '../toolbars/BottomToolbar';
22
 import BottomToolbar from '../toolbars/BottomToolbar';
23
-import AnalyticsAdapter from '../../statistics/AnalyticsAdapter';
24
 
23
 
25
 /**
24
 /**
26
  * The dialog for user input.
25
  * The dialog for user input.
307
         selector.click(function () {
306
         selector.click(function () {
308
             if (dialog)
307
             if (dialog)
309
                 return;
308
                 return;
310
-            AnalyticsAdapter.sendEvent('recording.clicked');
309
+            JitsiMeetJS.analytics.sendEvent('recording.clicked');
311
             switch (self.currentState) {
310
             switch (self.currentState) {
312
                 case Status.ON:
311
                 case Status.ON:
313
                 case Status.RETRYING:
312
                 case Status.RETRYING:
315
                     _showStopRecordingPrompt(recordingType).then(
314
                     _showStopRecordingPrompt(recordingType).then(
316
                         () => {
315
                         () => {
317
                             self.eventEmitter.emit(UIEvents.RECORDING_TOGGLED);
316
                             self.eventEmitter.emit(UIEvents.RECORDING_TOGGLED);
318
-                            AnalyticsAdapter.sendEvent('recording.stopped');
317
+                            JitsiMeetJS.analytics.sendEvent(
318
+                                'recording.stopped');
319
                         },
319
                         },
320
                         () => {});
320
                         () => {});
321
                     break;
321
                     break;
326
                         _requestLiveStreamId().then((streamId) => {
326
                         _requestLiveStreamId().then((streamId) => {
327
                             self.eventEmitter.emit( UIEvents.RECORDING_TOGGLED,
327
                             self.eventEmitter.emit( UIEvents.RECORDING_TOGGLED,
328
                                 {streamId: streamId});
328
                                 {streamId: streamId});
329
-                            AnalyticsAdapter.sendEvent('recording.started');
329
+                            JitsiMeetJS.analytics.sendEvent(
330
+                                'recording.started');
330
                         }).catch(
331
                         }).catch(
331
                             reason => {
332
                             reason => {
332
                                 if (reason !== APP.UI.messageHandler.CANCEL)
333
                                 if (reason !== APP.UI.messageHandler.CANCEL)
333
                                     console.error(reason);
334
                                     console.error(reason);
334
                                 else
335
                                 else
335
-                                    AnalyticsAdapter.sendEvent(
336
+                                    JitsiMeetJS.analytics.sendEvent(
336
                                         'recording.canceled');
337
                                         'recording.canceled');
337
                             }
338
                             }
338
                         );
339
                         );
340
                         if (self.predefinedToken) {
341
                         if (self.predefinedToken) {
341
                             self.eventEmitter.emit( UIEvents.RECORDING_TOGGLED,
342
                             self.eventEmitter.emit( UIEvents.RECORDING_TOGGLED,
342
                                 {token: self.predefinedToken});
343
                                 {token: self.predefinedToken});
343
-                            AnalyticsAdapter.sendEvent('recording.started');
344
+                            JitsiMeetJS.analytics.sendEvent(
345
+                                'recording.started');
344
                             return;
346
                             return;
345
                         }
347
                         }
346
 
348
 
347
                         _requestRecordingToken().then((token) => {
349
                         _requestRecordingToken().then((token) => {
348
                             self.eventEmitter.emit( UIEvents.RECORDING_TOGGLED,
350
                             self.eventEmitter.emit( UIEvents.RECORDING_TOGGLED,
349
                                 {token: token});
351
                                 {token: token});
350
-                            AnalyticsAdapter.sendEvent('recording.started');
352
+                            JitsiMeetJS.analytics.sendEvent(
353
+                                'recording.started');
351
                         }).catch(
354
                         }).catch(
352
                             reason => {
355
                             reason => {
353
                                 if (reason !== APP.UI.messageHandler.CANCEL)
356
                                 if (reason !== APP.UI.messageHandler.CANCEL)
354
                                     console.error(reason);
357
                                     console.error(reason);
355
                                 else
358
                                 else
356
-                                    AnalyticsAdapter.sendEvent(
359
+                                    JitsiMeetJS.analytics.sendEvent(
357
                                         'recording.canceled');
360
                                         'recording.canceled');
358
                             }
361
                             }
359
                         );
362
                         );

+ 8
- 8
modules/UI/shared_video/SharedVideo.js Wyświetl plik

1
-/* global $, APP, YT, onPlayerReady, onPlayerStateChange, onPlayerError */
1
+/* global $, APP, YT, onPlayerReady, onPlayerStateChange, onPlayerError,
2
+JitsiMeetJS */
2
 
3
 
3
 import UIUtil from '../util/UIUtil';
4
 import UIUtil from '../util/UIUtil';
4
 import UIEvents from '../../../service/UI/UIEvents';
5
 import UIEvents from '../../../service/UI/UIEvents';
8
 import SmallVideo from '../videolayout/SmallVideo';
9
 import SmallVideo from '../videolayout/SmallVideo';
9
 import FilmStrip from '../videolayout/FilmStrip';
10
 import FilmStrip from '../videolayout/FilmStrip';
10
 import ToolbarToggler from "../toolbars/ToolbarToggler";
11
 import ToolbarToggler from "../toolbars/ToolbarToggler";
11
-import AnalyticsAdapter from '../../statistics/AnalyticsAdapter';
12
 
12
 
13
 export const SHARED_VIDEO_CONTAINER_TYPE = "sharedvideo";
13
 export const SHARED_VIDEO_CONTAINER_TYPE = "sharedvideo";
14
 
14
 
72
                     url => {
72
                     url => {
73
                         this.emitter.emit(
73
                         this.emitter.emit(
74
                             UIEvents.UPDATE_SHARED_VIDEO, url, 'start');
74
                             UIEvents.UPDATE_SHARED_VIDEO, url, 'start');
75
-                        AnalyticsAdapter.sendEvent('sharedvideo.started');
75
+                        JitsiMeetJS.analytics.sendEvent('sharedvideo.started');
76
                     },
76
                     },
77
                     err => {
77
                     err => {
78
                         console.log('SHARED VIDEO CANCELED', err);
78
                         console.log('SHARED VIDEO CANCELED', err);
79
-                        AnalyticsAdapter.sendEvent('sharedvideo.canceled');
79
+                        JitsiMeetJS.analytics.sendEvent('sharedvideo.canceled');
80
                     }
80
                     }
81
             );
81
             );
82
             return;
82
             return;
86
             showStopVideoPropmpt().then(() => {
86
             showStopVideoPropmpt().then(() => {
87
                     this.emitter.emit(
87
                     this.emitter.emit(
88
                         UIEvents.UPDATE_SHARED_VIDEO, this.url, 'stop');
88
                         UIEvents.UPDATE_SHARED_VIDEO, this.url, 'stop');
89
-                    AnalyticsAdapter.sendEvent('sharedvideo.stoped');
89
+                    JitsiMeetJS.analytics.sendEvent('sharedvideo.stoped');
90
                 },
90
                 },
91
                 () => {});
91
                 () => {});
92
         } else {
92
         } else {
98
                     dialog = null;
98
                     dialog = null;
99
                 }
99
                 }
100
             );
100
             );
101
-            AnalyticsAdapter.sendEvent('sharedvideo.alreadyshared');
101
+            JitsiMeetJS.analytics.sendEvent('sharedvideo.alreadyshared');
102
         }
102
         }
103
     }
103
     }
104
 
104
 
202
                 self.smartAudioMute();
202
                 self.smartAudioMute();
203
             } else if (event.data == YT.PlayerState.PAUSED) {
203
             } else if (event.data == YT.PlayerState.PAUSED) {
204
                 self.smartAudioUnmute();
204
                 self.smartAudioUnmute();
205
-                AnalyticsAdapter.sendEvent('sharedvideo.paused');
205
+                JitsiMeetJS.analytics.sendEvent('sharedvideo.paused');
206
             }
206
             }
207
             self.fireSharedVideoEvent(event.data == YT.PlayerState.PAUSED);
207
             self.fireSharedVideoEvent(event.data == YT.PlayerState.PAUSED);
208
         };
208
         };
232
             else if (event.data.volume <=0 || event.data.muted) {
232
             else if (event.data.volume <=0 || event.data.muted) {
233
                 self.smartAudioUnmute();
233
                 self.smartAudioUnmute();
234
             }
234
             }
235
-            AnalyticsAdapter.sendEvent('sharedvideo.volumechanged');
235
+            JitsiMeetJS.analytics.sendEvent('sharedvideo.volumechanged');
236
         };
236
         };
237
 
237
 
238
         window.onPlayerReady = function(event) {
238
         window.onPlayerReady = function(event) {

+ 6
- 5
modules/UI/toolbars/BottomToolbar.js Wyświetl plik

1
-/* global $, APP, interfaceConfig*/
1
+/* global $, APP, interfaceConfig, JitsiMeetJS */
2
 import UIUtil from '../util/UIUtil';
2
 import UIUtil from '../util/UIUtil';
3
 import UIEvents from '../../../service/UI/UIEvents';
3
 import UIEvents from '../../../service/UI/UIEvents';
4
-import AnalyticsAdapter from '../../statistics/AnalyticsAdapter';
5
 
4
 
6
 const defaultBottomToolbarButtons = {
5
 const defaultBottomToolbarButtons = {
7
     'chat':      '#bottom_toolbar_chat',
6
     'chat':      '#bottom_toolbar_chat',
38
 
37
 
39
         const buttonHandlers = {
38
         const buttonHandlers = {
40
             "bottom_toolbar_contact_list": function () {
39
             "bottom_toolbar_contact_list": function () {
41
-                AnalyticsAdapter.sendEvent('bottomtoolbar.contacts.toggled');
40
+                JitsiMeetJS.analytics.sendEvent(
41
+                    'bottomtoolbar.contacts.toggled');
42
                 emitter.emit(UIEvents.TOGGLE_CONTACT_LIST);
42
                 emitter.emit(UIEvents.TOGGLE_CONTACT_LIST);
43
             },
43
             },
44
             "bottom_toolbar_film_strip": function () {
44
             "bottom_toolbar_film_strip": function () {
45
-                AnalyticsAdapter.sendEvent('bottomtoolbar.filmstrip.toggled');
45
+                JitsiMeetJS.analytics.sendEvent(
46
+                    'bottomtoolbar.filmstrip.toggled');
46
                 emitter.emit(UIEvents.TOGGLE_FILM_STRIP);
47
                 emitter.emit(UIEvents.TOGGLE_FILM_STRIP);
47
             },
48
             },
48
             "bottom_toolbar_chat": function () {
49
             "bottom_toolbar_chat": function () {
49
-                AnalyticsAdapter.sendEvent('bottomtoolbar.chat.toggled');
50
+                JitsiMeetJS.analytics.sendEvent('bottomtoolbar.chat.toggled');
50
                 emitter.emit(UIEvents.TOGGLE_CHAT);
51
                 emitter.emit(UIEvents.TOGGLE_CHAT);
51
             }
52
             }
52
         };
53
         };

+ 22
- 23
modules/UI/toolbars/Toolbar.js Wyświetl plik

1
-/* global APP, $, config, interfaceConfig */
1
+/* global APP, $, config, interfaceConfig, JitsiMeetJS */
2
 /* jshint -W101 */
2
 /* jshint -W101 */
3
 import UIUtil from '../util/UIUtil';
3
 import UIUtil from '../util/UIUtil';
4
-import AnalyticsAdapter from '../../statistics/AnalyticsAdapter';
5
 import UIEvents from '../../../service/UI/UIEvents';
4
 import UIEvents from '../../../service/UI/UIEvents';
6
 
5
 
7
 let roomUrl = null;
6
 let roomUrl = null;
26
         false, "dialog.Invite",
25
         false, "dialog.Invite",
27
         function (e, v) {
26
         function (e, v) {
28
             if (v && roomUrl) {
27
             if (v && roomUrl) {
29
-                AnalyticsAdapter.sendEvent('toolbar.invite.button');
28
+                JitsiMeetJS.analytics.sendEvent('toolbar.invite.button');
30
                 emitter.emit(UIEvents.USER_INVITED, roomUrl);
29
                 emitter.emit(UIEvents.USER_INVITED, roomUrl);
31
             }
30
             }
32
             else {
31
             else {
33
-                AnalyticsAdapter.sendEvent('toolbar.invite.cancel');
32
+                JitsiMeetJS.analytics.sendEvent('toolbar.invite.cancel');
34
             }
33
             }
35
         },
34
         },
36
         function (event) {
35
         function (event) {
44
         },
43
         },
45
         function (e, v, m, f) {
44
         function (e, v, m, f) {
46
             if(!v && !m && !f)
45
             if(!v && !m && !f)
47
-                AnalyticsAdapter.sendEvent('toolbar.invite.close');
46
+                JitsiMeetJS.analytics.sendEvent('toolbar.invite.close');
48
         }
47
         }
49
     );
48
     );
50
 }
49
 }
64
                     $("#unableToUnmutePopup"), true, 5000);
63
                     $("#unableToUnmutePopup"), true, 5000);
65
             }
64
             }
66
             else {
65
             else {
67
-                AnalyticsAdapter.sendEvent('toolbar.audio.unmuted');
66
+                JitsiMeetJS.analytics.sendEvent('toolbar.audio.unmuted');
68
                 emitter.emit(UIEvents.AUDIO_MUTED, false, true);
67
                 emitter.emit(UIEvents.AUDIO_MUTED, false, true);
69
             }
68
             }
70
         } else {
69
         } else {
71
-            AnalyticsAdapter.sendEvent('toolbar.audio.muted');
70
+            JitsiMeetJS.analytics.sendEvent('toolbar.audio.muted');
72
             emitter.emit(UIEvents.AUDIO_MUTED, true, true);
71
             emitter.emit(UIEvents.AUDIO_MUTED, true, true);
73
         }
72
         }
74
     },
73
     },
75
     "toolbar_button_camera": function () {
74
     "toolbar_button_camera": function () {
76
         if (APP.conference.videoMuted) {
75
         if (APP.conference.videoMuted) {
77
-            AnalyticsAdapter.sendEvent('toolbar.video.enabled');
76
+            JitsiMeetJS.analytics.sendEvent('toolbar.video.enabled');
78
             emitter.emit(UIEvents.VIDEO_MUTED, false);
77
             emitter.emit(UIEvents.VIDEO_MUTED, false);
79
         } else {
78
         } else {
80
-            AnalyticsAdapter.sendEvent('toolbar.video.disabled');
79
+            JitsiMeetJS.analytics.sendEvent('toolbar.video.disabled');
81
             emitter.emit(UIEvents.VIDEO_MUTED, true);
80
             emitter.emit(UIEvents.VIDEO_MUTED, true);
82
         }
81
         }
83
     },
82
     },
84
     "toolbar_button_security": function () {
83
     "toolbar_button_security": function () {
85
-        AnalyticsAdapter.sendEvent('toolbar.lock.clicked');
84
+        JitsiMeetJS.analytics.sendEvent('toolbar.lock.clicked');
86
         emitter.emit(UIEvents.ROOM_LOCK_CLICKED);
85
         emitter.emit(UIEvents.ROOM_LOCK_CLICKED);
87
     },
86
     },
88
     "toolbar_button_link": function () {
87
     "toolbar_button_link": function () {
89
-        AnalyticsAdapter.sendEvent('toolbar.invite.clicked');
88
+        JitsiMeetJS.analytics.sendEvent('toolbar.invite.clicked');
90
         openLinkDialog();
89
         openLinkDialog();
91
     },
90
     },
92
     "toolbar_button_chat": function () {
91
     "toolbar_button_chat": function () {
93
-        AnalyticsAdapter.sendEvent('toolbar.chat.toggled');
92
+        JitsiMeetJS.analytics.sendEvent('toolbar.chat.toggled');
94
         emitter.emit(UIEvents.TOGGLE_CHAT);
93
         emitter.emit(UIEvents.TOGGLE_CHAT);
95
     },
94
     },
96
     "toolbar_button_etherpad": function () {
95
     "toolbar_button_etherpad": function () {
97
-        AnalyticsAdapter.sendEvent('toolbar.etherpad.clicked');
96
+        JitsiMeetJS.analytics.sendEvent('toolbar.etherpad.clicked');
98
         emitter.emit(UIEvents.ETHERPAD_CLICKED);
97
         emitter.emit(UIEvents.ETHERPAD_CLICKED);
99
     },
98
     },
100
     "toolbar_button_sharedvideo": function () {
99
     "toolbar_button_sharedvideo": function () {
101
-        AnalyticsAdapter.sendEvent('toolbar.sharedvideo.clicked');
100
+        JitsiMeetJS.analytics.sendEvent('toolbar.sharedvideo.clicked');
102
         emitter.emit(UIEvents.SHARED_VIDEO_CLICKED);
101
         emitter.emit(UIEvents.SHARED_VIDEO_CLICKED);
103
     },
102
     },
104
     "toolbar_button_desktopsharing": function () {
103
     "toolbar_button_desktopsharing": function () {
105
         if (APP.conference.isSharingScreen) {
104
         if (APP.conference.isSharingScreen) {
106
-            AnalyticsAdapter.sendEvent('toolbar.screen.disabled');
105
+            JitsiMeetJS.analytics.sendEvent('toolbar.screen.disabled');
107
         } else {
106
         } else {
108
-            AnalyticsAdapter.sendEvent('toolbar.screen.enabled');
107
+            JitsiMeetJS.analytics.sendEvent('toolbar.screen.enabled');
109
         }
108
         }
110
         emitter.emit(UIEvents.TOGGLE_SCREENSHARING);
109
         emitter.emit(UIEvents.TOGGLE_SCREENSHARING);
111
     },
110
     },
112
     "toolbar_button_fullScreen": function() {
111
     "toolbar_button_fullScreen": function() {
113
-        AnalyticsAdapter.sendEvent('toolbar.fullscreen.enabled');
112
+        JitsiMeetJS.analytics.sendEvent('toolbar.fullscreen.enabled');
114
         UIUtil.buttonClick("#toolbar_button_fullScreen", "icon-full-screen icon-exit-full-screen");
113
         UIUtil.buttonClick("#toolbar_button_fullScreen", "icon-full-screen icon-exit-full-screen");
115
         emitter.emit(UIEvents.FULLSCREEN_TOGGLE);
114
         emitter.emit(UIEvents.FULLSCREEN_TOGGLE);
116
     },
115
     },
117
     "toolbar_button_sip": function () {
116
     "toolbar_button_sip": function () {
118
-        AnalyticsAdapter.sendEvent('toolbar.sip.clicked');
117
+        JitsiMeetJS.analytics.sendEvent('toolbar.sip.clicked');
119
         showSipNumberInput();
118
         showSipNumberInput();
120
     },
119
     },
121
     "toolbar_button_dialpad": function () {
120
     "toolbar_button_dialpad": function () {
122
-        AnalyticsAdapter.sendEvent('toolbar.sip.dialpad.clicked');
121
+        JitsiMeetJS.analytics.sendEvent('toolbar.sip.dialpad.clicked');
123
         dialpadButtonClicked();
122
         dialpadButtonClicked();
124
     },
123
     },
125
     "toolbar_button_settings": function () {
124
     "toolbar_button_settings": function () {
126
-        AnalyticsAdapter.sendEvent('toolbar.settings.toggled');
125
+        JitsiMeetJS.analytics.sendEvent('toolbar.settings.toggled');
127
         emitter.emit(UIEvents.TOGGLE_SETTINGS);
126
         emitter.emit(UIEvents.TOGGLE_SETTINGS);
128
     },
127
     },
129
     "toolbar_button_hangup": function () {
128
     "toolbar_button_hangup": function () {
130
-        AnalyticsAdapter.sendEvent('toolbar.hangup');
129
+        JitsiMeetJS.analytics.sendEvent('toolbar.hangup');
131
         emitter.emit(UIEvents.HANGUP);
130
         emitter.emit(UIEvents.HANGUP);
132
     },
131
     },
133
     "toolbar_button_login": function () {
132
     "toolbar_button_login": function () {
134
-        AnalyticsAdapter.sendEvent('toolbar.authenticate.login.clicked');
133
+        JitsiMeetJS.analytics.sendEvent('toolbar.authenticate.login.clicked');
135
         emitter.emit(UIEvents.AUTH_CLICKED);
134
         emitter.emit(UIEvents.AUTH_CLICKED);
136
     },
135
     },
137
     "toolbar_button_logout": function () {
136
     "toolbar_button_logout": function () {
138
-        AnalyticsAdapter.sendEvent('toolbar.authenticate.logout.clicked');
137
+        JitsiMeetJS.analytics.sendEvent('toolbar.authenticate.logout.clicked');
139
         // Ask for confirmation
138
         // Ask for confirmation
140
         APP.UI.messageHandler.openTwoButtonDialog(
139
         APP.UI.messageHandler.openTwoButtonDialog(
141
             "dialog.logoutTitle",
140
             "dialog.logoutTitle",

+ 0
- 1
modules/UI/videolayout/SmallVideo.js Wyświetl plik

3
 import Avatar from "../avatar/Avatar";
3
 import Avatar from "../avatar/Avatar";
4
 import UIUtil from "../util/UIUtil";
4
 import UIUtil from "../util/UIUtil";
5
 import UIEvents from "../../../service/UI/UIEvents";
5
 import UIEvents from "../../../service/UI/UIEvents";
6
-import AnalyticsAdapter from '../../statistics/AnalyticsAdapter';
7
 
6
 
8
 const RTCUIHelper = JitsiMeetJS.util.RTCUIHelper;
7
 const RTCUIHelper = JitsiMeetJS.util.RTCUIHelper;
9
 
8
 

+ 9
- 10
modules/keyboardshortcut/keyboardshortcut.js Wyświetl plik

1
-/* global APP, $ */
2
-import AnalyticsAdapter from '../statistics/AnalyticsAdapter';
1
+/* global APP, $, JitsiMeetJS */
3
 //maps keycode to character, id of popover for given function and function
2
 //maps keycode to character, id of popover for given function and function
4
 var shortcuts = {};
3
 var shortcuts = {};
5
 function initShortcutHandlers() {
4
 function initShortcutHandlers() {
14
             character: "C",
13
             character: "C",
15
             id: "toggleChatPopover",
14
             id: "toggleChatPopover",
16
             function: function() {
15
             function: function() {
17
-                AnalyticsAdapter.sendEvent('shortcut.chat.toggled');
16
+                JitsiMeetJS.analytics.sendEvent('shortcut.chat.toggled');
18
                 APP.UI.toggleChat();
17
                 APP.UI.toggleChat();
19
             }
18
             }
20
         },
19
         },
22
             character: "D",
21
             character: "D",
23
             id: "toggleDesktopSharingPopover",
22
             id: "toggleDesktopSharingPopover",
24
             function: function () {
23
             function: function () {
25
-                AnalyticsAdapter.sendEvent('shortcut.screen.toggled');
24
+                JitsiMeetJS.analytics.sendEvent('shortcut.screen.toggled');
26
                 APP.conference.toggleScreenSharing();
25
                 APP.conference.toggleScreenSharing();
27
             }
26
             }
28
         },
27
         },
30
             character: "F",
29
             character: "F",
31
             id: "filmstripPopover",
30
             id: "filmstripPopover",
32
             function: function() {
31
             function: function() {
33
-                AnalyticsAdapter.sendEvent('shortcut.film.toggled');
32
+                JitsiMeetJS.analytics.sendEvent('shortcut.film.toggled');
34
                 APP.UI.toggleFilmStrip();
33
                 APP.UI.toggleFilmStrip();
35
             }
34
             }
36
         },
35
         },
38
             character: "M",
37
             character: "M",
39
             id: "mutePopover",
38
             id: "mutePopover",
40
             function: function() {
39
             function: function() {
41
-                AnalyticsAdapter.sendEvent('shortcut.audiomute.toggled');
40
+                JitsiMeetJS.analytics.sendEvent('shortcut.audiomute.toggled');
42
                 APP.conference.toggleAudioMuted();
41
                 APP.conference.toggleAudioMuted();
43
             }
42
             }
44
         },
43
         },
45
         "R": {
44
         "R": {
46
             character: "R",
45
             character: "R",
47
             function: function() {
46
             function: function() {
48
-                AnalyticsAdapter.sendEvent('shortcut.raisedhand.toggled');
47
+                JitsiMeetJS.analytics.sendEvent('shortcut.raisedhand.toggled');
49
                 APP.conference.maybeToggleRaisedHand();
48
                 APP.conference.maybeToggleRaisedHand();
50
             }
49
             }
51
 
50
 
53
         "T": {
52
         "T": {
54
             character: "T",
53
             character: "T",
55
             function: function() {
54
             function: function() {
56
-                AnalyticsAdapter.sendEvent('shortcut.talk.clicked');
55
+                JitsiMeetJS.analytics.sendEvent('shortcut.talk.clicked');
57
                 APP.conference.muteAudio(true);
56
                 APP.conference.muteAudio(true);
58
             }
57
             }
59
         },
58
         },
61
             character: "V",
60
             character: "V",
62
             id: "toggleVideoPopover",
61
             id: "toggleVideoPopover",
63
             function: function() {
62
             function: function() {
64
-                AnalyticsAdapter.sendEvent('shortcut.videomute.toggled');
63
+                JitsiMeetJS.analytics.sendEvent('shortcut.videomute.toggled');
65
                 APP.conference.toggleVideoMuted();
64
                 APP.conference.toggleVideoMuted();
66
             }
65
             }
67
         },
66
         },
68
         "?": {
67
         "?": {
69
             character: "?",
68
             character: "?",
70
             function: function(e) {
69
             function: function(e) {
71
-                AnalyticsAdapter.sendEvent('shortcut.shortcut.help');
70
+                JitsiMeetJS.analytics.sendEvent('shortcut.shortcut.help');
72
                 APP.UI.toggleKeyboardShortcutsPanel();
71
                 APP.UI.toggleKeyboardShortcutsPanel();
73
             }
72
             }
74
         }
73
         }

+ 0
- 18
modules/statistics/AnalyticsAdapter.js Wyświetl plik

1
-/* global config, JitsiMeetJS */
2
-
3
-// Load the integration of a third-party analytics API such as Google Analytics.
4
-// Since we cannot guarantee the quality of the third-party service (e.g. their
5
-// server may take noticeably long time to respond), it is in our best interest
6
-// (in the sense that the intergration of the analytics API is important to us
7
-// but not enough to allow it to prevent people from joining a conference) to
8
-// download the API asynchronously. Additionally, Google Analytics will download
9
-// its implementation asynchronously anyway so it makes sense to append the
10
-// loading on our side rather than prepend it.
11
-if (config.disableThirdPartyRequests !== true) {
12
-    JitsiMeetJS.util.ScriptUtil.loadScript(
13
-            'analytics.js?v=1',
14
-            /* async */ true,
15
-            /* prepend */ false);
16
-}
17
-
18
-export default JitsiMeetJS.analytics;

Ładowanie…
Anuluj
Zapisz