diff --git a/web/includes/functions.php b/web/includes/functions.php index 624e4a963..6e25ea2d9 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -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']; } diff --git a/web/skins/classic/views/js/watch.js b/web/skins/classic/views/js/watch.js index 3be7fda7a..18e9643e0 100644 --- a/web/skins/classic/views/js/watch.js +++ b/web/skins/classic/views/js/watch.js @@ -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 ) diff --git a/web/skins/classic/views/js/watch.js.php b/web/skins/classic/views/js/watch.js.php index 16709f9fc..8db4c7efc 100644 --- a/web/skins/classic/views/js/watch.js.php +++ b/web/skins/classic/views/js/watch.js.php @@ -50,7 +50,7 @@ var monitorHeight = ; var scale = ; -var streamSrc = ""; +var streamSrc = ""; var statusRefreshTimeout = ; var eventsRefreshTimeout = ; diff --git a/web/skins/classic/views/watch.php b/web/skins/classic/views/watch.php index 97ab12a50..661630ab3 100644 --- a/web/skins/classic/views/watch.php +++ b/web/skins/classic/views/watch.php @@ -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() )