Fix bug with resizing when using shortcut for switching btw videos

This commit is contained in:
Ilya Daynatovich 2016-11-01 15:17:44 +02:00
parent c6c701330a
commit d703271c96
4 changed files with 17 additions and 9 deletions

View File

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

View File

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

View File

@ -819,12 +819,11 @@ UI.emitEvent = function (type, options) {
};
UI.clickOnVideo = function (videoNumber) {
let videos = $(".videocontainer:not(#mixedstream)").toArray();
let videos = $("#remoteVideos .videocontainer:not(#mixedstream)").toArray();
// Remove large video container if matched and reverse order of
// remote video containers
let videosMap = videos.filter(el => el.id !== 'largeVideoContainer')
.reduce((videoObj, video) => {
// 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 {

View File

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