split out versus get functionality in includes/functions. Fix positioning of svg over image stream
This commit is contained in:
parent
89f58daf89
commit
a8e407172a
|
@ -365,9 +365,10 @@ function outputHelperStream( $id, $src, $width, $height, $title="" ) {
|
|||
}
|
||||
|
||||
function outputImageStill( $id, $src, $width, $height, $title="" ) {
|
||||
?>
|
||||
<img id="<?php echo $id ?>" src="<?php echo $src ?>" alt="<?php echo $title ?>" width="<?php echo $width ?>" height="<?php echo $height ?>"/>
|
||||
<?php
|
||||
echo getImageStill( $id, $src, $width, $height, $title="" );
|
||||
}
|
||||
function getImageStill( $id, $src, $width, $height, $title="" ) {
|
||||
return '<img id="'.$id.'" src="'.$src.'" alt="'.$title.'" width="'.$width.'" height="'.$height.'"/>';
|
||||
}
|
||||
|
||||
function outputControlStill( $src, $width, $height, $monitor, $scale, $target ) {
|
||||
|
@ -2094,14 +2095,15 @@ function getStreamHTML( $monitor, $scale=100 ) {
|
|||
return getVideoStream( "liveStream", $streamSrc, reScale( $monitor->Width(), $scale ), reScale( $monitor->Height(), $scale ), ZM_MPEG_LIVE_FORMAT, $monitor->Name() );
|
||||
} else if ( canStream() ) {
|
||||
$streamSrc = $monitor->getStreamSrc( array( 'mode=jpeg', 'scale='.$scale, 'maxfps='.ZM_WEB_VIDEO_MAXFPS, 'buffer='.$monitor->StreamReplayBuffer() ) );
|
||||
if ( canStreamNative() )
|
||||
if ( canStreamNative() ) {
|
||||
return getImageStream( "liveStream", $streamSrc, reScale( $monitor->Width(), $scale ), reScale( $monitor->Height(), $scale ), $monitor->Name() );
|
||||
elseif ( canStreamApplet() )
|
||||
outputHelperStream( "liveStream", $streamSrc, reScale( $monitor->Width(), $scale ), reScale( $monitor->Height(), $scale ), $monitor->Name() );
|
||||
} elseif ( canStreamApplet() ) {
|
||||
return getHelperStream( "liveStream", $streamSrc, reScale( $monitor->Width(), $scale ), reScale( $monitor->Height(), $scale ), $monitor->Name() );
|
||||
}
|
||||
} else {
|
||||
$streamSrc = $monitor->getStreamSrc( array( 'mode=single', "scale=".$scale ) );
|
||||
outputImageStill( "liveStream", $streamSrc, reScale( $monitor->Width(), $scale ), reScale( $monitor->Height(), $scale ), $monitor->Name() );
|
||||
Info( "The system has fallen back to single jpeg mode for streaming. Consider enabling Cambozola or upgrading the client browser.");
|
||||
return getImageStill( "liveStream", $streamSrc, reScale( $monitor->Width(), $scale ), reScale( $monitor->Height(), $scale ), $monitor->Name() );
|
||||
}
|
||||
} // end function getStreamHTML
|
||||
|
||||
|
|
|
@ -214,9 +214,9 @@ xhtmlHeaders(__FILE__, translate('Zone') );
|
|||
</div>
|
||||
<div id="definitionPanel">
|
||||
<div id="imagePanel">
|
||||
<div id="imageFrame" style="width: <?php echo reScale( $monitor->Width(), $scale ) ?>px; height: <?php echo reScale( $monitor->Height(), $scale ) ?>px;">
|
||||
<?php $StreamHTML; ?>
|
||||
<svg id="zoneSVG" class="zones" style="width: <?php echo reScale( $monitor->Width(), $scale ) ?>px; height: <?php echo reScale( $monitor->Height(), $scale ) ?>px;margin-top: -<?php echo $monitor->Height ?>px;background: none;">
|
||||
<div id="imageFrame" style="position: relative; width: <?php echo reScale( $monitor->Width(), $scale ) ?>px; height: <?php echo reScale( $monitor->Height(), $scale ) ?>px;">
|
||||
<?php echo $StreamHTML; ?>
|
||||
<svg id="zoneSVG" class="zones" style="position: absolute; top: 0; left: 0; width: <?php echo reScale( $monitor->Width(), $scale ) ?>px; height: <?php echo reScale( $monitor->Height(), $scale ) ?>px; background: none;">
|
||||
<polygon id="zonePoly" points="<?php echo $zone['AreaCoords'] ?>" class="<?php echo $zone['Type'] ?>"/>
|
||||
Sorry, your browser does not support inline SVG
|
||||
</svg>
|
||||
|
|
Loading…
Reference in New Issue