Merge branch 'jit/master' into task/video-thumbnail-menu-should-appear-on-hover

This commit is contained in:
Konstantyn Pahsura 2016-11-03 17:30:19 +02:00
commit e7d089c815
5 changed files with 21 additions and 8 deletions

View File

@ -43,13 +43,20 @@
.videocontainer { .videocontainer {
position: relative; position: relative;
text-align: center; text-align: center;
&__background {
@include topLeft();
width: 100%;
height: 100%;
background-color: black;
}
} }
#remoteVideos .videocontainer { #remoteVideos .videocontainer {
display: none; display: none;
position: relative; position: relative;
background-color: black;
background-size: contain; background-size: contain;
border: 2px solid transparent;
border-radius:1px; border-radius:1px;
margin: 0 $thumbnailVideoMargin; margin: 0 $thumbnailVideoMargin;
} }
@ -92,9 +99,6 @@
#remoteVideos .videocontainer.videoContainerFocused, #remoteVideos .videocontainer.videoContainerFocused,
#remoteVideos .videocontainer:hover { #remoteVideos .videocontainer:hover {
cursor: hand; cursor: hand;
margin-right: $thumbnailVideoMargin - 2;
margin-left: $thumbnailVideoMargin - 2;
margin-top: -2px;
} }
/** /**
* Focused video thumbnail. * Focused video thumbnail.

View File

@ -169,6 +169,7 @@
<div id="remoteVideos"> <div id="remoteVideos">
<span id="localVideoContainer" class="videocontainer videocontainer_small"> <span id="localVideoContainer" class="videocontainer videocontainer_small">
<div class="videocontainer__background"></div>
<span id="localVideoWrapper"> <span id="localVideoWrapper">
<!--<video id="localVideo" autoplay muted></video> - is now per stream generated --> <!--<video id="localVideo" autoplay muted></video> - is now per stream generated -->
</span> </span>

View File

@ -819,10 +819,14 @@ UI.emitEvent = function (type, options) {
}; };
UI.clickOnVideo = function (videoNumber) { UI.clickOnVideo = function (videoNumber) {
var remoteVideos = $(".videocontainer:not(#mixedstream)"); let videos = $("#remoteVideos .videocontainer:not(#mixedstream)");
if (remoteVideos.length > videoNumber) { let videosLength = videos.length;
remoteVideos[videoNumber].click();
if(videosLength <= videoNumber) {
return;
} }
let videoIndex = videoNumber === 0 ? 0 : videosLength - videoNumber;
videos[videoIndex].click();
}; };
//Used by torture //Used by torture

View File

@ -631,6 +631,10 @@ RemoteVideo.createContainer = function (spanId) {
container.id = spanId; container.id = spanId;
container.className = 'videocontainer videocontainer_remote'; container.className = 'videocontainer videocontainer_remote';
let wrapper = document.createElement('div');
wrapper.className = 'videocontainer__background';
container.appendChild(wrapper);
let indicatorBar = document.createElement('div'); let indicatorBar = document.createElement('div');
indicatorBar.className = "videocontainer__toptoolbar"; indicatorBar.className = "videocontainer__toptoolbar";
container.appendChild(indicatorBar); container.appendChild(indicatorBar);

View File

@ -83,7 +83,7 @@ var KeyboardShortcut = {
_shortcuts[key].function(e); _shortcuts[key].function(e);
} }
else if (!isNaN(num) && num >= 0 && num <= 9) { else if (!isNaN(num) && num >= 0 && num <= 9) {
APP.UI.clickOnVideo(num + 1); APP.UI.clickOnVideo(num);
} }
//esc while the smileys are visible hides them //esc while the smileys are visible hides them
} else if (key === "ESCAPE" && } else if (key === "ESCAPE" &&