DefaultView() == 'Control')); $showPtzControls = ( ZM_OPT_CONTROL && $monitor->Controllable() && canView( 'Control' ) ); if ( isset( $_REQUEST['scale'] ) ) { $scale = validInt($_REQUEST['scale']); } else if ( isset( $_COOKIE['zmWatchScale'.$mid] ) ) { $scale = $_COOKIE['zmWatchScale'.$mid]; } else { $scale = reScale( SCALE_BASE, $monitor->DefaultScale, ZM_WEB_DEFAULT_SCALE ); } $connkey = generateConnKey(); if ( ZM_WEB_STREAM_METHOD == 'mpeg' && ZM_MPEG_LIVE_FORMAT ) { $streamMode = "mpeg"; $streamSrc = $monitor->getStreamSrc( array( "mode=".$streamMode, "scale=".$scale, "bitrate=".ZM_WEB_VIDEO_BITRATE, "maxfps=".ZM_WEB_VIDEO_MAXFPS, "format=".ZM_MPEG_LIVE_FORMAT ) ); } elseif ( canStream() ) { $streamMode = "jpeg"; $streamSrc = $monitor->getStreamSrc( array( "mode=".$streamMode, "scale=".$scale, "maxfps=".ZM_WEB_VIDEO_MAXFPS, "buffer=".$monitor->StreamReplayBuffer() ) ); } else { $streamMode = "single"; $streamSrc = $monitor->getStreamSrc( array( "mode=".$streamMode, "scale=".$scale ) ); Info( "The system has fallen back to single jpeg mode for streaming. Consider enabling Cambozola or upgrading the client browser."); } $showDvrControls = ( $streamMode == 'jpeg' && $monitor->StreamReplayBuffer() != 0 ); noCacheHeaders(); xhtmlHeaders( __FILE__, $monitor->Name()." - ".translate('Feed') ); ?>