Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/work/cameraview.jsp
2026-01-16 14:13:44 +08:00

262 lines
12 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page language="java" pageEncoding="UTF-8"%>
<!doctype html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
<meta http-equiv="Expires" content="0" />
</head>
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/camera/camera.css" rel='stylesheet' />
<style type="text/css">
.ptz .btn2 {
margin: 2px;
border: 1px solid transparent;
border-radius: 4px;
padding: 2px 0;
height: auto;
}
.ptz .btn2:hover{
background: #4d90fe;
color: #fff;
}
.tt{
width: 50%;
}
</style>
<!-- camera -->
<%-- <script src="<%=request.getContextPath()%>/node_modules/jquery/dist/jquery.min.js"></script> --%>
<script src="<%=request.getContextPath()%>/plugins/camera/webVideoCtrl.js"></script>
<script src="<%=request.getContextPath()%>/plugins/camera/camera.js"></script>
<script type="text/javascript">
$(function () {
changeWndNum(1);
clickLogin();
setTimeout("clickStartRealPlay()",1000);
//clickStartRealPlay();
});
var stopRealPlay= function(){
clickStopRealPlay();
//setTimeout("",1000)
}
//实时预览
function shishi(){
$('#ssyl', parent.document).html('实时预览');
changeWndNum(1);
clickLogin();
setTimeout("clickStartRealPlay()",1000);
}
// 开始回放
function clickStartPlayback() {
// var start = $("#starttime").val();
// var end = $("#endtime").val();
$('#ssyl', parent.document).html('回放');
var oWndInfo = WebVideoCtrl.I_GetWindowStatus(g_iWndIndex),
szIP = $("#ip").val(),
bZeroChannel = $("#channels option").eq($("#channels").get(0).selectedIndex).attr("bZero") == "true" ? true : false,
iChannelID = $("#channels").val(),
szStartTime = $("#starttime").val(),
szEndTime = $("#endtime").val(),
szInfo = "",
bChecked = $("#transstream").prop("checked"),
iRet = -1;
if ("" == szIP) {
return;
}
if (bZeroChannel) {// 零通道不支持回放
return;
}
if (oWndInfo != null) {// 已经在播放了,先停止
WebVideoCtrl.I_Stop();
}
if (bChecked) {// 启用转码回放
var oTransCodeParam = {
TransFrameRate: "16",// 0全帧率51627486981010111212161415151813201622
TransResolution: "2",// 255Auto34CIF2QCIF1CIF
TransBitrate: "23"// 232K348K464K580K696K7128K8160K9192K10224K11256K12320K13384K14448K15512K16640K17768K18896K191024K201280K211536K221792K232048K243072K254096K268192K
};
iRet = WebVideoCtrl.I_StartPlayback(szIP, {
iChannelID: iChannelID,
szStartTime: szStartTime,
szEndTime: szEndTime,
oTransCodeParam: oTransCodeParam
});
} else {
iRet = WebVideoCtrl.I_StartPlayback(szIP, {
iChannelID: iChannelID,
szStartTime: szStartTime,
szEndTime: szEndTime
});
}
if (0 == iRet) {
szInfo = "开始回放成功!";
} else {
szInfo = "开始回放失败!";
}
showOPInfo(szIP + " " + szInfo);
}
$(function () {
$(".timecheck").datetimepicker({
bootcssVer:3, //bootstrap-datetimepickerbootstrap v3但这个插件使用的时候并没有和V3相匹配仍然调用的是bootstrap V2的图标 把bootcssVer的值直接设为3否则datetimepicker不会显示出上、下个月的箭头
format: 'yyyy-mm-dd HH:mm',
minView: 'day',//设置时间选择为年月日 去掉时分秒选择
todayBtn: true, //如果此值为true 或 "linked",则在日期时间选择器组件的底部显示一个 "Today" 按钮用以选择当前日期。如果是true的话"Today" 按钮仅仅将视图转到当天的日期,如果是"linked",当天日期将会被选中。
language: 'zh-CN',
autoclose: true, //当选择一个日期之后是否立即关闭此日期时间选择器。
keyboardNavigation: true, //是否允许通过方向键改变日期。
forceParse: true, //当选择器关闭的时候,是否强制解析输入框中的值。
todayHighlight: 1 //如果为true, 高亮当前日期
})
});
// //獲取當前日期
// function getToday(){
// var today = new Date()
// var year = today.getFullYear();
// var month = today.getMonth() + 1;
// var day = today.getDate();
// var todayStr = year+"-"+month+"-"+day;
// return todayStr;
// }
</script>
<body onUnLoad="stopRealPlay();clickLogout();">
<div id="divPlugin" class="plugin"></div>
<input id="loginip" type="hidden" value="${url}" />
<input id="port" type="hidden" value="${port}" />
<input id="username" type="hidden" value="${camera.username}" />
<input id="password" type="hidden" value="${camera.password}" />
<input id="deviceport" type="hidden" value="8000" />
<input id="ip" type="hidden" value="${url}" />
<input id="channels" type="hidden" value="${camera.channel}" />
<input id="streamtype" type="hidden" value="${streamtype}" />
<div class="left">
<!-- <fieldset class="ptz" style="width:95%;">
<legend style="width:auto;border: 0;padding: 0 10px;margin-bottom: 0;">云台控制</legend>
<div style="width:100%;" >
<table cellpadding="0" cellspacing="3" border="0" class="left" style="width:60%;height:100%;float:left;text-align:center;">
<tr>
<td>
<input type="button" class="btn2" value="左上" onmousedown="mouseDownPTZControl(5);" onmouseup="mouseUpPTZControl();" />
<input type="button" class="btn2" value="上" onmousedown="mouseDownPTZControl(1);" onmouseup="mouseUpPTZControl();" />
<input type="button" class="btn2" value="右上" onmousedown="mouseDownPTZControl(7);" onmouseup="mouseUpPTZControl();" />
</td>
</tr>
<tr>
<td>
<input type="button" class="btn2" value="左" onmousedown="mouseDownPTZControl(3);" onmouseup="mouseUpPTZControl();" />
<input type="button" class="btn2" value="自动" onclick="mouseDownPTZControl(9);" />
<input type="button" class="btn2" value="右" onmousedown="mouseDownPTZControl(4);" onmouseup="mouseUpPTZControl();" />
</td>
</tr>
<tr>
<td>
<input type="button" class="btn2" value="左下" onmousedown="mouseDownPTZControl(6);" onmouseup="mouseUpPTZControl();" />
<input type="button" class="btn2" value="下" onmousedown="mouseDownPTZControl(2);" onmouseup="mouseUpPTZControl();" />
<input type="button" class="btn2" value="右下" onmousedown="mouseDownPTZControl(8);" onmouseup="mouseUpPTZControl();" />
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="3" border="0" class="left" style="width:40%;height:100%;float:left;text-align:center;">
<tr>
<td class="tt"><input type="button" style="margin-right: -20px;" class="btn2" value="变倍+" onmousedown="PTZZoomIn()" onmouseup="PTZZoomStop()"></td>
<td><input type="button" style="margin-right: 20px;" class="btn2" value="变倍-" onmousedown="PTZZoomout()" onmouseup="PTZZoomStop()"></td>
</tr>
<tr>
<td class="tt"><input type="button" style="margin-right: -20px;" class="btn2" value="变焦+" onmousedown="PTZFocusIn()" onmouseup="PTZFoucusStop()"></td>
<td><input type="button" style="margin-right: 20px;" class="btn2" value="变焦-" onmousedown="PTZFoucusOut()" onmouseup="PTZFoucusStop()"></td>
</tr>
<tr>
<td class="tt"><input type="button" style="margin-right: -20px;" class="btn2" value="光圈+" onmousedown="PTZIrisIn()" onmouseup="PTZIrisStop()"></td>
<td><input type="button" style="margin-right: 20px;" class="btn2" value="光圈-" onmousedown="PTZIrisOut()" onmouseup="PTZIrisStop()"></td>
</tr>
</table>
</div>
</fieldset> -->
<fieldset class="playback" style="width:95%;padding-top: 0px">
<legend>回放</legend>
<table width="100%" cellpadding="0" cellspacing="3" border="0" >
<!-- <tr>
<td class="tt">码流类型</td>
<td>
<select id="record_streamtype" class="sel">
<option value="1">主码流</option>
<option value="2">子码流</option>
</select>
</td>
</tr> -->
<tr>
<td class="tt">开始时间</td>
<td>
<!-- <input id="starttime" type="text" class="txt" value="2013-12-10 00:00:00" />时间格式2013-11-11 12:34:56 -->
<input type="text" id="starttime" class="txt timecheck" name="recordDate" />
</td>
<!-- </tr>
<tr> -->
<td class="tt">结束时间</td>
<td>
<!-- <input id="endtime" type="text" class="txt" value="2013-12-11 23:59:59" /> -->
<input type="text" id="endtime" class="txt timecheck" name="recordDate" />
<!-- <input type="button" class="btn" value="搜索" onclick="clickRecordSearch(0);" /> -->
</td>
<!-- <td>
<div class='input-group date' id='datetimepicker2'>
<input type='text' class="form-control" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</td> -->
</tr>
<!-- <tr>
<td colspan="2">
<div id="searchdiv" class="searchdiv">
<table id="searchlist" class="searchlist" cellpadding="0" cellspacing="0" border="0"></table>
</div>
</td>
</tr> -->
<tr><td>&nbsp;</td></tr>
<tr>
<td colspan="4">
<input type="button" class="btn2" value="开始回放" onclick="clickStartPlayback();" />
<input type="button" class="btn2" value="停止回放" onclick="clickStopPlayback();" />
<!-- <input type="button" class="btn" value="倒放" onclick="clickReversePlayback();" />
<input type="button" class="btn" value="单帧" onclick="clickFrame();" />
<input id="transstream" type="checkbox" class="vtop" />&nbsp;启用转码码流 -->
<!-- </td>
</tr>
<tr>
<td colspan="2"> -->
<input type="button" class="btn2" value="暂停" onclick="clickPause();" />
<input type="button" class="btn2" value="恢复" onclick="clickResume();" />
<input type="button" class="btn2" value="慢放-" onclick="clickPlaySlow();" />
<input type="button" class="btn2" value="快放+" onclick="clickPlayFast();" />
<input type="button" class="btn2" value="实时预览" onclick="shishi();" />
</td>
</tr>
<!-- <tr>
<td colspan="2">
<input type="button" class="btn" value="抓图" onclick="clickCapturePic();" />
<input type="button" class="btn2" value="开始剪辑" onclick="clickStartRecord('playback');" />
<input type="button" class="btn2" value="停止剪辑" onclick="clickStopRecord('playback');" />
<input type="button" class="btn2" value="OSD时间" onclick="clickGetOSDTime();" />&nbsp;<input id="osdtime" type="text" class="txt" readonly />
</td>
</tr> -->
</table>
</fieldset>
</div>
</body>
</html>