|
@@ -1,5 +1,4 @@
|
1
|
|
-/* jshint -W117 */
|
2
|
|
-/* global JitsiMeetJS */
|
|
1
|
+/* global $, JitsiMeetJS, config, Promise */
|
3
|
2
|
/* application specific logic */
|
4
|
3
|
|
5
|
4
|
require("jquery");
|
|
@@ -13,66 +12,41 @@ window.toastr = require("toastr");
|
13
|
12
|
require("jQuery-Impromptu");
|
14
|
13
|
require("autosize");
|
15
|
14
|
|
|
15
|
+var CQEvents = require('./service/connectionquality/CQEvents');
|
|
16
|
+var UIEvents = require('./service/UI/UIEvents');
|
|
17
|
+
|
16
|
18
|
var Commands = {
|
17
|
19
|
CONNECTION_QUALITY: "connectionQuality",
|
18
|
20
|
EMAIL: "email"
|
19
|
21
|
};
|
20
|
22
|
|
21
|
|
-function createConference(connection, room) {
|
22
|
|
- var localTracks = [];
|
23
|
|
- var remoteTracks = {};
|
24
|
|
-
|
25
|
|
- return {
|
26
|
|
- muteAudio: function (mute) {
|
27
|
|
-
|
28
|
|
- },
|
29
|
|
-
|
30
|
|
- muteVideo: function (mute) {
|
31
|
|
-
|
32
|
|
- },
|
33
|
|
-
|
34
|
|
- toggleAudioMuted: function () {
|
35
|
|
- APP.UI.setAudioMuted(muted);
|
36
|
|
- },
|
37
|
|
-
|
38
|
|
- toggleVideoMuted: function () {
|
39
|
|
- APP.UI.setVideoMuted(muted);
|
40
|
|
- },
|
41
|
|
-
|
42
|
|
- setNickname: function (nickname) {
|
43
|
|
- APP.settings.setDisplayName(nickname);
|
44
|
|
- room.setDisplayName(nickname);
|
45
|
|
- },
|
46
|
|
-
|
47
|
|
- setStartMuted: function (audio, video) {
|
48
|
|
- // FIXME room.setStartMuted
|
49
|
|
- },
|
50
|
|
-
|
51
|
|
- sendMessage: function (message) {
|
52
|
|
- room.sendTextMessage(message);
|
53
|
|
- },
|
54
|
|
-
|
55
|
|
- isModerator: function () {
|
56
|
|
- return false;
|
57
|
|
- },
|
58
|
|
-
|
59
|
|
- localId: function () {
|
60
|
|
- return room.myUserId();
|
61
|
|
- },
|
62
|
|
-
|
63
|
|
- isLocalId: function (id) {
|
64
|
|
- return id === this.localId();
|
65
|
|
- }
|
66
|
|
- };
|
67
|
|
-}
|
68
|
|
-
|
69
|
23
|
var APP = {
|
70
|
|
- JitsiMeetJS: JitsiMeetJS,
|
71
|
|
-
|
72
|
24
|
init: function () {
|
73
|
|
- this.JitsiMeetJS.init();
|
74
|
|
- this.JitsiMeetJS.setLogLevel(JitsiMeetJS.logLevels.TRACE);
|
75
|
|
- this.conference = null;
|
|
25
|
+ JitsiMeetJS.init();
|
|
26
|
+ JitsiMeetJS.setLogLevel(JitsiMeetJS.logLevels.TRACE);
|
|
27
|
+
|
|
28
|
+ this.conference = {
|
|
29
|
+ localId: undefined,
|
|
30
|
+ isModerator: false,
|
|
31
|
+ membersCount: 0,
|
|
32
|
+ audioMuted: false,
|
|
33
|
+ videoMuted: false,
|
|
34
|
+ isLocalId: function (id) {
|
|
35
|
+ return this.localId === id;
|
|
36
|
+ },
|
|
37
|
+ muteAudio: function (mute) {
|
|
38
|
+ APP.UI.eventEmitter.emit(UIEvents.AUDIO_MUTED, mute);
|
|
39
|
+ },
|
|
40
|
+ toggleAudioMuted: function () {
|
|
41
|
+ this.muteAudio(!this.audioMuted);
|
|
42
|
+ },
|
|
43
|
+ muteVideo: function (mute) {
|
|
44
|
+ APP.UI.eventEmitter.emit(UIEvents.VIDEO_MUTED, mute);
|
|
45
|
+ },
|
|
46
|
+ toggleVideoMuted: function () {
|
|
47
|
+ this.muteVideo(!this.videoMuted);
|
|
48
|
+ }
|
|
49
|
+ };
|
76
|
50
|
|
77
|
51
|
this.UI = require("./modules/UI/UI");
|
78
|
52
|
this.API = require("./modules/API/API");
|
|
@@ -85,145 +59,143 @@ var APP = {
|
85
|
59
|
require("./modules/keyboardshortcut/keyboardshortcut");
|
86
|
60
|
this.translation = require("./modules/translation/translation");
|
87
|
61
|
this.settings = require("./modules/settings/Settings");
|
88
|
|
- //this.DTMF = require("./modules/DTMF/DTMF");
|
89
|
|
- this.members = require("./modules/members/MemberList");
|
90
|
62
|
this.configFetch = require("./modules/config/HttpConfigFetch");
|
91
|
63
|
}
|
92
|
64
|
};
|
93
|
65
|
|
|
66
|
+
|
|
67
|
+var ConnectionEvents = JitsiMeetJS.events.connection;
|
|
68
|
+var ConnectionErrors = JitsiMeetJS.errors.connection;
|
94
|
69
|
function connect() {
|
95
|
|
- var connection = new APP.JitsiMeetJS.JitsiConnection(null, null, {
|
|
70
|
+ var connection = new JitsiMeetJS.JitsiConnection(null, null, {
|
96
|
71
|
hosts: config.hosts,
|
97
|
72
|
bosh: config.bosh,
|
98
|
73
|
clientNode: config.clientNode
|
99
|
74
|
});
|
100
|
75
|
|
101
|
|
- var events = APP.JitsiMeetJS.events.connection;
|
102
|
|
-
|
103
|
76
|
return new Promise(function (resolve, reject) {
|
104
|
|
- var onConnectionSuccess = function () {
|
|
77
|
+ var handlers = {};
|
|
78
|
+
|
|
79
|
+ var unsubscribe = function () {
|
|
80
|
+ Object.keys(handlers).forEach(function (event) {
|
|
81
|
+ connection.removeEventListener(event, handlers[event]);
|
|
82
|
+ });
|
|
83
|
+ };
|
|
84
|
+
|
|
85
|
+ handlers[ConnectionEvents.CONNECTION_ESTABLISHED] = function () {
|
105
|
86
|
console.log('CONNECTED');
|
|
87
|
+ unsubscribe();
|
106
|
88
|
resolve(connection);
|
107
|
89
|
};
|
108
|
90
|
|
109
|
|
- var onConnectionFailed = function () {
|
110
|
|
- console.error('CONNECTION FAILED');
|
111
|
|
- reject();
|
|
91
|
+ var listenForFailure = function (event) {
|
|
92
|
+ handlers[event] = function () {
|
|
93
|
+ // convert arguments to array
|
|
94
|
+ var args = Array.prototype.slice.call(arguments);
|
|
95
|
+ args.unshift(event);
|
|
96
|
+ // [event, ...params]
|
|
97
|
+ console.error('CONNECTION FAILED:', args);
|
|
98
|
+
|
|
99
|
+ unsubscribe();
|
|
100
|
+ reject(args);
|
|
101
|
+ };
|
112
|
102
|
};
|
113
|
103
|
|
114
|
|
- var onDisconnect = function () {
|
115
|
|
- console.log('DISCONNECT');
|
116
|
|
- connection.removeEventListener(
|
117
|
|
- events.CONNECTION_ESTABLISHED, onConnectionSuccess
|
118
|
|
- );
|
119
|
|
- connection.removeEventListener(
|
120
|
|
- events.CONNECTION_FAILED, onConnectionFailed
|
121
|
|
- );
|
122
|
|
- connection.removeEventListener(
|
123
|
|
- events.CONNECTION_DISCONNECTED, onDisconnect
|
124
|
|
- );
|
125
|
|
- };
|
|
104
|
+ listenForFailure(ConnectionEvents.CONNECTION_FAILED);
|
|
105
|
+ listenForFailure(ConnectionErrors.PASSWORD_REQUIRED);
|
|
106
|
+ listenForFailure(ConnectionErrors.CONNECTION_ERROR);
|
|
107
|
+ listenForFailure(ConnectionErrors.OTHER_ERRORS);
|
126
|
108
|
|
127
|
|
- connection.addEventListener(
|
128
|
|
- events.CONNECTION_ESTABLISHED, onConnectionSuccess
|
129
|
|
- );
|
130
|
|
- connection.addEventListener(
|
131
|
|
- events.CONNECTION_FAILED, onConnectionFailed
|
132
|
|
- );
|
133
|
|
- connection.addEventListener(
|
134
|
|
- events.CONNECTION_DISCONNECTED, onDisconnect
|
135
|
|
- );
|
|
109
|
+ // install event listeners
|
|
110
|
+ Object.keys(handlers).forEach(function (event) {
|
|
111
|
+ connection.addEventListener(event, handlers[event]);
|
|
112
|
+ });
|
136
|
113
|
|
137
|
114
|
connection.connect();
|
138
|
|
- }).catch(function (errType, msg) {
|
139
|
|
- // TODO handle OTHER_ERROR only
|
140
|
|
- APP.UI.notifyConnectionFailed(msg);
|
|
115
|
+ }).catch(function (err) {
|
|
116
|
+ if (err[0] === ConnectionErrors.PASSWORD_REQUIRED) {
|
|
117
|
+ // FIXME ask for password and try again
|
|
118
|
+ return connect();
|
|
119
|
+ }
|
|
120
|
+ console.error('FAILED TO CONNECT', err);
|
|
121
|
+ APP.UI.notifyConnectionFailed(err[1]);
|
141
|
122
|
|
142
|
|
- // rethrow
|
143
|
|
- throw new Error(errType);
|
|
123
|
+ throw new Error(err[0]);
|
144
|
124
|
});
|
145
|
125
|
}
|
146
|
126
|
|
147
|
|
-var ConferenceEvents = APP.JitsiMeetJS.events.conference;
|
148
|
|
-var ConferenceErrors = APP.JitsiMeetJS.errors.conference;
|
|
127
|
+var ConferenceEvents = JitsiMeetJS.events.conference;
|
|
128
|
+var ConferenceErrors = JitsiMeetJS.errors.conference;
|
149
|
129
|
function initConference(connection, roomName) {
|
150
|
130
|
var room = connection.initJitsiConference(roomName, {
|
151
|
131
|
openSctp: config.openSctp,
|
152
|
132
|
disableAudioLevels: config.disableAudioLevels
|
153
|
133
|
});
|
154
|
134
|
|
155
|
|
- var conf = createConference(connection, room);
|
|
135
|
+ var users = {};
|
|
136
|
+ var localTracks = [];
|
156
|
137
|
|
157
|
|
- room.on(ConferenceEvents.IN_LAST_N_CHANGED, function (inLastN) {
|
158
|
|
- if (config.muteLocalVideoIfNotInLastN) {
|
159
|
|
- // TODO mute or unmute if required
|
160
|
|
- // mark video on UI
|
161
|
|
- // APP.UI.markVideoMuted(true/false);
|
|
138
|
+ APP.conference.localId = room.myUserId();
|
|
139
|
+ Object.defineProperty(APP.conference, "membersCount", {
|
|
140
|
+ get: function () {
|
|
141
|
+ return Object.keys(users).length; // FIXME maybe +1?
|
162
|
142
|
}
|
163
|
143
|
});
|
164
|
144
|
|
165
|
|
- room.on(
|
166
|
|
- ConferenceEvents.ACTIVE_SPEAKER_CHANGED,
|
167
|
|
- function (id) {
|
168
|
|
- APP.UI.markDominantSpiker(id);
|
169
|
|
- }
|
170
|
|
- );
|
171
|
|
- room.on(
|
172
|
|
- ConferenceEvents.LAST_N_ENDPOINTS_CHANGED,
|
173
|
|
- function (ids) {
|
174
|
|
- APP.UI.handleLastNEndpoints(ids);
|
175
|
|
- }
|
176
|
|
- );
|
|
145
|
+ room.on(ConferenceEvents.USER_JOINED, function (id) {
|
|
146
|
+ users[id] = {
|
|
147
|
+ displayName: undefined,
|
|
148
|
+ tracks: []
|
|
149
|
+ };
|
|
150
|
+ // FIXME email???
|
|
151
|
+ APP.UI.addUser(id);
|
|
152
|
+ });
|
|
153
|
+ room.on(ConferenceEvents.USER_LEFT, function (id) {
|
|
154
|
+ delete users[id];
|
|
155
|
+ APP.UI.removeUser(id);
|
|
156
|
+ });
|
177
|
157
|
|
178
|
|
- room.on(
|
179
|
|
- ConferenceEvents.DISPLAY_NAME_CHANGED,
|
180
|
|
- function (id, displayName) {
|
181
|
|
- APP.UI.changeDisplayName(id, displayName);
|
182
|
|
- }
|
183
|
|
- );
|
184
|
158
|
|
185
|
|
- room.on(
|
186
|
|
- ConferenceEvents.USER_JOINED,
|
187
|
|
- function (id) {
|
188
|
|
- // FIXME email???
|
189
|
|
- APP.UI.addUser(id);
|
190
|
|
- }
|
191
|
|
- );
|
|
159
|
+ room.on(ConferenceEvents.TRACK_MUTE_CHANGED, function (track) {
|
|
160
|
+ // FIXME handle mute
|
|
161
|
+ });
|
|
162
|
+ room.on(ConferenceEvents.TRACK_AUDIO_LEVEL_CHANGED, function (id, lvl) {
|
|
163
|
+ APP.UI.setAudioLevel(id, lvl);
|
|
164
|
+ });
|
|
165
|
+ APP.UI.addListener(UIEvents.AUDIO_MUTED, function (muted) {
|
|
166
|
+ // FIXME mute or unmute
|
|
167
|
+ APP.UI.setAudioMuted(muted);
|
|
168
|
+ APP.conference.audioMuted = muted;
|
|
169
|
+ });
|
|
170
|
+ APP.UI.addListener(UIEvents.VIDEO_MUTED, function (muted) {
|
|
171
|
+ // FIXME mute or unmute
|
|
172
|
+ APP.UI.setVideoMuted(muted);
|
|
173
|
+ APP.conference.videoMuted = muted;
|
|
174
|
+ });
|
192
|
175
|
|
193
|
|
- room.on(
|
194
|
|
- ConferenceEvents.USER_LEFT,
|
195
|
|
- function (id) {
|
196
|
|
- APP.UI.removeUser(id);
|
197
|
|
- }
|
198
|
|
- );
|
199
|
176
|
|
200
|
|
- room.on(
|
201
|
|
- ConferenceEvents.TRACK_MUTE_CHANGED,
|
202
|
|
- function (track) {
|
203
|
|
- // FIXME handle mute
|
|
177
|
+ room.on(ConferenceEvents.IN_LAST_N_CHANGED, function (inLastN) {
|
|
178
|
+ if (config.muteLocalVideoIfNotInLastN) {
|
|
179
|
+ // TODO mute or unmute if required
|
|
180
|
+ // mark video on UI
|
|
181
|
+ // APP.UI.markVideoMuted(true/false);
|
204
|
182
|
}
|
205
|
|
- );
|
|
183
|
+ });
|
|
184
|
+ room.on(ConferenceEvents.LAST_N_ENDPOINTS_CHANGED, function (ids) {
|
|
185
|
+ APP.UI.handleLastNEndpoints(ids);
|
|
186
|
+ });
|
|
187
|
+ room.on(ConferenceEvents.ACTIVE_SPEAKER_CHANGED, function (id) {
|
|
188
|
+ APP.UI.markDominantSpiker(id);
|
|
189
|
+ });
|
206
|
190
|
|
207
|
|
- room.on(
|
208
|
|
- ConferenceEvents.TRACK_AUDIO_LEVEL_CHANGED,
|
209
|
|
- function (id, lvl) {
|
210
|
|
- APP.UI.setAudioLevel(id, lvl);
|
211
|
|
- }
|
212
|
|
- );
|
213
|
191
|
|
214
|
|
- room.on(
|
215
|
|
- ConferenceEvents.CONNECTION_INTERRUPTED,
|
216
|
|
- function () {
|
217
|
|
- APP.UI.markVideoInterrupted(true);
|
218
|
|
- }
|
219
|
|
- );
|
|
192
|
+ room.on(ConferenceEvents.CONNECTION_INTERRUPTED, function () {
|
|
193
|
+ APP.UI.markVideoInterrupted(true);
|
|
194
|
+ });
|
|
195
|
+ room.on(ConferenceEvents.CONNECTION_RESTORED, function () {
|
|
196
|
+ APP.UI.markVideoInterrupted(false);
|
|
197
|
+ });
|
220
|
198
|
|
221
|
|
- room.on(
|
222
|
|
- ConferenceEvents.CONNECTION_RESTORED,
|
223
|
|
- function () {
|
224
|
|
- APP.UI.markVideoInterrupted(false);
|
225
|
|
- }
|
226
|
|
- );
|
227
|
199
|
|
228
|
200
|
APP.connectionquality.addListener(
|
229
|
201
|
CQEvents.LOCALSTATS_UPDATED,
|
|
@@ -239,20 +211,14 @@ function initConference(connection, roomName) {
|
239
|
211
|
});
|
240
|
212
|
}
|
241
|
213
|
);
|
242
|
|
-
|
243
|
|
- APP.connectionquality.addListener(
|
244
|
|
- CQEvents.STOP,
|
245
|
|
- function () {
|
246
|
|
- APP.UI.hideStats();
|
247
|
|
- room.removeCommand(Commands.CONNECTION_QUALITY);
|
248
|
|
- }
|
249
|
|
- );
|
250
|
|
-
|
|
214
|
+ APP.connectionquality.addListener(CQEvents.STOP, function () {
|
|
215
|
+ APP.UI.hideStats();
|
|
216
|
+ room.removeCommand(Commands.CONNECTION_QUALITY);
|
|
217
|
+ });
|
251
|
218
|
// listen to remote stats
|
252
|
219
|
room.addCommandListener(Commands.CONNECTION_QUALITY, function (data) {
|
253
|
220
|
APP.connectionquality.updateRemoteStats(data.attributes.id, data.value);
|
254
|
221
|
});
|
255
|
|
-
|
256
|
222
|
APP.connectionquality.addListener(
|
257
|
223
|
CQEvents.REMOTESTATS_UPDATED,
|
258
|
224
|
function (id, percent, stats) {
|
|
@@ -260,7 +226,8 @@ function initConference(connection, roomName) {
|
260
|
226
|
}
|
261
|
227
|
);
|
262
|
228
|
|
263
|
|
- // share email with other users
|
|
229
|
+
|
|
230
|
+ // share email with other users
|
264
|
231
|
function sendEmail(email) {
|
265
|
232
|
room.sendCommand(Commands.EMAIL, {
|
266
|
233
|
value: email,
|
|
@@ -270,38 +237,51 @@ function initConference(connection, roomName) {
|
270
|
237
|
});
|
271
|
238
|
}
|
272
|
239
|
|
|
240
|
+ var email = APP.settings.getEmail();
|
|
241
|
+ email && sendEmail(email);
|
273
|
242
|
APP.UI.addListener(UIEvents.EMAIL_CHANGED, function (email) {
|
274
|
243
|
APP.settings.setEmail(email);
|
275
|
|
- APP.UI.setUserAvatar(room.myUserId(), data.value);
|
|
244
|
+ APP.UI.setUserAvatar(room.myUserId(), email);
|
276
|
245
|
sendEmail(email);
|
277
|
246
|
});
|
278
|
|
- var email = APP.settings.getEmail();
|
279
|
|
- if (email) {
|
280
|
|
- sendEmail(APP.settings.getEmail());
|
281
|
|
- }
|
282
|
247
|
room.addCommandListener(Commands.EMAIL, function (data) {
|
283
|
248
|
APP.UI.setUserAvatar(data.attributes.id, data.value);
|
284
|
249
|
});
|
285
|
250
|
|
|
251
|
+
|
|
252
|
+ room.on(ConferenceEvents.DISPLAY_NAME_CHANGED, function (id, displayName) {
|
|
253
|
+ APP.UI.changeDisplayName(id, displayName);
|
|
254
|
+ });
|
|
255
|
+ APP.UI.addListener(UIEvents.NICKNAME_CHANGED, function (nickname) {
|
|
256
|
+ APP.settings.setDisplayName(nickname);
|
|
257
|
+ room.setDisplayName(nickname);
|
|
258
|
+ });
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+ APP.UI.addListener(UIEvents.MESSAGE_CREATED, function (message) {
|
|
262
|
+ room.sendTextMessage(message);
|
|
263
|
+ });
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+ room.on(ConferenceErrors.PASSWORD_REQUIRED, function () {
|
|
267
|
+ // FIXME handle
|
|
268
|
+ });
|
|
269
|
+ room.on(ConferenceErrors.CONNECTION_ERROR, function () {
|
|
270
|
+ // FIXME handle
|
|
271
|
+ });
|
|
272
|
+
|
|
273
|
+ APP.UI.addListener(
|
|
274
|
+ UIEvents.START_MUTED_CHANGED,
|
|
275
|
+ function (startAudioMuted, startVideoMuted) {
|
|
276
|
+ // FIXME start muted
|
|
277
|
+ }
|
|
278
|
+ );
|
|
279
|
+
|
286
|
280
|
return new Promise(function (resolve, reject) {
|
287
|
281
|
room.on(
|
288
|
282
|
ConferenceEvents.CONFERENCE_JOINED,
|
289
|
283
|
function () {
|
290
|
|
- resolve(conf);
|
291
|
|
- }
|
292
|
|
- );
|
293
|
|
- room.on(
|
294
|
|
- ConferenceErrors.PASSWORD_REQUIRED,
|
295
|
|
- function () {
|
296
|
|
- // FIXME handle
|
297
|
|
- reject();
|
298
|
|
- }
|
299
|
|
- );
|
300
|
|
- room.on(
|
301
|
|
- ConferenceErrors.CONNECTION_ERROR,
|
302
|
|
- function () {
|
303
|
|
- // FIXME handle
|
304
|
|
- reject();
|
|
284
|
+ resolve();
|
305
|
285
|
}
|
306
|
286
|
);
|
307
|
287
|
APP.UI.closeAuthenticationDialog();
|
|
@@ -310,45 +290,35 @@ function initConference(connection, roomName) {
|
310
|
290
|
var nick = APP.UI.askForNickname();
|
311
|
291
|
}
|
312
|
292
|
room.join();
|
|
293
|
+ }).catch(function (err) {
|
|
294
|
+ if (err[0] === ConferenceErrors.PASSWORD_REQUIRED) {
|
|
295
|
+ // FIXME ask for password and try again
|
|
296
|
+ return initConference(connection, roomName);
|
|
297
|
+ }
|
|
298
|
+
|
|
299
|
+ // FIXME else notify that we cannot conenct to the room
|
|
300
|
+
|
|
301
|
+ throw new Error(err[0]);
|
313
|
302
|
});
|
314
|
303
|
}
|
315
|
304
|
|
316
|
305
|
function init() {
|
317
|
306
|
connect().then(function (connection) {
|
318
|
307
|
return initConference(connection, APP.UI.generateRoomName());
|
319
|
|
- }).then(function (conference) {
|
320
|
|
- APP.conference = conference;
|
321
|
|
-
|
|
308
|
+ }).then(function () {
|
322
|
309
|
APP.UI.start();
|
323
|
310
|
|
324
|
|
- // FIXME find own jid
|
325
|
|
- APP.UI.initConference("asdfasdf");
|
326
|
|
-
|
327
|
|
- APP.UI.addListener(UIEvents.NICKNAME_CHANGED, function (nickname) {
|
328
|
|
- APP.conference.setNickname(nickname);
|
329
|
|
- });
|
330
|
|
-
|
331
|
|
- APP.UI.addListener(UIEvents.MESSAGE_CREATED, function (message) {
|
332
|
|
- APP.conference.sendMessage(message);
|
333
|
|
- });
|
|
311
|
+ APP.UI.initConference();
|
334
|
312
|
|
335
|
313
|
APP.UI.addListener(UIEvents.LANG_CHANGED, function (language) {
|
336
|
314
|
APP.translation.setLanguage(language);
|
337
|
315
|
APP.settings.setLanguage(language);
|
338
|
316
|
});
|
339
|
317
|
|
340
|
|
- APP.UI.addListener(
|
341
|
|
- UIEvents.START_MUTED_CHANGED,
|
342
|
|
- function (startAudioMuted, startVideoMuted) {
|
343
|
|
- APP.conference.setStartMuted(startAudioMuted, startVideoMuted);
|
344
|
|
- }
|
345
|
|
- );
|
346
|
|
-
|
347
|
318
|
APP.desktopsharing.init();
|
348
|
319
|
APP.statistics.start();
|
349
|
320
|
APP.connectionquality.init();
|
350
|
321
|
APP.keyboardshortcut.init();
|
351
|
|
- APP.members.start();
|
352
|
322
|
});
|
353
|
323
|
}
|
354
|
324
|
|
|
@@ -397,7 +367,7 @@ $(document).ready(function () {
|
397
|
367
|
|
398
|
368
|
APP.translation.init();
|
399
|
369
|
|
400
|
|
- if(APP.API.isEnabled()) {
|
|
370
|
+ if (APP.API.isEnabled()) {
|
401
|
371
|
APP.API.init();
|
402
|
372
|
}
|
403
|
373
|
|
|
@@ -405,8 +375,9 @@ $(document).ready(function () {
|
405
|
375
|
});
|
406
|
376
|
|
407
|
377
|
$(window).bind('beforeunload', function () {
|
408
|
|
- if(APP.API.isEnabled())
|
|
378
|
+ if (APP.API.isEnabled()) {
|
409
|
379
|
APP.API.dispose();
|
|
380
|
+ }
|
410
|
381
|
});
|
411
|
382
|
|
412
|
383
|
module.exports = APP;
|