Yana Stamcheva 12 anni fa
parent
commit
de0faeb6a8
1 ha cambiato i file con 16 aggiunte e 13 eliminazioni
  1. 16
    13
      app.js

+ 16
- 13
app.js Vedi File

@@ -302,8 +302,6 @@ $(document).bind('entered.muc', function (event, jid, info, pres) {
302 302
         updateLockButton();
303 303
     }
304 304
 
305
-    showFocusIndicator();
306
-
307 305
     $(pres).find('>media[xmlns="http://estos.de/ns/mjs"]>source').each(function (idx, ssrc) {
308 306
         //console.log(jid, 'assoc ssrc', ssrc.getAttribute('type'), ssrc.getAttribute('ssrc'));
309 307
         ssrc2jid[ssrc.getAttribute('ssrc')] = jid;
@@ -574,8 +572,11 @@ function resizeLarge() {
574 572
     if (availableWidth < 0 || availableHeight < 0) return;
575 573
     $('#largeVideo').parent().width(availableWidth);
576 574
     $('#largeVideo').parent().height(availableWidth / aspectRatio);
577
-    $('#presentation>iframe').width(availableWidth);
578
-    $('#presentation>iframe').height(availableWidth / aspectRatio);
575
+
576
+    if ($('#presentation>iframe')) {
577
+        $('#presentation>iframe').width(availableWidth);
578
+        $('#presentation>iframe').height(availableWidth / aspectRatio);
579
+    }
579 580
     
580 581
     resizeThumbnails();
581 582
 }
@@ -586,8 +587,11 @@ function resizeThumbnails() {
586 587
     // minus the 36px space inside the remoteVideos container used for highlighting shadow.
587 588
     var availableHeight = window.innerHeight - $('#largeVideo').height() - 79;
588 589
     var numvids = $('#remoteVideos>span:visible').length;
589
-    // Remove the 1px borders arround videos.
590
-    var availableWinWidth = $('#remoteVideos').width() - 2 * numvids - 50;
590
+
591
+    var chatWidth = $('#chatspace').width();
592
+
593
+    // Remove the 1px borders arround videos and the chat width.
594
+    var availableWinWidth = $('#remoteVideos').width() - 2 * numvids - chatWidth - 50;
591 595
     var availableWidth = availableWinWidth / numvids;
592 596
     var aspectRatio = 16.0 / 9.0;
593 597
     var maxHeight = Math.min(160, availableHeight);
@@ -968,17 +972,16 @@ function updateLockButton() {
968 972
 function openChat() {
969 973
     var chatspace = $('#chatspace');
970 974
     var videospace = $('#videospace');
971
-    var chatspaceWidth = chatspace.width();
975
+    var onAnimationProgress = function () {
976
+        resizeLarge();
977
+        videospace.css({right:chatspace.width()});
978
+    };
972 979
 
973 980
     if (chatspace.css("opacity") == 1) {
974
-        chatspace.animate({opacity: 0}, "fast");
975
-        chatspace.animate({width: 0}, "slow");
976
-        videospace.animate({right: 0, width:"100%"}, "slow");
981
+        chatspace.animate({width: 0, opacity: 0}, {duration: 1000, progress: onAnimationProgress});
977 982
     }
978 983
     else {
979
-        chatspace.animate({width:"20%"}, "slow");
980
-        chatspace.animate({opacity: 1}, "slow");
981
-        videospace.animate({right:chatspaceWidth, width:"80%"}, "slow");
984
+        chatspace.animate({width:"20%", opacity: 1}, {duration: 1000, progress: onAnimationProgress});
982 985
     }
983 986
     
984 987
     // Request the focus in the nickname field or the chat input field.

Loading…
Annulla
Salva