Browse Source

Merge pull request #1095 from BeatC/shortcuts-reversed

Shortcuts reversed
master
hristoterezov 8 years ago
parent
commit
4b1dfb9a33

+ 8
- 4
css/_videolayout_default.scss View File

43
 .videocontainer {
43
 .videocontainer {
44
     position: relative;
44
     position: relative;
45
     text-align: center;
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
 #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 View File

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__background"></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>

+ 7
- 3
modules/UI/UI.js View File

819
 };
819
 };
820
 
820
 
821
 UI.clickOnVideo = function (videoNumber) {
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
 //Used by torture
832
 //Used by torture

+ 4
- 0
modules/UI/videolayout/RemoteVideo.js View File

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__background';
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);

+ 1
- 1
modules/keyboardshortcut/keyboardshortcut.js View File

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

Loading…
Cancel
Save