From 0856443a6bf55078936cc5e6181f4afd9958f916 Mon Sep 17 00:00:00 2001 From: fo Date: Thu, 2 Oct 2014 11:24:21 +0300 Subject: [PATCH] Fixes the calculation of the video count when lastN is enabled. --- videolayout.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/videolayout.js b/videolayout.js index b4c7e23f8..1387f2b2d 100644 --- a/videolayout.js +++ b/videolayout.js @@ -910,11 +910,10 @@ var VideoLayout = (function (my) { // container used for highlighting shadow. var availableHeight = 100; - var numvids = 0; - if (lastNCount && lastNCount > 0) - numvids = lastNCount + 1; - else - numvids = $('#remoteVideos>span:visible').length; + var numvids = $('#remoteVideos>span:visible').length; + if (lastNCount && lastNCount > 0) { + numvids = Math.min(lastNCount + 1, numvids); + } // Remove the 3px borders arround videos and border around the remote // videos area and the 4 pixels between the local video and the others