Skip to content

Commit 6d228f5

Browse files
committed
Make sure that there is enough room for videos in kiosk mode and scroll if there isnt.
1 parent 579d124 commit 6d228f5

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

src/styles/components/_audiovideo.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,9 @@
331331
bottom:2px;
332332
text-align:center;
333333
background:rgba(0,0,0,0.4);
334-
padding-right:192px;
335334
min-height:108px;
336335
pointer-events:auto;
336+
white-space:nowrap;
337337
>div {
338338
height:108px;
339339
width:192px;

static/js/services/videolayout.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ define(["jquery", "underscore"], function($, _) {
9090

9191
//console.log("resize", innerHeight, innerWidth);
9292
//console.log("resize", container, videos.length, aspectRatio, innerHeight, innerWidth);
93+
var extraCSS = {};
9394

9495
if (videos.length === 1) {
9596
var newVideoWidth = innerWidth < aspectRatio * innerHeight ? innerWidth : aspectRatio * innerHeight;
9697
var newVideoHeight = innerHeight < innerWidth / aspectRatio ? innerHeight : innerWidth / aspectRatio;
9798
container.style.width = newVideoWidth + 'px';
9899
container.style.left = ((innerWidth - newVideoWidth) / 2) + 'px';
99-
var extraCSS = {};
100100
} else {
101101
var space = innerHeight*innerWidth; // square pixels
102102
var videoSpace = space/videos.length;
@@ -166,6 +166,7 @@ define(["jquery", "underscore"], function($, _) {
166166
this.big = null;
167167
this.remoteVideos.on("click", ".remoteVideo", _.bind(function(event) {
168168
if ($(event.currentTarget).hasClass("remoteVideo")) {
169+
event.stopPropagation();
169170
this.makeBig($(event.currentTarget));
170171
}
171172
}, this));
@@ -214,13 +215,30 @@ define(["jquery", "underscore"], function($, _) {
214215
var aspectRatio = remoteSize.width/remoteSize.height;
215216
var innerHeight = size.height - 110;
216217
var innerWidth = size.width;
218+
var extraCSS = {};
217219

218220
var bigVideoWidth = innerWidth < aspectRatio * innerHeight ? innerWidth : aspectRatio * innerHeight;
219221
var bigVideoHeight = innerHeight < innerWidth / aspectRatio ? innerHeight : innerWidth / aspectRatio;
220222

221223
this.bigVideo.style.width = bigVideoWidth + 'px';
222224
this.bigVideo.style.height = bigVideoHeight + 'px';
223225

226+
// Make space for own video on the right if width goes low.
227+
if (((size.width - (videos.length-1) * 192) / 2) < 192) {
228+
extraCSS = {
229+
".renderer-conferencekiosk .remoteVideos": {
230+
"margin-right": "192px",
231+
"overflow-x": "auto",
232+
"overflow-y": "hidden"
233+
}
234+
};
235+
}
236+
237+
$.injectCSS(extraCSS, {
238+
truncateFirst: true,
239+
containerName: dynamicCSSContainer
240+
});
241+
224242
};
225243

226244
ConferenceKiosk.prototype.close = function(container, scope, controller) {

static/partials/audiovideo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div class="overlayLogo"></div>
66
</div>
77
<div class="remoteContainer">
8-
<div class="remoteVideos"></div>
8+
<div class="remoteVideos nicescroll"></div>
99
<div class="miniContainer" ng-class="{talking: talking}">
1010
<video class="miniVideo" autoplay="autoplay" muted="true"></video>
1111
</div>

0 commit comments

Comments
 (0)