diff --git a/web/skins/classic/views/watch.php b/web/skins/classic/views/watch.php index a86b09237..04a14b57b 100644 --- a/web/skins/classic/views/watch.php +++ b/web/skins/classic/views/watch.php @@ -29,7 +29,6 @@ include('_monitor_filters.php'); $filterbar = ob_get_contents(); ob_end_clean(); - // This is for input sanitation $mid = isset($_REQUEST['mid']) ? intval($_REQUEST['mid']) : 0; @@ -121,21 +120,28 @@ $options['scale'] = $scale; if (isset($_REQUEST['width'])) { $options['width'] = validInt($_REQUEST['width']); -} else if ( isset($_COOKIE['zmCycleWidth']) and $_COOKIE['zmCycleWidth'] ) { - $options['width'] = $_COOKIE['zmCycleWidth']; +} else if ( isset($_COOKIE['zmWatchWidth']) and $_COOKIE['zmWatchWidth'] ) { + $options['width'] = $_COOKIE['zmWatchWidth']; } else { $options['width'] = ''; } if (isset($_REQUEST['height'])) { $options['height'] =validInt($_REQUEST['height']); -} else if (isset($_COOKIE['zmCycleHeight']) and $_COOKIE['zmCycleHeight']) { - $options['height'] = $_COOKIE['zmCycleHeight']; +} else if (isset($_COOKIE['zmWatchHeight']) and $_COOKIE['zmWatchHeight']) { + $options['height'] = $_COOKIE['zmWatchHeight']; } else { $options['height'] = ''; } +if ( + ($options['width'] and ($options['width'] != 'auto')) + or + ($options['height'] and ($options['height'] != 'auto')) +) { + $options['scale'] = 'fixed'; +} $connkey = generateConnKey(); -if ( $monitor->JanusEnabled() ) { +if ($monitor->JanusEnabled()) { $streamMode = 'janus'; } else { $streamMode = getStreamMode(); @@ -207,10 +213,10 @@ if ( $monitor->Status() != 'Connected' and $monitor->Type() != 'WebSite' ) { echo '
Monitor is not capturing. We will be unable to provide an image
'; } ?> -
-
- -
-
+ +
-> -
-Type() != 'WebSite') { - echo $monitor->getMonitorStateHTML(); - ?> +> +Type() != 'WebSite') { + $options['state'] = true; +} +echo $monitor->getStreamHTML($options); +if ($monitor->Type() != 'WebSite') { +?>