Przeglądaj źródła

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 lat temu
rodzic
commit
9a7bc4ebab
3 zmienionych plików z 35047 dodań i 35052 usunięć
  1. 1
    1
      index.html
  2. 35028
    35043
      libs/app.bundle.js
  3. 18
    8
      modules/UI/videolayout/LargeVideo.js

+ 1
- 1
index.html Wyświetl plik

20
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
20
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
21
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
21
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
22
     <script src="interface_config.js?v=5"></script>
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
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
24
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
25
     <link rel="stylesheet" href="css/font.css?v=7"/>
25
     <link rel="stylesheet" href="css/font.css?v=7"/>
26
     <link rel="stylesheet" href="css/toastr.css?v=1">
26
     <link rel="stylesheet" href="css/toastr.css?v=1">

+ 35028
- 35043
libs/app.bundle.js
Plik diff jest za duży
Wyświetl plik


+ 18
- 8
modules/UI/videolayout/LargeVideo.js Wyświetl plik

42
     switch (state)
42
     switch (state)
43
     {
43
     {
44
         case "video":
44
         case "video":
45
-            selector = "#largeVideo";
45
+            selector = "#largeVideoWrapper";
46
             break;
46
             break;
47
         case "etherpad":
47
         case "etherpad":
48
             selector = "#etherpad>iframe";
48
             selector = "#etherpad>iframe";
353
      * @return <tt>true</tt> if visible, <tt>false</tt> - otherwise
353
      * @return <tt>true</tt> if visible, <tt>false</tt> - otherwise
354
      */
354
      */
355
     isLargeVideoVisible: function() {
355
     isLargeVideoVisible: function() {
356
-        return $('#largeVideo').is(':visible');
356
+        return $('#largeVideoWrapper').is(':visible');
357
     },
357
     },
358
     /**
358
     /**
359
      * Returns <tt>true</tt> if the user is currently displayed on large video.
359
      * Returns <tt>true</tt> if the user is currently displayed on large video.
371
         var newSmallVideo = this.VideoLayout.getSmallVideo(resourceJid);
371
         var newSmallVideo = this.VideoLayout.getSmallVideo(resourceJid);
372
         console.log('hover in ' + resourceJid + ', video: ', newSmallVideo);
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
         if (!LargeVideo.isCurrentlyOnLarge(resourceJid) || forceUpdate) {
379
         if (!LargeVideo.isCurrentlyOnLarge(resourceJid) || forceUpdate) {
375
             $('#activeSpeaker').css('visibility', 'hidden');
380
             $('#activeSpeaker').css('visibility', 'hidden');
376
 
381
 
393
             // <video> elements with plugin <object> tag. In Safari jQuery is
398
             // <video> elements with plugin <object> tag. In Safari jQuery is
394
             // unable to store values on this plugin object which breaks all
399
             // unable to store values on this plugin object which breaks all
395
             // animation effects performed on it directly.
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
                 changeVideo.bind($('#largeVideo'), this.isLargeVideoVisible()));
406
                 changeVideo.bind($('#largeVideo'), this.isLargeVideoVisible()));
398
         } else {
407
         } else {
399
             if (currentSmallVideo) {
408
             if (currentSmallVideo) {
410
         if(!isEnabled)
419
         if(!isEnabled)
411
             return;
420
             return;
412
         if (isVisible) {
421
         if (isVisible) {
413
-            $('#largeVideo').css({visibility: 'visible'});
422
+            $('#largeVideoWrapper').css({visibility: 'visible'});
414
             $('.watermark').css({visibility: 'visible'});
423
             $('.watermark').css({visibility: 'visible'});
415
             if(currentSmallVideo)
424
             if(currentSmallVideo)
416
                 currentSmallVideo.enableDominantSpeaker(true);
425
                 currentSmallVideo.enableDominantSpeaker(true);
417
         }
426
         }
418
         else {
427
         else {
419
-            $('#largeVideo').css({visibility: 'hidden'});
428
+            $('#largeVideoWrapper').css({visibility: 'hidden'});
420
             $('#activeSpeaker').css('visibility', 'hidden');
429
             $('#activeSpeaker').css('visibility', 'hidden');
421
             $('.watermark').css({visibility: 'hidden'});
430
             $('.watermark').css({visibility: 'hidden'});
422
             if(currentSmallVideo)
431
             if(currentSmallVideo)
524
         }
533
         }
525
     },
534
     },
526
     showAvatar: function (resourceJid, show) {
535
     showAvatar: function (resourceJid, show) {
527
-        if(!isEnabled)
536
+        if (!isEnabled)
528
             return;
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
             $('#activeSpeaker').css("visibility", show ? "visible" : "hidden");
541
             $('#activeSpeaker').css("visibility", show ? "visible" : "hidden");
532
             return true;
542
             return true;
533
         }
543
         }

Ładowanie…
Anuluj
Zapisz