@@ -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 ) {
0 commit comments