Monitor(); if (!$monitor->canView()) { $view = 'error'; return; } zm_session_start(); if (isset($_REQUEST['rate']) ) { $rate = validInt($_REQUEST['rate']); } else if (isset($_COOKIE['zmEventRate'])) { $rate = $_COOKIE['zmEventRate']; } else { $rate = reScale(RATE_BASE, $monitor->DefaultRate(), ZM_WEB_DEFAULT_RATE); } if ($rate > 1600) { $rate = 1600; zm_setcookie('zmEventRate', $rate); } if (isset($_REQUEST['scale'])) { $scale = validInt($_REQUEST['scale']); } else if (isset($_COOKIE['zmEventScale'.$Event->MonitorId()])) { $scale = $_COOKIE['zmEventScale'.$Event->MonitorId()]; } else { $scale = $monitor->DefaultScale(); } $showZones = false; if (isset($_REQUEST['showZones'])) { $showZones = $_REQUEST['showZones'] == 1; $_SESSION['zmEventShowZones'.$monitor->Id()] = $showZones; } else if (isset($_COOKIE['zmEventShowZones'.$monitor->Id()])) { $showZones = $_COOKIE['zmEventShowZones'.$monitor->Id()] == 1; } else if (isset($_SESSION['zmEventShowZones'.$monitor->Id()]) ) { $showZones = $_SESSION['zmEventShowZones'.$monitor->Id()]; } $codec = 'auto'; if (isset($_REQUEST['codec'])) { $codec = $_REQUEST['codec']; $_SESSION['zmEventCodec'.$Event->MonitorId()] = $codec; } else if ( isset($_SESSION['zmEventCodec'.$Event->MonitorId()]) ) { $codec = $_SESSION['zmEventCodec'.$Event->MonitorId()]; } else { $codec = $monitor->DefaultCodec(); } session_write_close(); $codecs = array( 'auto' => translate('Auto'), 'MP4' => translate('MP4'), 'MJPEG' => translate('MJPEG'), ); $replayModes = array( 'none' => translate('None'), 'single' => translate('ReplaySingle'), 'all' => translate('ReplayAll'), 'gapless' => translate('ReplayGapless'), ); if (isset($_REQUEST['streamMode'])) $streamMode = validHtmlStr($_REQUEST['streamMode']); else $streamMode = 'video'; $replayMode = ''; if (isset($_REQUEST['replayMode'])) $replayMode = validHtmlStr($_REQUEST['replayMode']); if (isset($_COOKIE['replayMode']) && preg_match('#^[a-z]+$#', $_COOKIE['replayMode'])) $replayMode = validHtmlStr($_COOKIE['replayMode']); if ((!$replayMode) or !$replayModes[$replayMode]) { $replayMode = 'none'; } $video_tag = ($Event->DefaultVideo() and ($codec == 'MP4' or $codec == 'auto')); // videojs zoomrotate only when direct recording $Zoom = 1; $Rotation = 0; if ($monitor->VideoWriter() == '2') { # Passthrough $Rotation = $Event->Orientation(); if (in_array($Event->Orientation(),array('90','270'))) $Zoom = $Event->Height()/$Event->Width(); } // These are here to figure out the next/prev event, however if there is no filter, then default to one that specifies the Monitor if ( !isset($_REQUEST['filter']) ) { $_REQUEST['filter'] = array( 'Query'=>array( 'terms'=>array( array('attr'=>'MonitorId', 'op'=>'=', 'val'=>$Event->MonitorId()) ) ) ); } parseSort(); $filter = ZM\Filter::parse($_REQUEST['filter']); $filterQuery = $filter->querystring(); $connkey = generateConnKey(); xhtmlHeaders(__FILE__, translate('Event').' '.$Event->Id()); ?>
Id() ) { echo '
Event was not found.
'; } if ( $Event->Id() and !file_exists($Event->Path()) ) echo '
Event was not found at '.$Event->Path().'. It is unlikely that playback will be possible.
'; ?>

Id() ?>

'changeReplayMode','id'=>'replayMode')); ?>
'changeScale','id'=>'scale')); ?>
'changeCodec','id'=>'codec')); ?>
Id() ) { ?>
getStreamSrc(array('mode'=>'mpeg', 'scale'=>$scale, 'rate'=>$rate, 'bitrate'=>ZM_WEB_VIDEO_BITRATE, 'maxfps'=>ZM_WEB_VIDEO_MAXFPS, 'format'=>ZM_MPEG_REPLAY_FORMAT, 'replay'=>$replayMode),'&'); outputVideoStream('evtStream', $streamSrc, reScale( $Event->Width(), $scale ).'px', reScale( $Event->Height(), $scale ).'px', ZM_MPEG_LIVE_FORMAT ); } else { $streamSrc = $Event->getStreamSrc(array('mode'=>'jpeg', 'frame'=>$fid, 'scale'=>$scale, 'rate'=>$rate, 'maxfps'=>ZM_WEB_VIDEO_MAXFPS, 'replay'=>$replayMode),'&'); if ( canStreamNative() ) { outputImageStream('evtStream', $streamSrc, '100%', '100%', validHtmlStr($Event->Name())); } else { outputHelperStream('evtStream', $streamSrc, '100%', '100%'); } } // end if stream method ?>
$monitor->Id()), array('order'=>'Area DESC')) as $zone) { echo $zone->svg_polygon(); } // end foreach zone ?> Sorry, your browser does not support inline SVG

: Replay : 'rateValue')); ?> : 0s : 1x