|
|
@@ -119,7 +119,7 @@ function connect() {
|
|
119
|
119
|
connection.connect();
|
|
120
|
120
|
}).catch(function (errType, msg) {
|
|
121
|
121
|
// TODO handle OTHER_ERROR only
|
|
122
|
|
- UI.notifyConnectionFailed(msg);
|
|
|
122
|
+ APP.UI.notifyConnectionFailed(msg);
|
|
123
|
123
|
|
|
124
|
124
|
// rethrow
|
|
125
|
125
|
throw new Error(errType);
|
|
|
@@ -140,7 +140,7 @@ function initConference(connection, roomName) {
|
|
140
|
140
|
if (config.muteLocalVideoIfNotInLastN) {
|
|
141
|
141
|
// TODO mute or unmute if required
|
|
142
|
142
|
// mark video on UI
|
|
143
|
|
- // UI.markVideoMuted(true/false);
|
|
|
143
|
+ // APP.UI.markVideoMuted(true/false);
|
|
144
|
144
|
}
|
|
145
|
145
|
});
|
|
146
|
146
|
|
|
|
@@ -160,7 +160,7 @@ function initConference(connection, roomName) {
|
|
160
|
160
|
room.on(
|
|
161
|
161
|
ConferenceEvents.DISPLAY_NAME_CHANGED,
|
|
162
|
162
|
function (id, displayName) {
|
|
163
|
|
- UI.changeDisplayName(id, displayName);
|
|
|
163
|
+ APP.UI.changeDisplayName(id, displayName);
|
|
164
|
164
|
}
|
|
165
|
165
|
);
|
|
166
|
166
|
|
|
|
@@ -168,14 +168,14 @@ function initConference(connection, roomName) {
|
|
168
|
168
|
ConferenceEvents.USER_JOINED,
|
|
169
|
169
|
function (id) {
|
|
170
|
170
|
// FIXME ????
|
|
171
|
|
- UI.addUser();
|
|
|
171
|
+ APP.UI.addUser();
|
|
172
|
172
|
}
|
|
173
|
173
|
);
|
|
174
|
174
|
|
|
175
|
175
|
room.on(
|
|
176
|
176
|
ConferenceEvents.USER_LEFT,
|
|
177
|
177
|
function (id) {
|
|
178
|
|
- UI.removeUser(id);
|
|
|
178
|
+ APP.UI.removeUser(id);
|
|
179
|
179
|
}
|
|
180
|
180
|
);
|
|
181
|
181
|
|
|
|
@@ -189,7 +189,21 @@ function initConference(connection, roomName) {
|
|
189
|
189
|
room.on(
|
|
190
|
190
|
ConferenceEvents.TRACK_AUDIO_LEVEL_CHANGED,
|
|
191
|
191
|
function (id, lvl) {
|
|
192
|
|
- UI.setAudioLevel(id, lvl);
|
|
|
192
|
+ APP.UI.setAudioLevel(id, lvl);
|
|
|
193
|
+ }
|
|
|
194
|
+ );
|
|
|
195
|
+
|
|
|
196
|
+ room.on(
|
|
|
197
|
+ ConferenceEvents.CONNECTION_INTERRUPTED,
|
|
|
198
|
+ function () {
|
|
|
199
|
+ APP.UI.markVideoInterrupted(true);
|
|
|
200
|
+ }
|
|
|
201
|
+ );
|
|
|
202
|
+
|
|
|
203
|
+ room.on(
|
|
|
204
|
+ ConferenceEvents.CONNECTION_RESTORED,
|
|
|
205
|
+ function () {
|
|
|
206
|
+ APP.UI.markVideoInterrupted(false);
|
|
193
|
207
|
}
|
|
194
|
208
|
);
|
|
195
|
209
|
|
|
|
@@ -219,7 +233,7 @@ function initConference(connection, roomName) {
|
|
219
|
233
|
|
|
220
|
234
|
function init() {
|
|
221
|
235
|
connect().then(function (connection) {
|
|
222
|
|
- return initConference(connection, UI.generateRoomName());
|
|
|
236
|
+ return initConference(connection, APP.UI.generateRoomName());
|
|
223
|
237
|
}).then(function (conference) {
|
|
224
|
238
|
APP.conference = conference;
|
|
225
|
239
|
|