Yana Stamcheva 12 lat temu
rodzic
commit
de0faeb6a8
1 zmienionych plików z 16 dodań i 13 usunięć
  1. 16
    13
      app.js

+ 16
- 13
app.js Wyświetl plik

302
         updateLockButton();
302
         updateLockButton();
303
     }
303
     }
304
 
304
 
305
-    showFocusIndicator();
306
-
307
     $(pres).find('>media[xmlns="http://estos.de/ns/mjs"]>source').each(function (idx, ssrc) {
305
     $(pres).find('>media[xmlns="http://estos.de/ns/mjs"]>source').each(function (idx, ssrc) {
308
         //console.log(jid, 'assoc ssrc', ssrc.getAttribute('type'), ssrc.getAttribute('ssrc'));
306
         //console.log(jid, 'assoc ssrc', ssrc.getAttribute('type'), ssrc.getAttribute('ssrc'));
309
         ssrc2jid[ssrc.getAttribute('ssrc')] = jid;
307
         ssrc2jid[ssrc.getAttribute('ssrc')] = jid;
574
     if (availableWidth < 0 || availableHeight < 0) return;
572
     if (availableWidth < 0 || availableHeight < 0) return;
575
     $('#largeVideo').parent().width(availableWidth);
573
     $('#largeVideo').parent().width(availableWidth);
576
     $('#largeVideo').parent().height(availableWidth / aspectRatio);
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
     resizeThumbnails();
581
     resizeThumbnails();
581
 }
582
 }
586
     // minus the 36px space inside the remoteVideos container used for highlighting shadow.
587
     // minus the 36px space inside the remoteVideos container used for highlighting shadow.
587
     var availableHeight = window.innerHeight - $('#largeVideo').height() - 79;
588
     var availableHeight = window.innerHeight - $('#largeVideo').height() - 79;
588
     var numvids = $('#remoteVideos>span:visible').length;
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
     var availableWidth = availableWinWidth / numvids;
595
     var availableWidth = availableWinWidth / numvids;
592
     var aspectRatio = 16.0 / 9.0;
596
     var aspectRatio = 16.0 / 9.0;
593
     var maxHeight = Math.min(160, availableHeight);
597
     var maxHeight = Math.min(160, availableHeight);
968
 function openChat() {
972
 function openChat() {
969
     var chatspace = $('#chatspace');
973
     var chatspace = $('#chatspace');
970
     var videospace = $('#videospace');
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
     if (chatspace.css("opacity") == 1) {
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
     else {
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
     // Request the focus in the nickname field or the chat input field.
987
     // Request the focus in the nickname field or the chat input field.

Ładowanie…
Anuluj
Zapisz