2020-09-03 05:27:59 +08:00
|
|
|
var monitorData = new Array();
|
2020-08-06 23:57:35 +08:00
|
|
|
<?php
|
2020-08-31 22:13:30 +08:00
|
|
|
global $monitors;
|
2020-09-03 05:27:59 +08:00
|
|
|
foreach ( $monitors as $monitor ) {
|
2020-08-31 22:13:30 +08:00
|
|
|
?>
|
2020-09-03 05:27:59 +08:00
|
|
|
monitorData[monitorData.length] = {
|
|
|
|
'id': <?php echo $monitor->Id() ?>,
|
|
|
|
'connKey': <?php echo $monitor->connKey() ?>,
|
|
|
|
'width': <?php echo $monitor->ViewWidth() ?>,
|
|
|
|
'height':<?php echo $monitor->ViewHeight() ?>,
|
|
|
|
'url': '<?php echo $monitor->UrlToIndex( ZM_MIN_STREAMING_PORT ? ($monitor->Id() + ZM_MIN_STREAMING_PORT) : '') ?>',
|
2021-11-11 03:25:12 +08:00
|
|
|
'url_to_zms': '<?php echo $monitor->UrlToZMS( ZM_MIN_STREAMING_PORT ? ($monitor->Id() + ZM_MIN_STREAMING_PORT) : '') ?>',
|
2020-09-03 05:27:59 +08:00
|
|
|
'type': '<?php echo $monitor->Type() ?>',
|
|
|
|
'refresh': '<?php echo $monitor->Refresh() ?>'
|
|
|
|
};
|
2020-08-31 22:13:30 +08:00
|
|
|
<?php
|
|
|
|
}
|
2020-08-06 23:57:35 +08:00
|
|
|
?>
|
2020-09-03 05:27:59 +08:00
|
|
|
|
|
|
|
var STATE_IDLE = <?php echo STATE_IDLE ?>;
|
|
|
|
var STATE_PREALARM = <?php echo STATE_PREALARM ?>;
|
|
|
|
var STATE_ALARM = <?php echo STATE_ALARM ?>;
|
|
|
|
var STATE_ALERT = <?php echo STATE_ALERT ?>;
|
|
|
|
var STATE_TAPE = <?php echo STATE_TAPE ?>;
|
|
|
|
|
|
|
|
var stateStrings = new Array();
|
|
|
|
stateStrings[STATE_IDLE] = "<?php echo translate('Idle') ?>";
|
2021-11-11 03:25:12 +08:00
|
|
|
stateStrings[STATE_PREALARM] = "<?php echo translate('PreAlarm') ?>";
|
2020-09-03 05:27:59 +08:00
|
|
|
stateStrings[STATE_ALARM] = "<?php echo translate('Alarm') ?>";
|
|
|
|
stateStrings[STATE_ALERT] = "<?php echo translate('Alert') ?>";
|
|
|
|
stateStrings[STATE_TAPE] = "<?php echo translate('Record') ?>";
|
|
|
|
|
|
|
|
|
|
|
|
var CMD_PAUSE = <?php echo CMD_PAUSE ?>;
|
|
|
|
var CMD_PLAY = <?php echo CMD_PLAY ?>;
|
|
|
|
var CMD_STOP = <?php echo CMD_STOP ?>;
|
|
|
|
var CMD_QUERY = <?php echo CMD_QUERY ?>;
|
2016-04-11 04:33:55 +08:00
|
|
|
var CMD_QUIT = <?php echo CMD_QUIT ?>;
|
2020-09-03 05:27:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
var statusRefreshTimeout = <?php echo 1000*ZM_WEB_REFRESH_STATUS ?>;
|