|
@@ -214,7 +214,8 @@ var VideoLayout = (function (my) {
|
214
|
214
|
my.handleVideoThumbClicked = function(noPinnedEndpointChangedEvent,
|
215
|
215
|
resourceJid) {
|
216
|
216
|
if(focusedVideoResourceJid) {
|
217
|
|
- var oldSmallVideo = VideoLayout.getSmallVideo(focusedVideoResourceJid);
|
|
217
|
+ var oldSmallVideo
|
|
218
|
+ = VideoLayout.getSmallVideo(focusedVideoResourceJid);
|
218
|
219
|
if (oldSmallVideo && !interfaceConfig.filmStripOnly)
|
219
|
220
|
oldSmallVideo.focus(false);
|
220
|
221
|
}
|
|
@@ -400,7 +401,8 @@ var VideoLayout = (function (my) {
|
400
|
401
|
|
401
|
402
|
if(animate) {
|
402
|
403
|
$('#remoteVideos').animate({
|
403
|
|
- height: height + 2 // adds 2 px because of small video 1px border
|
|
404
|
+ // adds 2 px because of small video 1px border
|
|
405
|
+ height: height + 2
|
404
|
406
|
},
|
405
|
407
|
{
|
406
|
408
|
queue: false,
|
|
@@ -425,7 +427,8 @@ var VideoLayout = (function (my) {
|
425
|
427
|
} else {
|
426
|
428
|
// size videos so that while keeping AR and max height, we have a
|
427
|
429
|
// nice fit
|
428
|
|
- $('#remoteVideos').height(height + 2);// adds 2 px because of small video 1px border
|
|
430
|
+ // adds 2 px because of small video 1px border
|
|
431
|
+ $('#remoteVideos').height(height + 2);
|
429
|
432
|
$('#remoteVideos>span').width(width);
|
430
|
433
|
$('#remoteVideos>span').height(height);
|
431
|
434
|
|
|
@@ -439,10 +442,10 @@ var VideoLayout = (function (my) {
|
439
|
442
|
* @param videoSpaceWidth the width of the video space
|
440
|
443
|
*/
|
441
|
444
|
my.calculateThumbnailSize = function (videoSpaceWidth) {
|
442
|
|
- // Calculate the available height, which is the inner window height minus
|
443
|
|
- // 39px for the header minus 2px for the delimiter lines on the top and
|
444
|
|
- // bottom of the large video, minus the 36px space inside the remoteVideos
|
445
|
|
- // container used for highlighting shadow.
|
|
445
|
+ // Calculate the available height, which is the inner window height
|
|
446
|
+ // minus 39px for the header minus 2px for the delimiter lines on the
|
|
447
|
+ // top and bottom of the large video, minus the 36px space inside the
|
|
448
|
+ // remoteVideos container used for highlighting shadow.
|
446
|
449
|
var availableHeight = 100;
|
447
|
450
|
|
448
|
451
|
var numvids = $('#remoteVideos>span:visible').length;
|
|
@@ -458,7 +461,11 @@ var VideoLayout = (function (my) {
|
458
|
461
|
var availableWidth = availableWinWidth / numvids;
|
459
|
462
|
var aspectRatio = 16.0 / 9.0;
|
460
|
463
|
var maxHeight = Math.min(160, availableHeight);
|
461
|
|
- availableHeight = Math.min(maxHeight, availableWidth / aspectRatio, window.innerHeight - 18);
|
|
464
|
+ availableHeight
|
|
465
|
+ = Math.min( maxHeight,
|
|
466
|
+ availableWidth / aspectRatio,
|
|
467
|
+ window.innerHeight - 18);
|
|
468
|
+
|
462
|
469
|
if (availableHeight < availableWidth / aspectRatio) {
|
463
|
470
|
availableWidth = Math.floor(availableHeight * aspectRatio);
|
464
|
471
|
}
|
|
@@ -882,6 +889,17 @@ var VideoLayout = (function (my) {
|
882
|
889
|
|
883
|
890
|
};
|
884
|
891
|
|
|
892
|
+ /**
|
|
893
|
+ * Updates the video size and position when the film strip is toggled.
|
|
894
|
+ *
|
|
895
|
+ * @param isToggled indicates if the film strip is toggled or not. True
|
|
896
|
+ * would mean that the film strip is hidden, false would mean it's shown
|
|
897
|
+ */
|
|
898
|
+ my.onFilmStripToggled = function(isToggled) {
|
|
899
|
+ LargeVideo.updateVideoSizeAndPosition();
|
|
900
|
+ LargeVideo.position(null, null, null, null, true);
|
|
901
|
+ };
|
|
902
|
+
|
885
|
903
|
my.showMore = function (jid) {
|
886
|
904
|
if (jid === 'local') {
|
887
|
905
|
localVideoThumbnail.connectionIndicator.showMore();
|
|
@@ -914,21 +932,27 @@ var VideoLayout = (function (my) {
|
914
|
932
|
};
|
915
|
933
|
|
916
|
934
|
/**
|
917
|
|
- * Resizes the video area
|
|
935
|
+ * Resizes the video area.
|
|
936
|
+ *
|
|
937
|
+ * @param isSideBarVisible indicates if the side bar is currently visible
|
918
|
938
|
* @param callback a function to be called when the video space is
|
919
|
939
|
* resized.
|
920
|
940
|
*/
|
921
|
|
- my.resizeVideoArea = function(isVisible, callback) {
|
922
|
|
- LargeVideo.resizeVideoAreaAnimated(isVisible, callback);
|
|
941
|
+ my.resizeVideoArea = function(isSideBarVisible, callback) {
|
|
942
|
+ LargeVideo.resizeVideoAreaAnimated(isSideBarVisible, callback);
|
923
|
943
|
VideoLayout.resizeThumbnails(true);
|
924
|
944
|
};
|
925
|
945
|
|
926
|
946
|
/**
|
927
|
947
|
* Resizes the #videospace html element
|
928
|
|
- * @param animate boolean property that indicates whether the resize should be animated or not.
|
929
|
|
- * @param isChatVisible boolean property that indicates whether the chat area is displayed or not.
|
930
|
|
- * If that parameter is null the method will check the chat pannel visibility.
|
931
|
|
- * @param completeFunction a function to be called when the video space is resized
|
|
948
|
+ * @param animate boolean property that indicates whether the resize should
|
|
949
|
+ * be animated or not.
|
|
950
|
+ * @param isChatVisible boolean property that indicates whether the chat
|
|
951
|
+ * area is displayed or not.
|
|
952
|
+ * If that parameter is null the method will check the chat panel
|
|
953
|
+ * visibility.
|
|
954
|
+ * @param completeFunction a function to be called when the video space
|
|
955
|
+ * is resized.
|
932
|
956
|
*/
|
933
|
957
|
my.resizeVideoSpace = function (animate, isChatVisible, completeFunction) {
|
934
|
958
|
var availableHeight = window.innerHeight;
|
|
@@ -998,7 +1022,8 @@ var VideoLayout = (function (my) {
|
998
|
1022
|
LargeVideo.enableVideoProblemFilter(true);
|
999
|
1023
|
var reconnectingKey = "connection.RECONNECTING";
|
1000
|
1024
|
$('#videoConnectionMessage').attr("data-i18n", reconnectingKey);
|
1001
|
|
- $('#videoConnectionMessage').text(APP.translation.translateString(reconnectingKey));
|
|
1025
|
+ $('#videoConnectionMessage')
|
|
1026
|
+ .text(APP.translation.translateString(reconnectingKey));
|
1002
|
1027
|
$('#videoConnectionMessage').css({display: "block"});
|
1003
|
1028
|
};
|
1004
|
1029
|
|