Przeglądaj źródła

Fix bug with resizing when using shortcut for switching btw videos

master
Ilya Daynatovich 9 lat temu
rodzic
commit
d703271c96

+ 8
- 4
css/_videolayout_default.scss Wyświetl plik

43
 .videocontainer {
43
 .videocontainer {
44
     position: relative;
44
     position: relative;
45
     text-align: center;
45
     text-align: center;
46
+
47
+    &__wrapper {
48
+        @include topLeft();
49
+        width: 100%;
50
+        height: 100%;
51
+        background-color: black;
52
+    }
46
 }
53
 }
47
 
54
 
48
 #remoteVideos .videocontainer {
55
 #remoteVideos .videocontainer {
49
     display: none;
56
     display: none;
50
     position: relative;
57
     position: relative;
51
-    background-color: black;
52
     background-size: contain;
58
     background-size: contain;
59
+    border: 2px solid transparent;
53
     border-radius:1px;
60
     border-radius:1px;
54
     margin: 0 $thumbnailVideoMargin;
61
     margin: 0 $thumbnailVideoMargin;
55
 }
62
 }
92
 #remoteVideos .videocontainer.videoContainerFocused,
99
 #remoteVideos .videocontainer.videoContainerFocused,
93
 #remoteVideos .videocontainer:hover {
100
 #remoteVideos .videocontainer:hover {
94
     cursor: hand;
101
     cursor: hand;
95
-    margin-right: $thumbnailVideoMargin - 2;
96
-    margin-left: $thumbnailVideoMargin - 2;
97
-    margin-top: -2px;
98
 }
102
 }
99
 /**
103
 /**
100
  * Focused video thumbnail.
104
  * Focused video thumbnail.

+ 1
- 0
index.html Wyświetl plik

169
 
169
 
170
             <div id="remoteVideos">
170
             <div id="remoteVideos">
171
                 <span id="localVideoContainer" class="videocontainer videocontainer_small">
171
                 <span id="localVideoContainer" class="videocontainer videocontainer_small">
172
+                    <div class="videocontainer__wrapper"></div>
172
                     <span id="localVideoWrapper">
173
                     <span id="localVideoWrapper">
173
                         <!--<video id="localVideo" autoplay muted></video> - is now per stream generated -->
174
                         <!--<video id="localVideo" autoplay muted></video> - is now per stream generated -->
174
                     </span>
175
                     </span>

+ 4
- 5
modules/UI/UI.js Wyświetl plik

819
 };
819
 };
820
 
820
 
821
 UI.clickOnVideo = function (videoNumber) {
821
 UI.clickOnVideo = function (videoNumber) {
822
-    let videos = $(".videocontainer:not(#mixedstream)").toArray();
822
+    let videos = $("#remoteVideos .videocontainer:not(#mixedstream)").toArray();
823
 
823
 
824
-    // Remove large video container if matched and reverse order of
825
-    // remote video containers
826
-    let videosMap = videos.filter(el => el.id !== 'largeVideoContainer')
827
-          .reduce((videoObj, video) => {
824
+    // Separate remotes from local videocontainer and reverse order of
825
+    // remote ones
826
+    let videosMap = videos.reduce((videoObj, video) => {
828
               if(video.id === 'localVideoContainer') {
827
               if(video.id === 'localVideoContainer') {
829
                   videoObj.local = video;
828
                   videoObj.local = video;
830
               } else {
829
               } else {

+ 4
- 0
modules/UI/videolayout/RemoteVideo.js Wyświetl plik

631
     container.id = spanId;
631
     container.id = spanId;
632
     container.className = 'videocontainer';
632
     container.className = 'videocontainer';
633
 
633
 
634
+    let wrapper = document.createElement('div');
635
+    wrapper.className = 'videocontainer__wrapper';
636
+    container.appendChild(wrapper);
637
+
634
     let indicatorBar = document.createElement('div');
638
     let indicatorBar = document.createElement('div');
635
     indicatorBar.className = "videocontainer__toptoolbar";
639
     indicatorBar.className = "videocontainer__toptoolbar";
636
     container.appendChild(indicatorBar);
640
     container.appendChild(indicatorBar);

Ładowanie…
Anuluj
Zapisz