multiple-police-situations/public/cw_/index.html

111 lines
2.8 KiB
HTML
Raw Normal View History

2024-08-05 16:43:08 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0" />
<title>CMS Player</title>
<link rel="shortcut icon" href="#" />
<script src="./public/player/cmsplayer.js"></script>
<script src="./public/player/common.js"></script>
<script src="./public/player/pcm-player.js"></script>
<script src="./public/player/webgl.js"></script>
<script src="./public/player/cmstalk.js"></script>
<script src="./public/player/alawmulaw.js"></script>
<script src="./public/player/recorder-core.js"></script>
<script src="./public/js/moment.js"></script>
<script src="./public/js/axios.min.js"></script>
<script src="./public/js/jquery-2.2.3.min.js"></script>
<style>
html,
body {
width: 100%;
height: 100%;
margin: 0;
/* padding: 30px; */
box-sizing: border-box;
}
div {
user-select: none;
-ms-user-select: none;
-moz-user-select: none;
-html-user-select: none;
-webkit-user-select: none;
}
ul {
list-style: none;
}
ul li {
height: 100%;
float: left;
box-sizing: border-box;
}
#videoTimeTrack li {
border-right: 1px solid #ccc;
}
#videoTimeTrack li:first-child {
border-left: 1px solid #ccc;
}
#playerBox {
height: 100%;
width: 100%;
}
</style>
</head>
<body ontouchstart>
<div id="playerBox"></div>
<script type="text/javascript">
window.onload = function () {
self.player = new Player($("#playerBox"));
function getParams(key) {
var reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) {
return decodeURIComponent(r[2]); // 使用 decodeURIComponent 代替 unescape
}
return null;
}
var locationUrl = window.location.href;
var id = getParams("id");
var title = getParams("title");
let requestBody = {
pointId: id,
useTLS: 0
2024-08-05 16:43:08 +08:00
}
// console.log(window.location, locationUrl, id, title);
2024-08-05 16:43:08 +08:00
try {
if (window.location.host === 'www.hndyjqrh.cn') {
requestBody.useTLS = 1
}
// requestBody.useTLS = 1
let url = ' https://www.hndyjqrh.cn/api/multialarm/video/preview'
2024-08-05 16:43:08 +08:00
axios({
method: 'post',
url,
data: { ...requestBody }
}).then(res => {
// console.log(res);
2024-08-05 16:43:08 +08:00
var PLAYURL = res.data.data.videoUrl
self.player.play(PLAYURL, true, "");
}).catch(function (error) {
console.log(error)
})
} catch (error) {
console.log(error);
}
$("html>head>title").html(title);
}
</script>
</body>
</html>