first commit
This commit is contained in:
100
WebRoot/jsp/work/OneCameraVideoForDP.jsp
Normal file
100
WebRoot/jsp/work/OneCameraVideoForDP.jsp
Normal file
@ -0,0 +1,100 @@
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
||||
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.ztree li a.level0 span {
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
.ztree li a.level1 span {
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
.ztree li a.level2 span {
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
.ztree li a.level3 span {
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
.ztree li a.level4 span {
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
.white{
|
||||
border: 0px solid white;
|
||||
}
|
||||
.red{
|
||||
border: 0px solid red;
|
||||
}
|
||||
img[src=""],img:not([src]){
|
||||
opacity:0;
|
||||
}
|
||||
.gray {
|
||||
-webkit-filter: grayscale(100%);
|
||||
-moz-filter: grayscale(100%);
|
||||
-ms-filter: grayscale(100%);
|
||||
-o-filter: grayscale(100%);
|
||||
filter: grayscale(100%);
|
||||
filter: gray;
|
||||
opacity:0.3;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function viewThisCamera(id,online){
|
||||
//alert(id+'---'+online);
|
||||
if(!online){
|
||||
swal('该摄像头无法连接。');
|
||||
return;
|
||||
}
|
||||
var websocket = null;
|
||||
var restartDialog;
|
||||
//判断当前浏览器是否支持WebSocket
|
||||
if ('WebSocket' in window) {
|
||||
var time = '${time}';
|
||||
if(time==null || time==''){
|
||||
time="now";
|
||||
}
|
||||
websocket = new WebSocket(ext.basePath.replace("http","ws")+"/videoWebSocket/"+id+"/"+time+"/dpvideo/high");
|
||||
}
|
||||
else {
|
||||
alert('当前浏览器 Not support websocket')
|
||||
}
|
||||
//连接发生错误的回调方法
|
||||
websocket.onerror = function () {
|
||||
};
|
||||
|
||||
//连接成功建立的回调方法
|
||||
websocket.onopen = function () {
|
||||
console.info('消息滚动websocker开启');
|
||||
}
|
||||
//接收到消息的回调方法
|
||||
websocket.onmessage = function (event) {
|
||||
// var result= JSON.parse(event.data);
|
||||
$("#show_video_1").attr("src", event.data);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="viewThisCamera('${id}','${online}')" class="hold-transition ${cu.themeclass} sidebar-mini" style="width: 100%;height: 100%;background-color: rgb(23, 39, 55);">
|
||||
<div id="videos" style="width:100%;height:100%;float: left;background-color: rgb(23, 39, 55);">
|
||||
<div style="width: 100%;height: 100%;float: left;background-color: rgb(23, 39, 55);" id="video_1" class="white">
|
||||
<img id="show_video_1" style="width: 100%;height: 100%;" src="" >
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user