Browse Source

Fixes issue with returning from shared document view. Calls show() before fadeOut() on large video to avoid situation when we end up with black screen and are unable to select new video. Updates app.bundle.js.

j8
paweldomas 10 years ago
parent
commit
9a7bc4ebab
3 changed files with 35047 additions and 35052 deletions
  1. 1
    1
      index.html
  2. 35028
    35043
      libs/app.bundle.js
  3. 18
    8
      modules/UI/videolayout/LargeVideo.js

+ 1
- 1
index.html View File

@@ -20,7 +20,7 @@
20 20
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
21 21
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
22 22
     <script src="interface_config.js?v=5"></script>
23
-    <script src="libs/app.bundle.js?v=127"></script>
23
+    <script src="libs/app.bundle.js?v=128"></script>
24 24
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
25 25
     <link rel="stylesheet" href="css/font.css?v=7"/>
26 26
     <link rel="stylesheet" href="css/toastr.css?v=1">

+ 35028
- 35043
libs/app.bundle.js
File diff suppressed because it is too large
View File


+ 18
- 8
modules/UI/videolayout/LargeVideo.js View File

@@ -42,7 +42,7 @@ function getContainerByState(state)
42 42
     switch (state)
43 43
     {
44 44
         case "video":
45
-            selector = "#largeVideo";
45
+            selector = "#largeVideoWrapper";
46 46
             break;
47 47
         case "etherpad":
48 48
             selector = "#etherpad>iframe";
@@ -353,7 +353,7 @@ var LargeVideo = {
353 353
      * @return <tt>true</tt> if visible, <tt>false</tt> - otherwise
354 354
      */
355 355
     isLargeVideoVisible: function() {
356
-        return $('#largeVideo').is(':visible');
356
+        return $('#largeVideoWrapper').is(':visible');
357 357
     },
358 358
     /**
359 359
      * Returns <tt>true</tt> if the user is currently displayed on large video.
@@ -371,6 +371,11 @@ var LargeVideo = {
371 371
         var newSmallVideo = this.VideoLayout.getSmallVideo(resourceJid);
372 372
         console.log('hover in ' + resourceJid + ', video: ', newSmallVideo);
373 373
 
374
+        if (!newSmallVideo) {
375
+            console.error("Small video not found for: " + resourceJid);
376
+            return;
377
+        }
378
+
374 379
         if (!LargeVideo.isCurrentlyOnLarge(resourceJid) || forceUpdate) {
375 380
             $('#activeSpeaker').css('visibility', 'hidden');
376 381
 
@@ -393,7 +398,11 @@ var LargeVideo = {
393 398
             // <video> elements with plugin <object> tag. In Safari jQuery is
394 399
             // unable to store values on this plugin object which breaks all
395 400
             // animation effects performed on it directly.
396
-            $('#largeVideoWrapper').fadeOut(300,
401
+            //
402
+            // If for any reason large video was hidden before calling fadeOut
403
+            // changeVideo will never be called, so we call show() in chain just
404
+            // to be sure
405
+            $('#largeVideoWrapper').show().fadeOut(300,
397 406
                 changeVideo.bind($('#largeVideo'), this.isLargeVideoVisible()));
398 407
         } else {
399 408
             if (currentSmallVideo) {
@@ -410,13 +419,13 @@ var LargeVideo = {
410 419
         if(!isEnabled)
411 420
             return;
412 421
         if (isVisible) {
413
-            $('#largeVideo').css({visibility: 'visible'});
422
+            $('#largeVideoWrapper').css({visibility: 'visible'});
414 423
             $('.watermark').css({visibility: 'visible'});
415 424
             if(currentSmallVideo)
416 425
                 currentSmallVideo.enableDominantSpeaker(true);
417 426
         }
418 427
         else {
419
-            $('#largeVideo').css({visibility: 'hidden'});
428
+            $('#largeVideoWrapper').css({visibility: 'hidden'});
420 429
             $('#activeSpeaker').css('visibility', 'hidden');
421 430
             $('.watermark').css({visibility: 'hidden'});
422 431
             if(currentSmallVideo)
@@ -524,10 +533,11 @@ var LargeVideo = {
524 533
         }
525 534
     },
526 535
     showAvatar: function (resourceJid, show) {
527
-        if(!isEnabled)
536
+        if (!isEnabled)
528 537
             return;
529
-        if(this.getResourceJid() === resourceJid && state === "video") {
530
-            $("#largeVideo").css("visibility", show ? "hidden" : "visible");
538
+        if (this.getResourceJid() === resourceJid && state === "video") {
539
+            $("#largeVideoWrapper")
540
+                .css("visibility", show ? "hidden" : "visible");
531 541
             $('#activeSpeaker').css("visibility", show ? "visible" : "hidden");
532 542
             return true;
533 543
         }

Loading…
Cancel
Save