Improved stream handling for single image mode, for Chrome etc.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3281 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
ee3c2f84a4
commit
98203e6c2f
|
@ -171,7 +171,7 @@ function getStreamSrc( $args, $querySep='&' )
|
|||
$args[] = "user=".$_SESSION['username'];
|
||||
}
|
||||
}
|
||||
if ( !empty($GLOBALS['connkey']) )
|
||||
if ( !in_array( "mode=single", $args ) && !empty($GLOBALS['connkey']) )
|
||||
{
|
||||
$args[] = "connkey=".$GLOBALS['connkey'];
|
||||
}
|
||||
|
|
|
@ -710,9 +710,13 @@ function initPage()
|
|||
var streamImg = $('imageFeed').getElement('img');
|
||||
if ( !streamImg )
|
||||
streamImg = $('imageFeed').getElement('object');
|
||||
$(streamImg).addEvent( 'click', handleClick.bindWithEvent( $(streamImg) ) );
|
||||
if ( streamMode == "single" )
|
||||
{
|
||||
streamImg.addEvent( 'click', fetchImage.pass( streamImg ) );
|
||||
fetchImage.pass( streamImg ).periodical( imageRefreshTimeout );
|
||||
}
|
||||
else
|
||||
streamImg.addEvent( 'click', handleClick.bindWithEvent( streamImg ) );
|
||||
}
|
||||
|
||||
if ( refreshApplet && appletRefreshTime )
|
||||
|
|
|
@ -50,7 +50,7 @@ var monitorHeight = <?= $monitor['Height'] ?>;
|
|||
|
||||
var scale = <?= $scale ?>;
|
||||
|
||||
var streamSrc = "<?= $streamSrc ?>";
|
||||
var streamSrc = "<?= preg_replace( '/&/', '&', $streamSrc ) ?>";
|
||||
|
||||
var statusRefreshTimeout = <?= 1000*ZM_WEB_REFRESH_STATUS ?>;
|
||||
var eventsRefreshTimeout = <?= 1000*ZM_WEB_REFRESH_EVENTS ?>;
|
||||
|
|
|
@ -44,7 +44,6 @@ $connkey = generateConnKey();
|
|||
if ( ZM_WEB_STREAM_METHOD == 'mpeg' && ZM_MPEG_LIVE_FORMAT )
|
||||
{
|
||||
$streamMode = "mpeg";
|
||||
//$streamSrc = getStreamSrc( array( "mode=".$streamMode, "monitor=".$monitor['Id'], "scale=".$scale, "bitrate=".ZM_WEB_VIDEO_BITRATE, "maxfps=".ZM_WEB_VIDEO_MAXFPS, "format=".ZM_MPEG_LIVE_FORMAT, "buffer=".$monitor['StreamReplayBuffer'] ) );
|
||||
$streamSrc = getStreamSrc( array( "mode=".$streamMode, "monitor=".$monitor['Id'], "scale=".$scale, "bitrate=".ZM_WEB_VIDEO_BITRATE, "maxfps=".ZM_WEB_VIDEO_MAXFPS, "format=".ZM_MPEG_LIVE_FORMAT ) );
|
||||
}
|
||||
elseif ( canStream() )
|
||||
|
|
Loading…
Reference in New Issue