|
|
@@ -2,13 +2,9 @@
|
|
2
|
2
|
/* jshint -W101 */
|
|
3
|
3
|
var messageHandler = require("../util/MessageHandler");
|
|
4
|
4
|
var BottomToolbar = require("./BottomToolbar");
|
|
5
|
|
-var Prezi = require("../prezi/Prezi");
|
|
6
|
|
-var Etherpad = require("../etherpad/Etherpad");
|
|
7
|
5
|
var PanelToggler = require("../side_pannels/SidePanelToggler");
|
|
8
|
6
|
var Authentication = require("../authentication/Authentication");
|
|
9
|
7
|
var UIUtil = require("../util/UIUtil");
|
|
10
|
|
-var AuthenticationEvents
|
|
11
|
|
- = require("../../../service/authentication/AuthenticationEvents");
|
|
12
|
8
|
var AnalyticsAdapter = require("../../statistics/AnalyticsAdapter");
|
|
13
|
9
|
var Feedback = require("../Feedback");
|
|
14
|
10
|
var UIEvents = require("../../../service/UI/UIEvents");
|
|
|
@@ -20,7 +16,7 @@ var emitter = null;
|
|
20
|
16
|
|
|
21
|
17
|
var buttonHandlers = {
|
|
22
|
18
|
"toolbar_button_mute": function () {
|
|
23
|
|
- if (APP.RTC.localAudio.isMuted()) {
|
|
|
19
|
+ if (APP.conference.audioMuted) {
|
|
24
|
20
|
AnalyticsAdapter.sendEvent('toolbar.audio.unmuted');
|
|
25
|
21
|
emitter.emit(UIEvents.AUDIO_MUTED, false);
|
|
26
|
22
|
} else {
|
|
|
@@ -29,7 +25,7 @@ var buttonHandlers = {
|
|
29
|
25
|
}
|
|
30
|
26
|
},
|
|
31
|
27
|
"toolbar_button_camera": function () {
|
|
32
|
|
- if (APP.RTC.localVideo.isMuted()) {
|
|
|
28
|
+ if (APP.conference.videoMuted) {
|
|
33
|
29
|
AnalyticsAdapter.sendEvent('toolbar.video.enabled');
|
|
34
|
30
|
emitter.emit(UIEvents.VIDEO_MUTED, false);
|
|
35
|
31
|
} else {
|
|
|
@@ -62,11 +58,11 @@ var buttonHandlers = {
|
|
62
|
58
|
},
|
|
63
|
59
|
"toolbar_button_prezi": function () {
|
|
64
|
60
|
AnalyticsAdapter.sendEvent('toolbar.prezi.clicked');
|
|
65
|
|
- return Prezi.openPreziDialog();
|
|
|
61
|
+ emitter.emit(UIEvents.PREZI_CLICKED);
|
|
66
|
62
|
},
|
|
67
|
63
|
"toolbar_button_etherpad": function () {
|
|
68
|
64
|
AnalyticsAdapter.sendEvent('toolbar.etherpad.clicked');
|
|
69
|
|
- return Etherpad.toggleEtherpad(0);
|
|
|
65
|
+ emitter.emit(UIEvents.ETHERPAD_CLICKED);
|
|
70
|
66
|
},
|
|
71
|
67
|
"toolbar_button_desktopsharing": function () {
|
|
72
|
68
|
if (APP.desktopsharing.isUsingScreenStream) {
|
|
|
@@ -317,26 +313,6 @@ var Toolbar = (function (my) {
|
|
317
|
313
|
|
|
318
|
314
|
for(var k in buttonHandlers)
|
|
319
|
315
|
$("#" + k).click(buttonHandlers[k]);
|
|
320
|
|
- // Update login info
|
|
321
|
|
- APP.xmpp.addListener(
|
|
322
|
|
- AuthenticationEvents.IDENTITY_UPDATED,
|
|
323
|
|
- function (authenticationEnabled, userIdentity) {
|
|
324
|
|
-
|
|
325
|
|
- var loggedIn = false;
|
|
326
|
|
- if (userIdentity) {
|
|
327
|
|
- loggedIn = true;
|
|
328
|
|
- }
|
|
329
|
|
-
|
|
330
|
|
- Toolbar.showAuthenticateButton(authenticationEnabled);
|
|
331
|
|
-
|
|
332
|
|
- if (authenticationEnabled) {
|
|
333
|
|
- Toolbar.setAuthenticatedIdentity(userIdentity);
|
|
334
|
|
-
|
|
335
|
|
- Toolbar.showLoginButton(!loggedIn);
|
|
336
|
|
- Toolbar.showLogoutButton(loggedIn);
|
|
337
|
|
- }
|
|
338
|
|
- }
|
|
339
|
|
- );
|
|
340
|
316
|
};
|
|
341
|
317
|
|
|
342
|
318
|
/**
|