|
@@ -10,6 +10,7 @@ var Authentication = require("../authentication/Authentication");
|
10
|
10
|
var UIUtil = require("../util/UIUtil");
|
11
|
11
|
var AuthenticationEvents
|
12
|
12
|
= require("../../../service/authentication/AuthenticationEvents");
|
|
13
|
+var AnalyticsAdapter = require("../../statistics/AnalyticsAdapter");
|
13
|
14
|
|
14
|
15
|
var roomUrl = null;
|
15
|
16
|
var sharedKey = '';
|
|
@@ -18,55 +19,87 @@ var recordingToaster = null;
|
18
|
19
|
|
19
|
20
|
var buttonHandlers = {
|
20
|
21
|
"toolbar_button_mute": function () {
|
|
22
|
+ if (APP.RTC.localAudio.isMuted()) {
|
|
23
|
+ AnalyticsAdapter.sendEvent('toolbar.audio.unmuted');
|
|
24
|
+ } else {
|
|
25
|
+ AnalyticsAdapter.sendEvent('toolbar.audio.muted');
|
|
26
|
+ }
|
21
|
27
|
return APP.UI.toggleAudio();
|
22
|
28
|
},
|
23
|
29
|
"toolbar_button_camera": function () {
|
|
30
|
+ if (APP.RTC.localVideo.isMuted()) {
|
|
31
|
+ AnalyticsAdapter.sendEvent('toolbar.video.enabled');
|
|
32
|
+ } else {
|
|
33
|
+ AnalyticsAdapter.sendEvent('toolbar.video.disabled');
|
|
34
|
+ }
|
24
|
35
|
return APP.UI.toggleVideo();
|
25
|
36
|
},
|
26
|
37
|
/*"toolbar_button_authentication": function () {
|
27
|
38
|
return Toolbar.authenticateClicked();
|
28
|
39
|
},*/
|
29
|
40
|
"toolbar_button_record": function () {
|
|
41
|
+ AnalyticsAdapter.sendEvent('toolbar.recording.toggled');
|
30
|
42
|
return toggleRecording();
|
31
|
43
|
},
|
32
|
44
|
"toolbar_button_security": function () {
|
|
45
|
+ if (sharedKey) {
|
|
46
|
+ AnalyticsAdapter.sendEvent('toolbar.lock.disabled');
|
|
47
|
+ } else {
|
|
48
|
+ AnalyticsAdapter.sendEvent('toolbar.lock.enabled');
|
|
49
|
+ }
|
33
|
50
|
return Toolbar.openLockDialog();
|
34
|
51
|
},
|
35
|
52
|
"toolbar_button_link": function () {
|
|
53
|
+ AnalyticsAdapter.sendEvent('toolbar.invite.clicked');
|
36
|
54
|
return Toolbar.openLinkDialog();
|
37
|
55
|
},
|
38
|
56
|
"toolbar_button_chat": function () {
|
|
57
|
+ AnalyticsAdapter.sendEvent('toolbar.chat.toggled');
|
39
|
58
|
return BottomToolbar.toggleChat();
|
40
|
59
|
},
|
41
|
60
|
"toolbar_button_prezi": function () {
|
|
61
|
+ AnalyticsAdapter.sendEvent('toolbar.prezi.clicked');
|
42
|
62
|
return Prezi.openPreziDialog();
|
43
|
63
|
},
|
44
|
64
|
"toolbar_button_etherpad": function () {
|
|
65
|
+ AnalyticsAdapter.sendEvent('toolbar.etherpad.clicked');
|
45
|
66
|
return Etherpad.toggleEtherpad(0);
|
46
|
67
|
},
|
47
|
68
|
"toolbar_button_desktopsharing": function () {
|
|
69
|
+ if (APP.desktopsharing.isUsingScreenStream) {
|
|
70
|
+ AnalyticsAdapter.sendEvent('toolbar.screen.disabled');
|
|
71
|
+ } else {
|
|
72
|
+ AnalyticsAdapter.sendEvent('toolbar.screen.enabled');
|
|
73
|
+ }
|
48
|
74
|
return APP.desktopsharing.toggleScreenSharing();
|
49
|
75
|
},
|
50
|
76
|
"toolbar_button_fullScreen": function() {
|
|
77
|
+ AnalyticsAdapter.sendEvent('toolbar.fullscreen.enabled');
|
51
|
78
|
UIUtil.buttonClick("#toolbar_button_fullScreen", "icon-full-screen icon-exit-full-screen");
|
52
|
79
|
return Toolbar.toggleFullScreen();
|
53
|
80
|
},
|
54
|
81
|
"toolbar_button_sip": function () {
|
|
82
|
+ AnalyticsAdapter.sendEvent('toolbar.sip.clicked');
|
55
|
83
|
return callSipButtonClicked();
|
56
|
84
|
},
|
57
|
85
|
"toolbar_button_dialpad": function () {
|
|
86
|
+ AnalyticsAdapter.sendEvent('toolbar.sip.dialpad.clicked');
|
58
|
87
|
return dialpadButtonClicked();
|
59
|
88
|
},
|
60
|
89
|
"toolbar_button_settings": function () {
|
|
90
|
+ AnalyticsAdapter.sendEvent('toolbar.settings.toggled');
|
61
|
91
|
PanelToggler.toggleSettingsMenu();
|
62
|
92
|
},
|
63
|
93
|
"toolbar_button_hangup": function () {
|
|
94
|
+ AnalyticsAdapter.sendEvent('toolbar.hangup');
|
64
|
95
|
return hangup();
|
65
|
96
|
},
|
66
|
97
|
"toolbar_button_login": function () {
|
|
98
|
+ AnalyticsAdapter.sendEvent('toolbar.authenticate.login.clicked');
|
67
|
99
|
Toolbar.authenticateClicked();
|
68
|
100
|
},
|
69
|
101
|
"toolbar_button_logout": function () {
|
|
102
|
+ AnalyticsAdapter.sendEvent('toolbar.authenticate.logout.clicked');
|
70
|
103
|
// Ask for confirmation
|
71
|
104
|
messageHandler.openTwoButtonDialog(
|
72
|
105
|
"dialog.logoutTitle",
|
|
@@ -418,18 +451,18 @@ var Toolbar = (function (my) {
|
418
|
451
|
* Opens the invite link dialog.
|
419
|
452
|
*/
|
420
|
453
|
my.openLinkDialog = function () {
|
421
|
|
- var inviteAttreibutes;
|
|
454
|
+ var inviteAttributes;
|
422
|
455
|
|
423
|
456
|
if (roomUrl === null) {
|
424
|
|
- inviteAttreibutes = 'data-i18n="[value]roomUrlDefaultMsg" value="' +
|
|
457
|
+ inviteAttributes = 'data-i18n="[value]roomUrlDefaultMsg" value="' +
|
425
|
458
|
APP.translation.translateString("roomUrlDefaultMsg") + '"';
|
426
|
459
|
} else {
|
427
|
|
- inviteAttreibutes = "value=\"" + encodeURI(roomUrl) + "\"";
|
|
460
|
+ inviteAttributes = "value=\"" + encodeURI(roomUrl) + "\"";
|
428
|
461
|
}
|
429
|
462
|
messageHandler.openTwoButtonDialog("dialog.shareLink",
|
430
|
463
|
null, null,
|
431
|
464
|
'<input id="inviteLinkRef" type="text" ' +
|
432
|
|
- inviteAttreibutes + ' onclick="this.select();" readonly>',
|
|
465
|
+ inviteAttributes + ' onclick="this.select();" readonly>',
|
433
|
466
|
false,
|
434
|
467
|
"dialog.Invite",
|
435
|
468
|
function (e, v) {
|