diff --git a/css/_videolayout_default.scss b/css/_videolayout_default.scss index 05336a87f2..a42551db3e 100644 --- a/css/_videolayout_default.scss +++ b/css/_videolayout_default.scss @@ -44,7 +44,7 @@ position: relative; text-align: center; - &__wrapper { + &__background { @include topLeft(); width: 100%; height: 100%; diff --git a/index.html b/index.html index 5d73bf2be2..c29a4087ea 100644 --- a/index.html +++ b/index.html @@ -169,7 +169,7 @@
-
+
diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 5614d2ab7a..925be0de54 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -819,23 +819,14 @@ UI.emitEvent = function (type, options) { }; UI.clickOnVideo = function (videoNumber) { - let videos = $("#remoteVideos .videocontainer:not(#mixedstream)").toArray(); + let videos = $("#remoteVideos .videocontainer:not(#mixedstream)"); + let videosLength = videos.length; - // Separate remotes from local videocontainer and reverse order of - // remote ones - let videosMap = videos.reduce((videoObj, video) => { - if(video.id === 'localVideoContainer') { - videoObj.local = video; - } else { - videoObj.remote.unshift(video); - } - return videoObj; - }, { local: null, remote: [] }); - - let sortedVideos = [videosMap.local, ...videosMap.remote]; - if (sortedVideos.length > videoNumber) { - $(sortedVideos[videoNumber]).click(); + if(videosLength <= videoNumber) { + return; } + let videoIndex = videoNumber === 0 ? 0 : videosLength - videoNumber; + videos[videoIndex].click(); }; //Used by torture diff --git a/modules/UI/videolayout/RemoteVideo.js b/modules/UI/videolayout/RemoteVideo.js index b75d680064..7c823c3970 100644 --- a/modules/UI/videolayout/RemoteVideo.js +++ b/modules/UI/videolayout/RemoteVideo.js @@ -632,7 +632,7 @@ RemoteVideo.createContainer = function (spanId) { container.className = 'videocontainer'; let wrapper = document.createElement('div'); - wrapper.className = 'videocontainer__wrapper'; + wrapper.className = 'videocontainer__background'; container.appendChild(wrapper); let indicatorBar = document.createElement('div');