Просмотр исходного кода

Merge pull request #1095 from BeatC/shortcuts-reversed

Shortcuts reversed
master
hristoterezov 8 лет назад
Родитель
Сommit
4b1dfb9a33

+ 8
- 4
css/_videolayout_default.scss Просмотреть файл

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

+ 1
- 0
index.html Просмотреть файл

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

+ 7
- 3
modules/UI/UI.js Просмотреть файл

@@ -819,10 +819,14 @@ UI.emitEvent = function (type, options) {
819 819
 };
820 820
 
821 821
 UI.clickOnVideo = function (videoNumber) {
822
-    var remoteVideos = $(".videocontainer:not(#mixedstream)");
823
-    if (remoteVideos.length > videoNumber) {
824
-        remoteVideos[videoNumber].click();
822
+    let videos = $("#remoteVideos .videocontainer:not(#mixedstream)");
823
+    let videosLength = videos.length;
824
+
825
+    if(videosLength <= videoNumber) {
826
+        return;
825 827
     }
828
+    let videoIndex = videoNumber === 0 ? 0 : videosLength - videoNumber;
829
+    videos[videoIndex].click();
826 830
 };
827 831
 
828 832
 //Used by torture

+ 4
- 0
modules/UI/videolayout/RemoteVideo.js Просмотреть файл

@@ -631,6 +631,10 @@ RemoteVideo.createContainer = function (spanId) {
631 631
     container.id = spanId;
632 632
     container.className = 'videocontainer';
633 633
 
634
+    let wrapper = document.createElement('div');
635
+    wrapper.className = 'videocontainer__background';
636
+    container.appendChild(wrapper);
637
+
634 638
     let indicatorBar = document.createElement('div');
635 639
     indicatorBar.className = "videocontainer__toptoolbar";
636 640
     container.appendChild(indicatorBar);

+ 1
- 1
modules/keyboardshortcut/keyboardshortcut.js Просмотреть файл

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

Загрузка…
Отмена
Сохранить