|
|
@@ -13,7 +13,6 @@ var currentVideoHeight = null;
|
|
13
|
13
|
var getVideoSize = getCameraVideoSize;
|
|
14
|
14
|
var getVideoPosition = getCameraVideoPosition;
|
|
15
|
15
|
var currentSmallVideo = null;
|
|
16
|
|
-var oldSmallVideo = null;
|
|
17
|
16
|
|
|
18
|
17
|
|
|
19
|
18
|
|
|
|
@@ -236,22 +235,11 @@ function changeVideo(isVisible) {
|
|
236
|
235
|
|
|
237
|
236
|
|
|
238
|
237
|
// Only if the large video is currently visible.
|
|
239
|
|
- // Disable previous dominant speaker video.
|
|
240
|
|
- if (oldSmallVideo) {
|
|
241
|
|
- oldSmallVideo.enableDominantSpeaker(false);
|
|
242
|
|
- }
|
|
243
|
|
-
|
|
244
|
|
- // Enable new dominant speaker in the remote videos section.
|
|
245
|
|
- if (currentSmallVideo) {
|
|
246
|
|
- currentSmallVideo.enableDominantSpeaker(true);
|
|
247
|
|
- }
|
|
248
|
|
-
|
|
249
|
238
|
if (isVisible) {
|
|
|
239
|
+ LargeVideo.VideoLayout.largeVideoUpdated(currentSmallVideo);
|
|
|
240
|
+
|
|
250
|
241
|
$('#largeVideo').fadeIn(300);
|
|
251
|
242
|
}
|
|
252
|
|
-
|
|
253
|
|
- if(oldSmallVideo)
|
|
254
|
|
- oldSmallVideo.showAvatar();
|
|
255
|
243
|
}
|
|
256
|
244
|
|
|
257
|
245
|
var LargeVideo = {
|
|
|
@@ -290,34 +278,31 @@ var LargeVideo = {
|
|
290
|
278
|
/**
|
|
291
|
279
|
* Updates the large video with the given new video source.
|
|
292
|
280
|
*/
|
|
293
|
|
- updateLargeVideo: function(resourceJid, forceUpdate) {
|
|
|
281
|
+ updateLargeVideo: function (resourceJid, forceUpdate) {
|
|
294
|
282
|
var newSmallVideo = this.VideoLayout.getSmallVideo(resourceJid);
|
|
295
|
283
|
console.log('hover in ' + resourceJid + ', video: ', newSmallVideo);
|
|
296
|
284
|
|
|
297
|
285
|
if (!LargeVideo.isCurrentlyOnLarge(resourceJid) || forceUpdate) {
|
|
298
|
286
|
$('#activeSpeaker').css('visibility', 'hidden');
|
|
299
|
287
|
|
|
300
|
|
- if(currentSmallVideo) {
|
|
|
288
|
+ var oldSmallVideo = null;
|
|
|
289
|
+ if (currentSmallVideo) {
|
|
301
|
290
|
oldSmallVideo = currentSmallVideo;
|
|
302
|
|
- } else {
|
|
303
|
|
- oldSmallVideo = null;
|
|
304
|
291
|
}
|
|
305
|
|
-
|
|
306
|
292
|
currentSmallVideo = newSmallVideo;
|
|
|
293
|
+
|
|
307
|
294
|
var oldJid = null;
|
|
308
|
|
- if(oldSmallVideo)
|
|
|
295
|
+ if (oldSmallVideo)
|
|
309
|
296
|
oldJid = oldSmallVideo.peerJid;
|
|
310
|
|
-
|
|
311
|
297
|
if (oldJid !== resourceJid) {
|
|
312
|
298
|
// we want the notification to trigger even if userJid is undefined,
|
|
313
|
299
|
// or null.
|
|
314
|
|
- this.eventEmitter.emit(UIEvents.SELECTED_ENDPOINT,
|
|
315
|
|
- resourceJid);
|
|
|
300
|
+ this.eventEmitter.emit(UIEvents.SELECTED_ENDPOINT, resourceJid);
|
|
316
|
301
|
}
|
|
317
|
302
|
$('#largeVideo').fadeOut(300,
|
|
318
|
303
|
changeVideo.bind($('#largeVideo'), this.isLargeVideoVisible()));
|
|
319
|
304
|
} else {
|
|
320
|
|
- if(currentSmallVideo) {
|
|
|
305
|
+ if (currentSmallVideo) {
|
|
321
|
306
|
currentSmallVideo.showAvatar();
|
|
322
|
307
|
}
|
|
323
|
308
|
}
|