File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
web/skins/classic/views/js Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -538,6 +538,21 @@ function handleClick(evt) {
538
538
function startMonitors ( ) {
539
539
for ( let i = 0 , length = monitors . length ; i < length ; i ++ ) {
540
540
const monitor = monitors [ i ] ;
541
+ // Why are we scaling here instead of in monitorstream?
542
+ /* +++ If you delete this code, then Firefox will slow down terribly... you need to UNDERSTAND the problem!!!*/
543
+ const obj = document . getElementById ( 'liveStream' + monitor . id ) ;
544
+ if ( obj ) {
545
+ if ( obj . src ) {
546
+ const url = new URL ( obj . src ) ;
547
+ let scale = parseInt ( obj . clientWidth / monitor . width * 100 ) ;
548
+ if ( scale > 100 ) scale = 100 ;
549
+ url . searchParams . set ( 'scale' , scale ) ;
550
+ obj . src = url ;
551
+ }
552
+ } else {
553
+ console . log ( `startMonitors NOT FOUND ${ 'liveStream' + monitor . id } ` ) ;
554
+ }
555
+ /* --- */
541
556
const isOut = isOutOfViewport ( monitor . getElement ( ) ) ;
542
557
if ( ! isOut . all ) {
543
558
monitor . start ( ) ;
You can’t perform that action at this time.
0 commit comments