|
@@ -1,18 +1,18 @@
|
1
|
|
-/* global config, APP, $, Strophe, require, interfaceConfig */
|
|
1
|
+/* global config, APP, $, interfaceConfig */
|
2
|
2
|
/* jshint -W101 */
|
3
|
|
-var AudioLevels = require("../audio_levels/AudioLevels");
|
4
|
|
-var ContactList = require("../side_pannels/contactlist/ContactList");
|
5
|
|
-var MediaStreamType = require("../../../service/RTC/MediaStreamTypes");
|
6
|
|
-var UIEvents = require("../../../service/UI/UIEvents");
|
7
|
|
-var UIUtil = require("../util/UIUtil");
|
8
|
3
|
|
9
|
|
-var RTC = require("../../RTC/RTC");
|
10
|
|
-var RTCBrowserType = require('../../RTC/RTCBrowserType');
|
|
4
|
+import AudioLevels from "../audio_levels/AudioLevels";
|
|
5
|
+import ContactList from "../side_pannels/contactlist/ContactList";
|
11
|
6
|
|
12
|
|
-var RemoteVideo = require("./RemoteVideo");
|
13
|
|
-var LargeVideo = require("./LargeVideo");
|
14
|
|
-var LocalVideo = require("./LocalVideo");
|
|
7
|
+import UIEvents from "../../../service/UI/UIEvents";
|
|
8
|
+import UIUtil from "../util/UIUtil";
|
15
|
9
|
|
|
10
|
+import RemoteVideo from "./RemoteVideo";
|
|
11
|
+import LargeVideo from "./LargeVideo";
|
|
12
|
+import LocalVideo from "./LocalVideo";
|
|
13
|
+
|
|
14
|
+var MediaStreamType = require("../../../service/RTC/MediaStreamTypes");
|
|
15
|
+var RTCBrowserType = require('../../RTC/RTCBrowserType');
|
16
|
16
|
|
17
|
17
|
var remoteVideos = {};
|
18
|
18
|
var remoteVideoTypes = {};
|
|
@@ -23,7 +23,7 @@ var lastNCount = config.channelLastN;
|
23
|
23
|
var localLastNCount = config.channelLastN;
|
24
|
24
|
var localLastNSet = [];
|
25
|
25
|
var lastNEndpointsCache = [];
|
26
|
|
-var lastNPickupJid = null;
|
|
26
|
+var lastNPickupId = null;
|
27
|
27
|
|
28
|
28
|
var eventEmitter = null;
|
29
|
29
|
|
|
@@ -33,8 +33,50 @@ var eventEmitter = null;
|
33
|
33
|
*/
|
34
|
34
|
var focusedVideoResourceJid = null;
|
35
|
35
|
|
36
|
|
-var VideoLayout = (function (my) {
|
37
|
|
- my.init = function (emitter) {
|
|
36
|
+/**
|
|
37
|
+ * On contact list item clicked.
|
|
38
|
+ */
|
|
39
|
+$(ContactList).bind('contactclicked', function(event, id) {
|
|
40
|
+ if (!id) {
|
|
41
|
+ return;
|
|
42
|
+ }
|
|
43
|
+
|
|
44
|
+ if (APP.conference.isLocalId(id)) {
|
|
45
|
+ $("#localVideoContainer").click();
|
|
46
|
+ return;
|
|
47
|
+ }
|
|
48
|
+
|
|
49
|
+ var remoteVideo = remoteVideos[id];
|
|
50
|
+ if (remoteVideo && remoteVideo.selectVideoElement().length) {
|
|
51
|
+ var videoThumb = remoteVideo.selectVideoElement()[0];
|
|
52
|
+ // It is not always the case that a videoThumb exists (if there is
|
|
53
|
+ // no actual video).
|
|
54
|
+ if (RTC.getVideoSrc(videoThumb)) {
|
|
55
|
+
|
|
56
|
+ // We have a video src, great! Let's update the large video
|
|
57
|
+ // now.
|
|
58
|
+ VideoLayout.handleVideoThumbClicked(false, id);
|
|
59
|
+ } else {
|
|
60
|
+
|
|
61
|
+ // If we don't have a video src for jid, there's absolutely
|
|
62
|
+ // no point in calling handleVideoThumbClicked; Quite
|
|
63
|
+ // simply, it won't work because it needs an src to attach
|
|
64
|
+ // to the large video.
|
|
65
|
+ //
|
|
66
|
+ // Instead, we trigger the pinned endpoint changed event to
|
|
67
|
+ // let the bridge adjust its lastN set for myjid and store
|
|
68
|
+ // the pinned user in the lastNPickupId variable to be
|
|
69
|
+ // picked up later by the lastN changed event handler.
|
|
70
|
+
|
|
71
|
+ lastNPickupId = id;
|
|
72
|
+ eventEmitter.emit(UIEvents.PINNED_ENDPOINT, id);
|
|
73
|
+ }
|
|
74
|
+ }
|
|
75
|
+});
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+var VideoLayout = {
|
|
79
|
+ init (emitter) {
|
38
|
80
|
eventEmitter = emitter;
|
39
|
81
|
localVideoThumbnail = new LocalVideo(VideoLayout, emitter);
|
40
|
82
|
if (interfaceConfig.filmStripOnly) {
|
|
@@ -45,19 +87,21 @@ var VideoLayout = (function (my) {
|
45
|
87
|
|
46
|
88
|
VideoLayout.resizeLargeVideoContainer();
|
47
|
89
|
|
48
|
|
- };
|
|
90
|
+ },
|
49
|
91
|
|
50
|
|
- my.isInLastN = function(resource) {
|
|
92
|
+ isInLastN (resource) {
|
51
|
93
|
return lastNCount < 0 || // lastN is disabled
|
52
|
94
|
// lastNEndpoints cache not built yet
|
53
|
95
|
(lastNCount > 0 && !lastNEndpointsCache.length) ||
|
54
|
96
|
(lastNEndpointsCache &&
|
55
|
97
|
lastNEndpointsCache.indexOf(resource) !== -1);
|
56
|
|
- };
|
|
98
|
+ },
|
57
|
99
|
|
58
|
|
- my.changeLocalAudio = function(stream, isMuted) {
|
59
|
|
- APP.RTC.attachMediaStream($('#localAudio'), stream.getOriginalStream());
|
60
|
|
- var localAudio = document.getElementById('localAudio');
|
|
100
|
+ changeLocalAudio (stream) {
|
|
101
|
+ let localAudio = document.getElementById('localAudio');
|
|
102
|
+ stream.attach($(localAudio));
|
|
103
|
+
|
|
104
|
+ return; // FIXME maybe move this into the library?
|
61
|
105
|
// Writing volume not allowed in IE
|
62
|
106
|
if (!RTCBrowserType.isIExplorer()) {
|
63
|
107
|
localAudio.autoplay = true;
|
|
@@ -73,39 +117,41 @@ var VideoLayout = (function (my) {
|
73
|
117
|
// which will result in audio mute issues
|
74
|
118
|
$('#localAudio').hide();
|
75
|
119
|
}
|
76
|
|
- };
|
|
120
|
+ },
|
77
|
121
|
|
78
|
|
- my.changeLocalVideo = function(stream, isMuted) {
|
|
122
|
+ changeLocalVideo (stream) {
|
79
|
123
|
// Set default display name.
|
80
|
124
|
localVideoThumbnail.setDisplayName();
|
81
|
125
|
localVideoThumbnail.createConnectionIndicator();
|
82
|
126
|
|
83
|
|
- this.onVideoTypeChanged(APP.xmpp.myResource(), stream.videoType);
|
|
127
|
+ let localId = APP.conference.localId;
|
|
128
|
+ this.onVideoTypeChanged(localId, stream.getType());
|
84
|
129
|
|
85
|
130
|
AudioLevels.updateAudioLevelCanvas(null, VideoLayout);
|
86
|
131
|
|
87
|
|
- localVideoThumbnail.changeVideo(stream, isMuted);
|
|
132
|
+ localVideoThumbnail.changeVideo(stream);
|
88
|
133
|
|
89
|
134
|
/* force update if we're currently being displayed */
|
90
|
|
- if (LargeVideo.isCurrentlyOnLarge(APP.xmpp.myResource())) {
|
91
|
|
- LargeVideo.updateLargeVideo(APP.xmpp.myResource(), true);
|
|
135
|
+ if (LargeVideo.isCurrentlyOnLarge(localId)) {
|
|
136
|
+ LargeVideo.updateLargeVideo(localId, true);
|
92
|
137
|
}
|
93
|
|
- };
|
|
138
|
+ },
|
94
|
139
|
|
95
|
|
- my.mucJoined = function () {
|
96
|
|
- var myResourceJid = APP.xmpp.myResource();
|
97
|
|
- localVideoThumbnail.joined(APP.xmpp.myJid());
|
|
140
|
+ mucJoined () {
|
|
141
|
+ let id = APP.conference.localId;
|
|
142
|
+ localVideoThumbnail.joined(id);
|
98
|
143
|
|
99
|
|
- if (!LargeVideo.getResourceJid())
|
100
|
|
- LargeVideo.updateLargeVideo(myResourceJid, true);
|
101
|
|
- };
|
|
144
|
+ if (!LargeVideo.id) {
|
|
145
|
+ LargeVideo.updateLargeVideo(id, true);
|
|
146
|
+ }
|
|
147
|
+ },
|
102
|
148
|
|
103
|
149
|
/**
|
104
|
150
|
* Adds or removes icons for not available camera and microphone.
|
105
|
151
|
* @param resourceJid the jid of user
|
106
|
152
|
* @param devices available devices
|
107
|
153
|
*/
|
108
|
|
- my.setDeviceAvailabilityIcons = function (resourceJid, devices) {
|
|
154
|
+ setDeviceAvailabilityIcons (resourceJid, devices) {
|
109
|
155
|
if(!devices)
|
110
|
156
|
return;
|
111
|
157
|
|
|
@@ -115,31 +161,31 @@ var VideoLayout = (function (my) {
|
115
|
161
|
if(remoteVideos[resourceJid])
|
116
|
162
|
remoteVideos[resourceJid].setDeviceAvailabilityIcons(devices);
|
117
|
163
|
}
|
118
|
|
- };
|
|
164
|
+ },
|
119
|
165
|
|
120
|
166
|
/**
|
121
|
167
|
* Checks if removed video is currently displayed and tries to display
|
122
|
168
|
* another one instead.
|
123
|
169
|
*/
|
124
|
|
- my.updateRemovedVideo = function(resourceJid) {
|
125
|
|
- var newResourceJid;
|
|
170
|
+ updateRemovedVideo (id) {
|
|
171
|
+ let newId;
|
126
|
172
|
|
127
|
|
- if (resourceJid === LargeVideo.getResourceJid()) {
|
|
173
|
+ if (id === LargeVideo.getId()) {
|
128
|
174
|
// We'll show user's avatar if he is the dominant speaker or if
|
129
|
175
|
// his video thumbnail is pinned
|
130
|
|
- if (remoteVideos[resourceJid] &&
|
131
|
|
- resourceJid === focusedVideoResourceJid ||
|
132
|
|
- resourceJid === currentDominantSpeaker) {
|
133
|
|
- newResourceJid = resourceJid;
|
|
176
|
+ if (remoteVideos[id] &&
|
|
177
|
+ id === focusedVideoResourceJid ||
|
|
178
|
+ id === currentDominantSpeaker) {
|
|
179
|
+ newId = id;
|
134
|
180
|
} else {
|
135
|
181
|
// Otherwise select last visible video
|
136
|
|
- newResourceJid = this.electLastVisibleVideo();
|
|
182
|
+ newId = this.electLastVisibleVideo();
|
137
|
183
|
}
|
138
|
|
- LargeVideo.updateLargeVideo(newResourceJid);
|
|
184
|
+ LargeVideo.updateLargeVideo(id);
|
139
|
185
|
}
|
140
|
|
- };
|
|
186
|
+ },
|
141
|
187
|
|
142
|
|
- my.electLastVisibleVideo = function () {
|
|
188
|
+ electLastVisibleVideo () {
|
143
|
189
|
// pick the last visible video in the row
|
144
|
190
|
// if nobody else is left, this picks the local video
|
145
|
191
|
var jid;
|
|
@@ -174,39 +220,36 @@ var VideoLayout = (function (my) {
|
174
|
220
|
|
175
|
221
|
console.info("electLastVisibleVideo: " + jid);
|
176
|
222
|
return jid;
|
177
|
|
- };
|
|
223
|
+ },
|
178
|
224
|
|
179
|
|
- my.onRemoteStreamAdded = function (stream) {
|
180
|
|
- if (stream.peerjid) {
|
181
|
|
- VideoLayout.ensurePeerContainerExists(stream.peerjid);
|
|
225
|
+ onRemoteStreamAdded (stream) {
|
|
226
|
+ let id = stream.getParticipantId();
|
|
227
|
+ VideoLayout.ensurePeerContainerExists(id);
|
182
|
228
|
|
183
|
|
- var resourceJid = Strophe.getResourceFromJid(stream.peerjid);
|
184
|
|
- remoteVideos[resourceJid].addRemoteStreamElement(stream);
|
185
|
|
- }
|
186
|
|
- };
|
|
229
|
+ remoteVideos[id].addRemoteStreamElement(stream);
|
|
230
|
+ },
|
187
|
231
|
|
188
|
|
- my.getLargeVideoResource = function () {
|
189
|
|
- return LargeVideo.getResourceJid();
|
190
|
|
- };
|
|
232
|
+ getLargeVideoId () {
|
|
233
|
+ return LargeVideo.getId();
|
|
234
|
+ },
|
191
|
235
|
|
192
|
236
|
/**
|
193
|
237
|
* Return the type of the remote video.
|
194
|
|
- * @param jid the jid for the remote video
|
|
238
|
+ * @param id the id for the remote video
|
195
|
239
|
* @returns the video type video or screen.
|
196
|
240
|
*/
|
197
|
|
- my.getRemoteVideoType = function (jid) {
|
198
|
|
- return remoteVideoTypes[jid];
|
199
|
|
- };
|
|
241
|
+ getRemoteVideoType (id) {
|
|
242
|
+ return remoteVideoTypes[id];
|
|
243
|
+ },
|
200
|
244
|
|
201
|
245
|
/**
|
202
|
246
|
* Called when large video update is finished
|
203
|
247
|
* @param currentSmallVideo small video currently displayed on large video
|
204
|
248
|
*/
|
205
|
|
- my.largeVideoUpdated = function (currentSmallVideo) {
|
|
249
|
+ largeVideoUpdated (currentSmallVideo) {
|
206
|
250
|
// Makes sure that dominant speaker UI
|
207
|
251
|
// is enabled only on current small video
|
208
|
|
- localVideoThumbnail.enableDominantSpeaker(
|
209
|
|
- localVideoThumbnail === currentSmallVideo);
|
|
252
|
+ localVideoThumbnail.enableDominantSpeaker(localVideoThumbnail === currentSmallVideo);
|
210
|
253
|
Object.keys(remoteVideos).forEach(
|
211
|
254
|
function (resourceJid) {
|
212
|
255
|
var remoteVideo = remoteVideos[resourceJid];
|
|
@@ -216,9 +259,9 @@ var VideoLayout = (function (my) {
|
216
|
259
|
}
|
217
|
260
|
}
|
218
|
261
|
);
|
219
|
|
- };
|
|
262
|
+ },
|
220
|
263
|
|
221
|
|
- my.handleVideoThumbClicked = function(noPinnedEndpointChangedEvent,
|
|
264
|
+ handleVideoThumbClicked (noPinnedEndpointChangedEvent,
|
222
|
265
|
resourceJid) {
|
223
|
266
|
if(focusedVideoResourceJid) {
|
224
|
267
|
var oldSmallVideo
|
|
@@ -269,50 +312,46 @@ var VideoLayout = (function (my) {
|
269
|
312
|
el.volume = 1;
|
270
|
313
|
});
|
271
|
314
|
}
|
272
|
|
- };
|
|
315
|
+ },
|
273
|
316
|
|
274
|
317
|
|
275
|
318
|
/**
|
276
|
|
- * Checks if container for participant identified by given peerJid exists
|
|
319
|
+ * Checks if container for participant identified by given id exists
|
277
|
320
|
* in the document and creates it eventually.
|
278
|
321
|
*
|
279
|
|
- * @param peerJid peer Jid to check.
|
280
|
|
- *
|
281
|
322
|
* @return Returns <tt>true</tt> if the peer container exists,
|
282
|
323
|
* <tt>false</tt> - otherwise
|
283
|
324
|
*/
|
284
|
|
- my.ensurePeerContainerExists = function(peerJid) {
|
285
|
|
- ContactList.ensureAddContact(peerJid);
|
286
|
|
-
|
287
|
|
- var resourceJid = Strophe.getResourceFromJid(peerJid);
|
|
325
|
+ ensurePeerContainerExists (id) {
|
|
326
|
+ ContactList.ensureAddContact(id);
|
288
|
327
|
|
289
|
|
- if (!remoteVideos[resourceJid]) {
|
|
328
|
+ if (remoteVideos[id]) {
|
|
329
|
+ return;
|
|
330
|
+ }
|
290
|
331
|
|
291
|
|
- var remoteVideo = new RemoteVideo(peerJid, VideoLayout);
|
292
|
|
- remoteVideos[resourceJid] = remoteVideo;
|
|
332
|
+ let remoteVideo = new RemoteVideo(id, VideoLayout, eventEmitter);
|
|
333
|
+ remoteVideos[id] = remoteVideo;
|
293
|
334
|
|
294
|
|
- var videoType = remoteVideoTypes[resourceJid];
|
295
|
|
- if (videoType) {
|
296
|
|
- remoteVideo.setVideoType(videoType);
|
297
|
|
- }
|
|
335
|
+ let videoType = remoteVideoTypes[id];
|
|
336
|
+ if (videoType) {
|
|
337
|
+ remoteVideo.setVideoType(videoType);
|
|
338
|
+ }
|
298
|
339
|
|
299
|
|
- // In case this is not currently in the last n we don't show it.
|
300
|
|
- if (localLastNCount &&
|
301
|
|
- localLastNCount > 0 &&
|
302
|
|
- $('#remoteVideos>span').length >= localLastNCount + 2) {
|
303
|
|
- remoteVideo.showPeerContainer('hide');
|
304
|
|
- }
|
305
|
|
- else
|
306
|
|
- VideoLayout.resizeThumbnails();
|
|
340
|
+ // In case this is not currently in the last n we don't show it.
|
|
341
|
+ if (localLastNCount && localLastNCount > 0 &&
|
|
342
|
+ $('#remoteVideos>span').length >= localLastNCount + 2) {
|
|
343
|
+ remoteVideo.showPeerContainer('hide');
|
|
344
|
+ } else {
|
|
345
|
+ VideoLayout.resizeThumbnails();
|
307
|
346
|
}
|
308
|
|
- };
|
|
347
|
+ },
|
309
|
348
|
|
310
|
349
|
|
311
|
|
- my.inputDisplayNameHandler = function (name) {
|
|
350
|
+ inputDisplayNameHandler (name) {
|
312
|
351
|
localVideoThumbnail.inputDisplayNameHandler(name);
|
313
|
|
- };
|
|
352
|
+ },
|
314
|
353
|
|
315
|
|
- my.videoactive = function (videoelem, resourceJid) {
|
|
354
|
+ videoactive (videoelem, resourceJid) {
|
316
|
355
|
|
317
|
356
|
console.info(resourceJid + " video is now active");
|
318
|
357
|
|
|
@@ -330,61 +369,50 @@ var VideoLayout = (function (my) {
|
330
|
369
|
currentDominantSpeaker === resourceJid)) {
|
331
|
370
|
LargeVideo.updateLargeVideo(resourceJid, true);
|
332
|
371
|
}
|
333
|
|
- };
|
|
372
|
+ },
|
334
|
373
|
|
335
|
374
|
/**
|
336
|
375
|
* Shows the presence status message for the given video.
|
337
|
376
|
*/
|
338
|
|
- my.setPresenceStatus = function (resourceJid, statusMsg) {
|
|
377
|
+ setPresenceStatus (resourceJid, statusMsg) {
|
339
|
378
|
remoteVideos[resourceJid].setPresenceStatus(statusMsg);
|
340
|
|
- };
|
|
379
|
+ },
|
341
|
380
|
|
342
|
381
|
/**
|
343
|
382
|
* Shows a visual indicator for the moderator of the conference.
|
344
|
383
|
*/
|
345
|
|
- my.showModeratorIndicator = function () {
|
346
|
|
-
|
347
|
|
- var isModerator = APP.xmpp.isModerator();
|
|
384
|
+ showModeratorIndicator () {
|
|
385
|
+ let isModerator = APP.conference.isModerator;
|
348
|
386
|
if (isModerator) {
|
349
|
387
|
localVideoThumbnail.createModeratorIndicatorElement();
|
350
|
388
|
}
|
351
|
389
|
|
352
|
|
- var members = APP.xmpp.getMembers();
|
353
|
|
-
|
354
|
|
- Object.keys(members).forEach(function (jid) {
|
355
|
|
-
|
356
|
|
- var resourceJid = Strophe.getResourceFromJid(jid);
|
357
|
|
- var member = members[jid];
|
358
|
|
-
|
359
|
|
- if (member.isFocus) {
|
360
|
|
- // Skip server side focus
|
361
|
|
- return;
|
362
|
|
- }
|
363
|
|
-
|
364
|
|
- if (member.role === 'moderator') {
|
365
|
|
- remoteVideos[resourceJid].removeRemoteVideoMenu();
|
366
|
|
- remoteVideos[resourceJid].createModeratorIndicatorElement();
|
|
390
|
+ APP.conference.listMembers().forEach(function (member) {
|
|
391
|
+ let id = member.getId();
|
|
392
|
+ if (member.isModerator()) {
|
|
393
|
+ remoteVideos[id].removeRemoteVideoMenu();
|
|
394
|
+ remoteVideos[id].createModeratorIndicatorElement();
|
367
|
395
|
} else if (isModerator) {
|
368
|
396
|
// We are moderator, but user is not - add menu
|
369
|
|
- if ($('#remote_popupmenu_' + resourceJid).length <= 0) {
|
370
|
|
- remoteVideos[resourceJid].addRemoteVideoMenu();
|
|
397
|
+ if ($(`#remote_popupmenu_${id}`).length <= 0) {
|
|
398
|
+ remoteVideos[id].addRemoteVideoMenu();
|
371
|
399
|
}
|
372
|
400
|
}
|
373
|
401
|
});
|
374
|
|
- };
|
|
402
|
+ },
|
375
|
403
|
|
376
|
404
|
/*
|
377
|
405
|
* Shows or hides the audio muted indicator over the local thumbnail video.
|
378
|
406
|
* @param {boolean} isMuted
|
379
|
407
|
*/
|
380
|
|
- my.showLocalAudioIndicator = function(isMuted) {
|
|
408
|
+ showLocalAudioIndicator (isMuted) {
|
381
|
409
|
localVideoThumbnail.showAudioIndicator(isMuted);
|
382
|
|
- };
|
|
410
|
+ },
|
383
|
411
|
|
384
|
412
|
/**
|
385
|
413
|
* Resizes the large video container.
|
386
|
414
|
*/
|
387
|
|
- my.resizeLargeVideoContainer = function () {
|
|
415
|
+ resizeLargeVideoContainer () {
|
388
|
416
|
if(LargeVideo.isEnabled()) {
|
389
|
417
|
LargeVideo.resize();
|
390
|
418
|
} else {
|
|
@@ -392,12 +420,12 @@ var VideoLayout = (function (my) {
|
392
|
420
|
}
|
393
|
421
|
VideoLayout.resizeThumbnails();
|
394
|
422
|
LargeVideo.position();
|
395
|
|
- };
|
|
423
|
+ },
|
396
|
424
|
|
397
|
425
|
/**
|
398
|
426
|
* Resizes thumbnails.
|
399
|
427
|
*/
|
400
|
|
- my.resizeThumbnails = function(animate) {
|
|
428
|
+ resizeThumbnails (animate) {
|
401
|
429
|
var videoSpaceWidth = $('#remoteVideos').width();
|
402
|
430
|
|
403
|
431
|
var thumbnailSize = VideoLayout.calculateThumbnailSize(videoSpaceWidth);
|
|
@@ -441,14 +469,14 @@ var VideoLayout = (function (my) {
|
441
|
469
|
|
442
|
470
|
$(document).trigger("remotevideo.resized", [width, height]);
|
443
|
471
|
}
|
444
|
|
- };
|
|
472
|
+ },
|
445
|
473
|
|
446
|
474
|
/**
|
447
|
475
|
* Calculates the thumbnail size.
|
448
|
476
|
*
|
449
|
477
|
* @param videoSpaceWidth the width of the video space
|
450
|
478
|
*/
|
451
|
|
- my.calculateThumbnailSize = function (videoSpaceWidth) {
|
|
479
|
+ calculateThumbnailSize (videoSpaceWidth) {
|
452
|
480
|
// Calculate the available height, which is the inner window height
|
453
|
481
|
// minus 39px for the header minus 2px for the delimiter lines on the
|
454
|
482
|
// top and bottom of the large video, minus the 36px space inside the
|
|
@@ -478,7 +506,7 @@ var VideoLayout = (function (my) {
|
478
|
506
|
}
|
479
|
507
|
|
480
|
508
|
return [availableWidth, availableHeight];
|
481
|
|
- };
|
|
509
|
+ },
|
482
|
510
|
|
483
|
511
|
/**
|
484
|
512
|
* Returns the corresponding resource jid to the given peer container
|
|
@@ -487,66 +515,21 @@ var VideoLayout = (function (my) {
|
487
|
515
|
* @return the corresponding resource jid to the given peer container
|
488
|
516
|
* DOM element
|
489
|
517
|
*/
|
490
|
|
- my.getPeerContainerResourceJid = function (containerElement) {
|
|
518
|
+ getPeerContainerResourceJid (containerElement) {
|
491
|
519
|
if (localVideoThumbnail.container === containerElement) {
|
492
|
|
- return localVideoThumbnail.getResourceJid();
|
|
520
|
+ return localVideoThumbnail.getId();
|
493
|
521
|
}
|
494
|
522
|
|
495
|
523
|
var i = containerElement.id.indexOf('participant_');
|
496
|
524
|
|
497
|
525
|
if (i >= 0)
|
498
|
526
|
return containerElement.id.substring(i + 12);
|
499
|
|
- };
|
500
|
|
-
|
501
|
|
- /**
|
502
|
|
- * On contact list item clicked.
|
503
|
|
- */
|
504
|
|
- $(ContactList).bind('contactclicked', function(event, jid) {
|
505
|
|
- if (!jid) {
|
506
|
|
- return;
|
507
|
|
- }
|
508
|
|
-
|
509
|
|
- if (jid === APP.xmpp.myJid()) {
|
510
|
|
- $("#localVideoContainer").click();
|
511
|
|
- return;
|
512
|
|
- }
|
513
|
|
-
|
514
|
|
- var resource = Strophe.getResourceFromJid(jid);
|
515
|
|
- var remoteVideo = remoteVideos[resource];
|
516
|
|
- if (remoteVideo && remoteVideo.selectVideoElement().length) {
|
517
|
|
- var videoThumb = remoteVideo.selectVideoElement()[0];
|
518
|
|
- // It is not always the case that a videoThumb exists (if there is
|
519
|
|
- // no actual video).
|
520
|
|
- if (RTC.getVideoSrc(videoThumb)) {
|
521
|
|
-
|
522
|
|
- // We have a video src, great! Let's update the large video
|
523
|
|
- // now.
|
524
|
|
- VideoLayout.handleVideoThumbClicked(
|
525
|
|
- false,
|
526
|
|
- Strophe.getResourceFromJid(jid));
|
527
|
|
- } else {
|
528
|
|
-
|
529
|
|
- // If we don't have a video src for jid, there's absolutely
|
530
|
|
- // no point in calling handleVideoThumbClicked; Quite
|
531
|
|
- // simply, it won't work because it needs an src to attach
|
532
|
|
- // to the large video.
|
533
|
|
- //
|
534
|
|
- // Instead, we trigger the pinned endpoint changed event to
|
535
|
|
- // let the bridge adjust its lastN set for myjid and store
|
536
|
|
- // the pinned user in the lastNPickupJid variable to be
|
537
|
|
- // picked up later by the lastN changed event handler.
|
538
|
|
-
|
539
|
|
- lastNPickupJid = jid;
|
540
|
|
- eventEmitter.emit(UIEvents.PINNED_ENDPOINT,
|
541
|
|
- Strophe.getResourceFromJid(jid));
|
542
|
|
- }
|
543
|
|
- }
|
544
|
|
- });
|
|
527
|
+ },
|
545
|
528
|
|
546
|
529
|
/**
|
547
|
530
|
* On audio muted event.
|
548
|
531
|
*/
|
549
|
|
- my.onAudioMute = function (jid, isMuted) {
|
|
532
|
+ onAudioMute (jid, isMuted) {
|
550
|
533
|
var resourceJid = Strophe.getResourceFromJid(jid);
|
551
|
534
|
if (resourceJid === APP.xmpp.myResource()) {
|
552
|
535
|
localVideoThumbnail.showAudioIndicator(isMuted);
|
|
@@ -557,12 +540,12 @@ var VideoLayout = (function (my) {
|
557
|
540
|
remoteVideos[resourceJid].updateRemoteVideoMenu(isMuted);
|
558
|
541
|
}
|
559
|
542
|
}
|
560
|
|
- };
|
|
543
|
+ },
|
561
|
544
|
|
562
|
545
|
/**
|
563
|
546
|
* On video muted event.
|
564
|
547
|
*/
|
565
|
|
- my.onVideoMute = function (jid, value) {
|
|
548
|
+ onVideoMute (jid, value) {
|
566
|
549
|
if (jid !== APP.xmpp.myJid() &&
|
567
|
550
|
!APP.RTC.muteRemoteVideoStream(jid, value))
|
568
|
551
|
return;
|
|
@@ -582,12 +565,12 @@ var VideoLayout = (function (my) {
|
582
|
565
|
else
|
583
|
566
|
el.hide();
|
584
|
567
|
}
|
585
|
|
- };
|
|
568
|
+ },
|
586
|
569
|
|
587
|
570
|
/**
|
588
|
571
|
* Display name changed.
|
589
|
572
|
*/
|
590
|
|
- my.onDisplayNameChanged = function (id, displayName, status) {
|
|
573
|
+ onDisplayNameChanged (id, displayName, status) {
|
591
|
574
|
if (id === 'localVideoContainer' ||
|
592
|
575
|
APP.conference.isLocalId(id)) {
|
593
|
576
|
localVideoThumbnail.setDisplayName(displayName);
|
|
@@ -595,39 +578,39 @@ var VideoLayout = (function (my) {
|
595
|
578
|
VideoLayout.ensurePeerContainerExists(id);
|
596
|
579
|
remoteVideos[id].setDisplayName(displayName, status);
|
597
|
580
|
}
|
598
|
|
- };
|
|
581
|
+ },
|
599
|
582
|
|
600
|
583
|
/**
|
601
|
584
|
* On dominant speaker changed event.
|
602
|
585
|
*/
|
603
|
|
- my.onDominantSpeakerChanged = function (resourceJid) {
|
|
586
|
+ onDominantSpeakerChanged (id) {
|
604
|
587
|
// We ignore local user events.
|
605
|
|
- if (resourceJid === APP.xmpp.myResource())
|
|
588
|
+ if (APP.conference.isLocalId(id)) {
|
606
|
589
|
return;
|
|
590
|
+ }
|
607
|
591
|
|
608
|
|
- var remoteVideo = remoteVideos[resourceJid];
|
609
|
|
- var members = APP.xmpp.getMembers();
|
610
|
|
- // Update the current dominant speaker.
|
611
|
|
- if (resourceJid !== currentDominantSpeaker) {
|
612
|
|
- if (remoteVideo) {
|
613
|
|
- remoteVideo.updateDominantSpeakerIndicator(true);
|
614
|
|
- // let's remove the indications from the remote video if any
|
615
|
|
- var oldSpeakerRemoteVideo
|
616
|
|
- = remoteVideos[currentDominantSpeaker];
|
617
|
|
- if (oldSpeakerRemoteVideo) {
|
618
|
|
- oldSpeakerRemoteVideo.updateDominantSpeakerIndicator(false);
|
619
|
|
- }
|
620
|
|
- }
|
621
|
|
- currentDominantSpeaker = resourceJid;
|
622
|
|
- } else {
|
|
592
|
+ if (id === currentDominantSpeaker) {
|
623
|
593
|
return;
|
624
|
594
|
}
|
625
|
595
|
|
626
|
|
- if (!remoteVideo)
|
|
596
|
+ let remoteVideo = remoteVideos[id];
|
|
597
|
+
|
|
598
|
+ if (!remoteVideo) {
|
627
|
599
|
return;
|
|
600
|
+ }
|
|
601
|
+
|
|
602
|
+ // Update the current dominant speaker.
|
|
603
|
+ remoteVideo.updateDominantSpeakerIndicator(true);
|
|
604
|
+
|
|
605
|
+ // let's remove the indications from the remote video if any
|
|
606
|
+ let oldSpeakerRemoteVideo = remoteVideos[currentDominantSpeaker];
|
|
607
|
+ if (oldSpeakerRemoteVideo) {
|
|
608
|
+ oldSpeakerRemoteVideo.updateDominantSpeakerIndicator(false);
|
|
609
|
+ }
|
|
610
|
+ currentDominantSpeaker = id;
|
628
|
611
|
|
629
|
612
|
// Obtain container for new dominant speaker.
|
630
|
|
- var videoSel = remoteVideo.selectVideoElement();
|
|
613
|
+ let videoSel = remoteVideo.selectVideoElement();
|
631
|
614
|
|
632
|
615
|
// Local video will not have container found, but that's ok
|
633
|
616
|
// since we don't want to switch to local video.
|
|
@@ -635,10 +618,10 @@ var VideoLayout = (function (my) {
|
635
|
618
|
// Update the large video if the video source is already available,
|
636
|
619
|
// otherwise wait for the "videoactive.jingle" event.
|
637
|
620
|
if (videoSel[0].currentTime > 0) {
|
638
|
|
- LargeVideo.updateLargeVideo(resourceJid);
|
|
621
|
+ LargeVideo.updateLargeVideo(id);
|
639
|
622
|
}
|
640
|
623
|
}
|
641
|
|
- };
|
|
624
|
+ },
|
642
|
625
|
|
643
|
626
|
/**
|
644
|
627
|
* On last N change event.
|
|
@@ -647,7 +630,7 @@ var VideoLayout = (function (my) {
|
647
|
630
|
* @param endpointsEnteringLastN the list currently entering last N
|
648
|
631
|
* endpoints
|
649
|
632
|
*/
|
650
|
|
- my.onLastNEndpointsChanged = function (lastNEndpoints, endpointsEnteringLastN) {
|
|
633
|
+ onLastNEndpointsChanged (lastNEndpoints, endpointsEnteringLastN) {
|
651
|
634
|
if (lastNCount !== lastNEndpoints.length)
|
652
|
635
|
lastNCount = lastNEndpoints.length;
|
653
|
636
|
|
|
@@ -727,7 +710,7 @@ var VideoLayout = (function (my) {
|
727
|
710
|
// displayed in the large video we have to switch to another
|
728
|
711
|
// user.
|
729
|
712
|
if (!updateLargeVideo &&
|
730
|
|
- resourceJid === LargeVideo.getResourceJid()) {
|
|
713
|
+ resourceJid === LargeVideo.getId()) {
|
731
|
714
|
updateLargeVideo = true;
|
732
|
715
|
}
|
733
|
716
|
}
|
|
@@ -751,9 +734,9 @@ var VideoLayout = (function (my) {
|
751
|
734
|
var sel = remoteVideo.selectVideoElement();
|
752
|
735
|
|
753
|
736
|
APP.RTC.attachMediaStream(sel, mediaStream.stream);
|
754
|
|
- if (lastNPickupJid == mediaStream.peerjid) {
|
755
|
|
- // Clean up the lastN pickup jid.
|
756
|
|
- lastNPickupJid = null;
|
|
737
|
+ if (lastNPickupId == mediaStream.peerjid) {
|
|
738
|
+ // Clean up the lastN pickup id.
|
|
739
|
+ lastNPickupId = null;
|
757
|
740
|
|
758
|
741
|
// Don't fire the events again, they've already
|
759
|
742
|
// been fired in the contact list click handler.
|
|
@@ -789,14 +772,14 @@ var VideoLayout = (function (my) {
|
789
|
772
|
break;
|
790
|
773
|
}
|
791
|
774
|
}
|
792
|
|
- };
|
|
775
|
+ },
|
793
|
776
|
|
794
|
777
|
/**
|
795
|
778
|
* Updates local stats
|
796
|
779
|
* @param percent
|
797
|
780
|
* @param object
|
798
|
781
|
*/
|
799
|
|
- my.updateLocalConnectionStats = function (percent, object) {
|
|
782
|
+ updateLocalConnectionStats (percent, object) {
|
800
|
783
|
var resolution = null;
|
801
|
784
|
if (object.resolution !== null) {
|
802
|
785
|
resolution = object.resolution;
|
|
@@ -814,7 +797,7 @@ var VideoLayout = (function (my) {
|
814
|
797
|
updateResolution(resolution[jid]);
|
815
|
798
|
}
|
816
|
799
|
}
|
817
|
|
- };
|
|
800
|
+ },
|
818
|
801
|
|
819
|
802
|
/**
|
820
|
803
|
* Updates remote stats.
|
|
@@ -822,92 +805,90 @@ var VideoLayout = (function (my) {
|
822
|
805
|
* @param percent the connection quality percent
|
823
|
806
|
* @param object the stats data
|
824
|
807
|
*/
|
825
|
|
- my.updateConnectionStats = function (jid, percent, object) {
|
|
808
|
+ updateConnectionStats (jid, percent, object) {
|
826
|
809
|
var resourceJid = Strophe.getResourceFromJid(jid);
|
827
|
810
|
|
828
|
811
|
if (remoteVideos[resourceJid])
|
829
|
812
|
remoteVideos[resourceJid].updateStatsIndicator(percent, object);
|
830
|
|
- };
|
|
813
|
+ },
|
831
|
814
|
|
832
|
815
|
/**
|
833
|
816
|
* Hides the connection indicator
|
834
|
817
|
* @param jid
|
835
|
818
|
*/
|
836
|
|
- my.hideConnectionIndicator = function (jid) {
|
|
819
|
+ hideConnectionIndicator (jid) {
|
837
|
820
|
remoteVideos[Strophe.getResourceFromJid(jid)].hideConnectionIndicator();
|
838
|
|
- };
|
|
821
|
+ },
|
839
|
822
|
|
840
|
823
|
/**
|
841
|
824
|
* Hides all the indicators
|
842
|
825
|
*/
|
843
|
|
- my.hideStats = function () {
|
|
826
|
+ hideStats () {
|
844
|
827
|
for(var video in remoteVideos) {
|
845
|
828
|
remoteVideos[video].hideIndicator();
|
846
|
829
|
}
|
847
|
830
|
localVideoThumbnail.hideIndicator();
|
848
|
|
- };
|
|
831
|
+ },
|
849
|
832
|
|
850
|
|
- my.participantLeft = function (jid) {
|
|
833
|
+ participantLeft (id) {
|
851
|
834
|
// Unlock large video
|
852
|
|
- var resourceJid = Strophe.getResourceFromJid(jid);
|
853
|
|
- if (focusedVideoResourceJid === resourceJid) {
|
|
835
|
+ if (focusedVideoResourceJid === id) {
|
854
|
836
|
console.info("Focused video owner has left the conference");
|
855
|
837
|
focusedVideoResourceJid = null;
|
856
|
838
|
}
|
857
|
839
|
|
858
|
|
- if (currentDominantSpeaker === resourceJid) {
|
|
840
|
+ if (currentDominantSpeaker === id) {
|
859
|
841
|
console.info("Dominant speaker has left the conference");
|
860
|
842
|
currentDominantSpeaker = null;
|
861
|
843
|
}
|
862
|
844
|
|
863
|
|
- var remoteVideo = remoteVideos[resourceJid];
|
|
845
|
+ var remoteVideo = remoteVideos[id];
|
864
|
846
|
if (remoteVideo) {
|
865
|
847
|
// Remove remote video
|
866
|
|
- console.info("Removing remote video: " + resourceJid);
|
867
|
|
- delete remoteVideos[resourceJid];
|
|
848
|
+ console.info("Removing remote video: " + id);
|
|
849
|
+ delete remoteVideos[id];
|
868
|
850
|
remoteVideo.remove();
|
869
|
851
|
} else {
|
870
|
|
- console.warn("No remote video for " + resourceJid);
|
|
852
|
+ console.warn("No remote video for " + id);
|
871
|
853
|
}
|
872
|
854
|
|
873
|
855
|
VideoLayout.resizeThumbnails();
|
874
|
|
- };
|
|
856
|
+ },
|
875
|
857
|
|
876
|
|
- my.onVideoTypeChanged = function (resourceJid, newVideoType) {
|
877
|
|
- if (remoteVideoTypes[resourceJid] === newVideoType) {
|
|
858
|
+ onVideoTypeChanged (id, newVideoType) {
|
|
859
|
+ if (remoteVideoTypes[id] === newVideoType) {
|
878
|
860
|
return;
|
879
|
861
|
}
|
880
|
862
|
|
881
|
|
- console.info("Peer video type changed: ", resourceJid, newVideoType);
|
882
|
|
- remoteVideoTypes[resourceJid] = newVideoType;
|
|
863
|
+ console.info("Peer video type changed: ", id, newVideoType);
|
|
864
|
+ remoteVideoTypes[id] = newVideoType;
|
883
|
865
|
|
884
|
866
|
var smallVideo;
|
885
|
|
- if (resourceJid === APP.xmpp.myResource()) {
|
|
867
|
+ if (APP.conference.isLocalId(id)) {
|
886
|
868
|
if (!localVideoThumbnail) {
|
887
|
869
|
console.warn("Local video not ready yet");
|
888
|
870
|
return;
|
889
|
871
|
}
|
890
|
872
|
smallVideo = localVideoThumbnail;
|
891
|
|
- } else if (remoteVideos[resourceJid]) {
|
892
|
|
- smallVideo = remoteVideos[resourceJid];
|
|
873
|
+ } else if (remoteVideos[id]) {
|
|
874
|
+ smallVideo = remoteVideos[id];
|
893
|
875
|
} else {
|
894
|
876
|
return;
|
895
|
877
|
}
|
896
|
878
|
|
897
|
879
|
smallVideo.setVideoType(newVideoType);
|
898
|
|
- LargeVideo.onVideoTypeChanged(resourceJid, newVideoType);
|
899
|
|
-
|
900
|
|
- };
|
|
880
|
+ LargeVideo.onVideoTypeChanged(id, newVideoType);
|
|
881
|
+ },
|
901
|
882
|
|
902
|
883
|
/**
|
903
|
884
|
* Updates the video size and position.
|
904
|
885
|
*/
|
905
|
|
- my.updateLargeVideoSize = function () {
|
|
886
|
+ updateLargeVideoSize () {
|
906
|
887
|
LargeVideo.updateVideoSizeAndPosition();
|
907
|
888
|
LargeVideo.position(null, null, null, null, true);
|
908
|
|
- };
|
|
889
|
+ },
|
909
|
890
|
|
910
|
|
- my.showMore = function (jid) {
|
|
891
|
+ showMore (jid) {
|
911
|
892
|
if (jid === 'local') {
|
912
|
893
|
localVideoThumbnail.connectionIndicator.showMore();
|
913
|
894
|
} else {
|
|
@@ -918,15 +899,15 @@ var VideoLayout = (function (my) {
|
918
|
899
|
console.info("Error - no remote video for jid: " + jid);
|
919
|
900
|
}
|
920
|
901
|
}
|
921
|
|
- };
|
|
902
|
+ },
|
922
|
903
|
|
923
|
|
- my.addPreziContainer = function (id) {
|
|
904
|
+ addPreziContainer (id) {
|
924
|
905
|
var container = RemoteVideo.createContainer(id);
|
925
|
906
|
VideoLayout.resizeThumbnails();
|
926
|
907
|
return container;
|
927
|
|
- };
|
|
908
|
+ },
|
928
|
909
|
|
929
|
|
- my.setLargeVideoVisible = function (isVisible) {
|
|
910
|
+ setLargeVideoVisible (isVisible) {
|
930
|
911
|
LargeVideo.setLargeVideoVisible(isVisible);
|
931
|
912
|
if(!isVisible && focusedVideoResourceJid) {
|
932
|
913
|
var smallVideo = VideoLayout.getSmallVideo(focusedVideoResourceJid);
|
|
@@ -936,7 +917,7 @@ var VideoLayout = (function (my) {
|
936
|
917
|
}
|
937
|
918
|
focusedVideoResourceJid = null;
|
938
|
919
|
}
|
939
|
|
- };
|
|
920
|
+ },
|
940
|
921
|
|
941
|
922
|
/**
|
942
|
923
|
* Resizes the video area.
|
|
@@ -945,10 +926,10 @@ var VideoLayout = (function (my) {
|
945
|
926
|
* @param callback a function to be called when the video space is
|
946
|
927
|
* resized.
|
947
|
928
|
*/
|
948
|
|
- my.resizeVideoArea = function(isSideBarVisible, callback) {
|
|
929
|
+ resizeVideoArea (isSideBarVisible, callback) {
|
949
|
930
|
LargeVideo.resizeVideoAreaAnimated(isSideBarVisible, callback);
|
950
|
931
|
VideoLayout.resizeThumbnails(true);
|
951
|
|
- };
|
|
932
|
+ },
|
952
|
933
|
|
953
|
934
|
/**
|
954
|
935
|
* Resizes the #videospace html element
|
|
@@ -961,7 +942,7 @@ var VideoLayout = (function (my) {
|
961
|
942
|
* @param completeFunction a function to be called when the video space
|
962
|
943
|
* is resized.
|
963
|
944
|
*/
|
964
|
|
- my.resizeVideoSpace = function (animate, isChatVisible, completeFunction) {
|
|
945
|
+ resizeVideoSpace (animate, isChatVisible, completeFunction) {
|
965
|
946
|
var availableHeight = window.innerHeight;
|
966
|
947
|
var availableWidth = UIUtil.getAvailableVideoWidth(isChatVisible);
|
967
|
948
|
|
|
@@ -983,19 +964,17 @@ var VideoLayout = (function (my) {
|
983
|
964
|
$('#videospace').height(availableHeight);
|
984
|
965
|
}
|
985
|
966
|
|
986
|
|
- };
|
|
967
|
+ },
|
987
|
968
|
|
988
|
|
- my.getSmallVideo = function (resourceJid) {
|
989
|
|
- if(resourceJid == APP.xmpp.myResource()) {
|
|
969
|
+ getSmallVideo (id) {
|
|
970
|
+ if (APP.conference.isLocalId(id)) {
|
990
|
971
|
return localVideoThumbnail;
|
991
|
972
|
} else {
|
992
|
|
- if(!remoteVideos[resourceJid])
|
993
|
|
- return null;
|
994
|
|
- return remoteVideos[resourceJid];
|
|
973
|
+ return remoteVideos[id];
|
995
|
974
|
}
|
996
|
|
- };
|
|
975
|
+ },
|
997
|
976
|
|
998
|
|
- my.changeUserAvatar = function(id, thumbUrl) {
|
|
977
|
+ changeUserAvatar (id, thumbUrl) {
|
999
|
978
|
var smallVideo = VideoLayout.getSmallVideo(id);
|
1000
|
979
|
if (smallVideo) {
|
1001
|
980
|
smallVideo.avatarChanged(thumbUrl);
|
|
@@ -1005,46 +984,43 @@ var VideoLayout = (function (my) {
|
1005
|
984
|
);
|
1006
|
985
|
}
|
1007
|
986
|
LargeVideo.updateAvatar(id, thumbUrl);
|
1008
|
|
- };
|
|
987
|
+ },
|
1009
|
988
|
|
1010
|
|
- my.createEtherpadIframe = function(src, onloadHandler)
|
1011
|
|
- {
|
|
989
|
+ createEtherpadIframe (src, onloadHandler) {
|
1012
|
990
|
return LargeVideo.createEtherpadIframe(src, onloadHandler);
|
1013
|
|
- };
|
|
991
|
+ },
|
1014
|
992
|
|
1015
|
|
- my.setLargeVideoState = function (state) {
|
|
993
|
+ setLargeVideoState (state) {
|
1016
|
994
|
LargeVideo.setState(state);
|
1017
|
|
- };
|
|
995
|
+ },
|
1018
|
996
|
|
1019
|
|
- my.getLargeVideoState = function () {
|
|
997
|
+ getLargeVideoState () {
|
1020
|
998
|
return LargeVideo.getState();
|
1021
|
|
- };
|
|
999
|
+ },
|
1022
|
1000
|
|
1023
|
|
- my.setLargeVideoHover = function (inHandler, outHandler) {
|
|
1001
|
+ setLargeVideoHover (inHandler, outHandler) {
|
1024
|
1002
|
LargeVideo.setHover(inHandler, outHandler);
|
1025
|
|
- };
|
|
1003
|
+ },
|
1026
|
1004
|
|
1027
|
1005
|
/**
|
1028
|
1006
|
* Indicates that the video has been interrupted.
|
1029
|
1007
|
*/
|
1030
|
|
- my.onVideoInterrupted = function () {
|
|
1008
|
+ onVideoInterrupted () {
|
1031
|
1009
|
LargeVideo.enableVideoProblemFilter(true);
|
1032
|
1010
|
var reconnectingKey = "connection.RECONNECTING";
|
1033
|
1011
|
$('#videoConnectionMessage').attr("data-i18n", reconnectingKey);
|
1034
|
1012
|
$('#videoConnectionMessage')
|
1035
|
1013
|
.text(APP.translation.translateString(reconnectingKey));
|
1036
|
1014
|
$('#videoConnectionMessage').css({display: "block"});
|
1037
|
|
- };
|
|
1015
|
+ },
|
1038
|
1016
|
|
1039
|
1017
|
/**
|
1040
|
1018
|
* Indicates that the video has been restored.
|
1041
|
1019
|
*/
|
1042
|
|
- my.onVideoRestored = function () {
|
|
1020
|
+ onVideoRestored () {
|
1043
|
1021
|
LargeVideo.enableVideoProblemFilter(false);
|
1044
|
1022
|
$('#videoConnectionMessage').css({display: "none"});
|
1045
|
|
- };
|
1046
|
|
-
|
1047
|
|
- return my;
|
1048
|
|
-}(VideoLayout || {}));
|
|
1023
|
+ }
|
|
1024
|
+};
|
1049
|
1025
|
|
1050
|
|
-module.exports = VideoLayout;
|
|
1026
|
+export default VideoLayout;
|