本文整理汇总了PHP中Monitor::DefaultView方法的典型用法代码示例。如果您正苦于以下问题:PHP Monitor::DefaultView方法的具体用法?PHP Monitor::DefaultView怎么用?PHP Monitor::DefaultView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Monitor
的用法示例。
在下文中一共展示了Monitor::DefaultView方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
$view = "error";
return;
}
// This is for input sanitation
$mid = intval($_REQUEST['mid']);
if (!visibleMonitor($mid)) {
$view = "error";
return;
}
$sql = 'SELECT C.*, M.* FROM Monitors AS M LEFT JOIN Controls AS C ON (M.ControlId = C.Id ) WHERE M.Id = ?';
$monitor = new Monitor($mid);
#dbFetchOne( $sql, NULL, array( $_REQUEST['mid'] ) );
if (isset($_REQUEST['showControls'])) {
$showControls = validInt($_REQUEST['showControls']);
} else {
$showControls = canView('Control') && $monitor->DefaultView() == 'Control';
}
$showPtzControls = ZM_OPT_CONTROL && $monitor->Controllable() && canView('Control');
if (isset($_REQUEST['scale'])) {
$scale = validInt($_REQUEST['scale']);
} 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 {