2008-07-14 21:54:50 +08:00
|
|
|
//
|
|
|
|
// Import constants
|
|
|
|
//
|
|
|
|
var STATE_IDLE = <?= STATE_IDLE ?>;
|
|
|
|
var STATE_PREALARM = <?= STATE_PREALARM ?>;
|
|
|
|
var STATE_ALARM = <?= STATE_ALARM ?>;
|
|
|
|
var STATE_ALERT = <?= STATE_ALERT ?>;
|
|
|
|
var STATE_TAPE = <?= STATE_TAPE ?>;
|
|
|
|
|
|
|
|
var stateStrings = new Array();
|
|
|
|
stateStrings[STATE_IDLE] = "<?= $SLANG['Idle'] ?>";
|
|
|
|
stateStrings[STATE_PREALARM] = "<?= $SLANG['Idle'] ?>";
|
|
|
|
stateStrings[STATE_ALARM] = "<?= $SLANG['Alarm'] ?>";
|
|
|
|
stateStrings[STATE_ALERT] = "<?= $SLANG['Alert'] ?>";
|
|
|
|
stateStrings[STATE_TAPE] = "<?= $SLANG['Record'] ?>";
|
|
|
|
|
|
|
|
var deleteString = "<?= $SLANG['Delete'] ?>";
|
|
|
|
|
|
|
|
var CMD_NONE = <?= CMD_NONE ?>;
|
|
|
|
var CMD_PAUSE = <?= CMD_PAUSE ?>;
|
|
|
|
var CMD_PLAY = <?= CMD_PLAY ?>;
|
|
|
|
var CMD_STOP = <?= CMD_STOP ?>;
|
|
|
|
var CMD_FASTFWD = <?= CMD_FASTFWD ?>;
|
|
|
|
var CMD_SLOWFWD = <?= CMD_SLOWFWD ?>;
|
|
|
|
var CMD_SLOWREV = <?= CMD_SLOWREV ?>;
|
|
|
|
var CMD_FASTREV = <?= CMD_FASTREV ?>;
|
|
|
|
var CMD_ZOOMIN = <?= CMD_ZOOMIN ?>;
|
|
|
|
var CMD_ZOOMOUT = <?= CMD_ZOOMOUT ?>;
|
|
|
|
var CMD_PAN = <?= CMD_PAN ?>;
|
|
|
|
var CMD_SCALE = <?= CMD_SCALE ?>;
|
|
|
|
var CMD_PREV = <?= CMD_PREV ?>;
|
|
|
|
var CMD_NEXT = <?= CMD_NEXT ?>;
|
|
|
|
var CMD_SEEK = <?= CMD_SEEK ?>;
|
|
|
|
var CMD_QUERY = <?= CMD_QUERY ?>;
|
|
|
|
|
|
|
|
var SCALE_BASE = <?= SCALE_BASE ?>;
|
|
|
|
|
|
|
|
var SOUND_ON_ALARM = <?= ZM_WEB_SOUND_ON_ALARM ?>;
|
|
|
|
var POPUP_ON_ALARM = <?= ZM_WEB_POPUP_ON_ALARM ?>;
|
|
|
|
|
|
|
|
var streamMode = "<?= $streamMode ?>";
|
2008-12-06 03:06:35 +08:00
|
|
|
var showMode = "<?= ($showPtzControls && !empty($control))?"control":"events" ?>";
|
2008-07-14 21:54:50 +08:00
|
|
|
|
|
|
|
var connKey = '<?= $connkey ?>';
|
|
|
|
var maxDisplayEvents = <?= 2 * MAX_EVENTS ?>;
|
|
|
|
|
|
|
|
var monitorId = <?= $monitor['Id'] ?>;
|
|
|
|
var monitorWidth = <?= $monitor['Width'] ?>;
|
|
|
|
var monitorHeight = <?= $monitor['Height'] ?>;
|
|
|
|
|
2008-09-26 17:47:20 +08:00
|
|
|
var scale = <?= $scale ?>;
|
2008-07-14 21:54:50 +08:00
|
|
|
|
2011-02-07 00:04:11 +08:00
|
|
|
var streamSrc = "<?= preg_replace( '/&/', '&', $streamSrc ) ?>";
|
2008-07-14 21:54:50 +08:00
|
|
|
|
|
|
|
var statusRefreshTimeout = <?= 1000*ZM_WEB_REFRESH_STATUS ?>;
|
|
|
|
var eventsRefreshTimeout = <?= 1000*ZM_WEB_REFRESH_EVENTS ?>;
|
|
|
|
var imageRefreshTimeout = <?= 1000*ZM_WEB_REFRESH_IMAGE ?>;
|
|
|
|
|
|
|
|
var canEditMonitors = <?= canEdit( 'Monitors' )?'true':'false' ?>;
|
|
|
|
var canStreamNative = <?= canStreamNative()?'true':'false' ?>;
|
|
|
|
|
2009-05-26 02:03:46 +08:00
|
|
|
var canPlayPauseAudio = Browser.Engine.trident;
|
|
|
|
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php if ( $monitor['CanMoveMap'] ) { ?>
|
|
|
|
var imageControlMode = "moveMap";
|
|
|
|
<?php } elseif ( $monitor['CanMoveRel'] ) { ?>
|
|
|
|
var imageControlMode = "movePseudoMap";
|
|
|
|
<?php } elseif ( $monitor['CanMoveCon'] ) { ?>
|
|
|
|
var imageControlMode = "moveConMap";
|
|
|
|
<?php } else { ?>
|
|
|
|
var imageControlMode = null;
|
|
|
|
<?php } ?>
|
2009-05-26 02:03:46 +08:00
|
|
|
|
|
|
|
var refreshApplet = <?= (canStreamApplet() && $streamMode == "jpeg")?'true':'false' ?>;
|
|
|
|
var appletRefreshTime = <?= ZM_RELOAD_CAMBOZOLA ?>;
|