RTSP更新

This commit is contained in:
威勝 張 2024-02-03 14:58:11 +08:00
parent ed051c1279
commit 9257599e62

View File

@ -9,6 +9,7 @@
#img_id { #img_id {
display: block; /* 使圖像為塊級元素,以便使用 margin:auto; */ display: block; /* 使圖像為塊級元素,以便使用 margin:auto; */
margin: auto; /* 將圖像置中 */ margin: auto; /* 將圖像置中 */
width:80%
} }
</style> </style>
<h1>即時影像</h1> <h1>即時影像</h1>
@ -50,8 +51,13 @@
<!--跳轉頁面-->
<script>
function Yuntech_RTSP() {
window.open("http://140.125.50.178:7006/", "_blank");
}
</script>
<!--獲取資料--> <!--獲取資料-->
<script> <script>
@ -123,7 +129,9 @@
IP_1 = IP IP_1 = IP
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: 'http://140.125.20.183:7705/IP/' + IP_1,
headers: { headers: {
'Authorization': token
}, },
success: function (response) { success: function (response) {
stop = false stop = false
@ -139,7 +147,9 @@
console.log(IP_1) console.log(IP_1)
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: 'http://140.125.20.183:7705/IP/' + IP_1,
headers: { headers: {
'Authorization':token
}, },
success: function (response) { success: function (response) {
//webcam_view.showModal() //webcam_view.showModal()
@ -160,6 +170,7 @@
//console.log(img) //console.log(img)
img = document.getElementById("img_id") img = document.getElementById("img_id")
img.src = img_base_64 img.src = img_base_64
//console.log(img_base_64)
if (stop == false){ if (stop == false){
setTimeout('CAM_RTSP_1()', 20); setTimeout('CAM_RTSP_1()', 20);
} }