From cfa36565f54f4274e415af9899db2aedadbd7b76 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期三, 06 九月 2023 16:10:43 +0800
Subject: [PATCH] 设备健康详情
---
ard-work/src/main/resources/templates/test.html | 40 +++++++++++-----------------------------
1 files changed, 11 insertions(+), 29 deletions(-)
diff --git a/ard-work/src/main/resources/templates/test.html b/ard-work/src/main/resources/templates/test.html
index a55bf5e..25cbd19 100644
--- a/ard-work/src/main/resources/templates/test.html
+++ b/ard-work/src/main/resources/templates/test.html
@@ -13,20 +13,6 @@
margin-top: 10px;
}
</style>
- <!-- 瀵煎叆 ECMAScript 妯″潡 -->
- <script th:type="module" th:src="@{/js/WHEPClient.js}"></script>
- <!-- 鍐呰仈鑴氭湰鍧楋紝鍙互浣跨敤妯″潡涓殑鍐呭 -->
- <script th:inline="javascript">
- /*<![CDATA[*/
- // 鍦ㄨ繖閲屼娇鐢� WHEPClient 妯″潡涓殑鍐呭
- $("#play").click(function webrtcClient(){
- const url = "http://127.0.0.1:8889/165"; // add the webRTC URL from your live input here
- console.log(url)
- const videoElement = document.getElementById("remote-video");
- const client = new WHEPClient(url, videoElement);
- })
- /*]]>*/
- </script>
<body>
<div class="container">
<div class="row ">
@@ -141,15 +127,12 @@
<div class="row top-buffer">
<video id="video" muted autoplay loop controls style="width: 800px; height: 100%; object-fit: fill;"/>
</div>
- <div class="row top-buffer">
- <button id="play" type="button" class="btn btn-default" >鎾斁</button>
- <video id="remote-video" controls autoplay muted></video>
- </div>
</div>
</div>
</div>
-<script th:inline="javascript">
- var cameraId, opt,optOpen,optClose, token;
+<script th:inline="javascript" th:type="module">
+
+ var cameraId, opt, optOpen, optClose, token;
window.onload = function () {
$.ajax({
url: "../hik/list",
@@ -179,7 +162,6 @@
}
}
})
-
opt = {"username": "admin", "password": "admin123"};
$.ajax({
headers: {
@@ -479,8 +461,8 @@
var defogflag = true;
$("#Defogcfg").click(function () {
cameraId = $('#select option:selected').val();
- optOpen = {"cameraId": cameraId, "channelNum": 1, "enable": true};
- optClose = {"cameraId": cameraId, "channelNum": 1, "enable": false};
+ optOpen = {"cameraId": cameraId, "channelNum": 1, "enable": true};
+ optClose = {"cameraId": cameraId, "channelNum": 1, "enable": false};
if (defogflag) {
$(this).text("鍏抽棴閫忛浘");
defogflag = false;
@@ -521,8 +503,8 @@
var infrareflag = true;
$("#Infrarecfg").click(function () {
cameraId = $('#select option:selected').val();
- optOpen = {"cameraId": cameraId, "channelNum": 1, "enable": true};
- optClose = {"cameraId": cameraId, "channelNum": 1, "enable": false};
+ optOpen = {"cameraId": cameraId, "channelNum": 1, "enable": true};
+ optClose = {"cameraId": cameraId, "channelNum": 1, "enable": false};
if (infrareflag) {
$(this).text("鍏抽棴绾㈠");
infrareflag = false;
@@ -563,8 +545,8 @@
var focusModeflag = true;
$("#FocusMode").click(function () {
cameraId = $('#select option:selected').val();
- optOpen = {"cameraId": cameraId, "channelNum": 1, "enable": true};
- optClose = {"cameraId": cameraId, "channelNum": 1, "enable": false};
+ optOpen = {"cameraId": cameraId, "channelNum": 1, "enable": true};
+ optClose = {"cameraId": cameraId, "channelNum": 1, "enable": false};
if (focusModeflag) {
$(this).text("鑷姩鑱氱劍");
focusModeflag = false;
@@ -807,7 +789,8 @@
//棰勮娴峰悍鐩告満
function realViewHik(serverip, elem, username, password, ipaddr, port) {
- webRtcServer = new WebRtcStreamer(elem, "http://" + serverip + ":8000");
+ // webRtcServer = new WebRtcStreamer(elem, "http://" + serverip + ":8000");
+ webRtcServer = new WebRtcStreamer(elem, "http://192.168.1.227:9000");
let rtspUrl = "rtsp://" + username + ":" + password + "@" + ipaddr + ":" + port + "/ch1/main/av_stream";
let option = "rtptransport=tcp";
console.log("rtsp鍦板潃锛�" + rtspUrl);
@@ -846,6 +829,5 @@
webRtcServer.disconnect();
}
</script>
-
</body>
</html>
\ No newline at end of file
--
Gitblit v1.9.3