add scale to query params because zms doesn't wupport width&height

This commit is contained in:
Isaac Connor 2020-08-24 12:05:14 -04:00
parent b5cdc5c32d
commit 56e2ac5baa
1 changed files with 2 additions and 1 deletions

View File

@ -286,9 +286,10 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
$imgHTML=''; $imgHTML='';
if ( ZM_WEB_LIST_THUMBS && $monitor['Status'] == 'Connected' && $running ) { if ( ZM_WEB_LIST_THUMBS && $monitor['Status'] == 'Connected' && $running ) {
$options = array(); $options = array();
$ratio_factor = $Monitor->Height()/ $Monitor->Width(); $ratio_factor = $Monitor->Height() / $Monitor->Width();
$options['width'] = ZM_WEB_LIST_THUMB_WIDTH; $options['width'] = ZM_WEB_LIST_THUMB_WIDTH;
$options['height'] = ZM_WEB_LIST_THUMB_HEIGHT ? ZM_WEB_LIST_THUMB_HEIGHT : ZM_WEB_LIST_THUMB_WIDTH*$ratio_factor; $options['height'] = ZM_WEB_LIST_THUMB_HEIGHT ? ZM_WEB_LIST_THUMB_HEIGHT : ZM_WEB_LIST_THUMB_WIDTH*$ratio_factor;
$options['scale'] = intval(ZM_WEB_LIST_THUMB_WIDTH / $Monitor->Width());
$options['mode'] = 'single'; $options['mode'] = 'single';
$stillSrc = $Monitor->getStreamSrc($options); $stillSrc = $Monitor->getStreamSrc($options);