From b8598019220af92927fd34b25261b4d3553edd03 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期四, 05 二月 2026 11:02:43 +0800
Subject: [PATCH] 修改session时间

---
 fzzy-igdss-web/src/main/resources/static/inout/video-play.js |   73 ++++++++++++++++++++++--------------
 1 files changed, 45 insertions(+), 28 deletions(-)

diff --git a/fzzy-igdss-web/src/main/resources/static/inout/video-play.js b/fzzy-igdss-web/src/main/resources/static/inout/video-play.js
index 3a37c09..760f987 100644
--- a/fzzy-igdss-web/src/main/resources/static/inout/video-play.js
+++ b/fzzy-igdss-web/src/main/resources/static/inout/video-play.js
@@ -7,6 +7,7 @@
 let mediaStream2;
 let webrtc3;
 let mediaStream3;
+
 /**
  * 椤甸潰鏈�澶氬悓鏃惰皟鐢ㄤ笁涓棰戯紝涓�涓溅鐗岃瘑鍒紝鎶撴媿锛屼笁涓『搴忔墽琛�
  * @param lprParam 杞︾墝璇嗗埆鍙傛暟
@@ -15,11 +16,23 @@
  */
 function initVideo(snapParam1, snapParam2, snapPram3) {
 
+    if (!gatewaySer) {
+        layer.msg("鏈幏鍙栧埌搴撳尯缃戝叧淇℃伅锛岃棰戞挱鏀惧け璐ワ紒");
+        initVideo2(snapParam2, snapPram3);
+        return;
+    }
     //杞︾墝璇嗗埆鎾斁
     if (snapParam1) {
+        var url = "";
+        if (PlayType.PLAY_TYPE_WEB_RTC == snapParam1.playType) {
+            url = "http://" + gatewaySer.ip + ":" + gatewaySer.apiPort + gatewaySer.playUrl;
+        }
+        if (PlayType.PLAY_TYPE_YD_QLY == snapParam1.playType) {
+            url = "/basic/inout/get-media";
+        }
         $.ajax({
             type: "POST",
-            url: "../../inout/api/inout-video-play",
+            url: url,
             dataType: "json",
             contentType: "application/json;charset=UTF-8",
             data: JSON.stringify(snapParam1),
@@ -44,10 +57,22 @@
 }
 
 function initVideo2(snapParam2, snapParam3) {
+    if (!gatewaySer) {
+        layer.msg("鏈幏鍙栧埌搴撳尯缃戝叧淇℃伅锛岃棰戞挱鏀惧け璐ワ紒");
+        initVideo3(snapParam3)
+        return;
+    }
     if (snapParam2) {
+        var url = "";
+        if (PlayType.PLAY_TYPE_WEB_RTC == snapParam2.playType) {
+            url = "http://" + gatewaySer.ip + ":" + gatewaySer.apiPort + gatewaySer.playUrl;
+        }
+        if (PlayType.PLAY_TYPE_YD_QLY == snapParam2.playType) {
+            url = "/basic/inout/get-media";
+        }
         $.ajax({
             type: "POST",
-            url: "../../inout/api/inout-video-play",
+            url: url,
             dataType: "json",
             contentType: "application/json;charset=UTF-8",
             data: JSON.stringify(snapParam2),
@@ -72,10 +97,21 @@
 }
 
 function initVideo3(snapParam3) {
+    if (!gatewaySer) {
+        layer.msg("鏈幏鍙栧埌搴撳尯缃戝叧淇℃伅锛岃棰戞挱鏀惧け璐ワ紒");
+        return;
+    }
     if (!snapParam3) return;
+    var url = "";
+    if (PlayType.PLAY_TYPE_WEB_RTC == snapParam3.playType) {
+        url = "http://" + gatewaySer.ip + ":" + gatewaySer.apiPort + gatewaySer.playUrl;
+    }
+    if (PlayType.PLAY_TYPE_YD_QLY == snapParam3.playType) {
+        url = "/basic/inout/get-media";
+    }
     $.ajax({
         type: "POST",
-        url: "../../inout/api/inout-video-play",
+        url: url,
         dataType: "json",
         contentType: "application/json;charset=UTF-8",
         data: JSON.stringify(snapParam3),
@@ -100,35 +136,16 @@
  */
 function initSnapVideo(data, order) {
     var htm = "";
-    //娴峰悍web4.0鎾斁
-    if (PlayType.HIK_WEB4 == data.playType) {
-        var url = "../../inout/api/iframe-hik?id=" + data.id;
-        if (ship && ship == "ship") { //鑸硅繍绉伴噸椤甸潰
-            url += "&length=340&width=195";
-        } else { //绉伴噸椤甸潰
-            url += "&length=310&width=170";
-        }
-        htm = '<iframe src=' + url + ' style="width: 100%;height: 100%"></iframe>';
-    }
-    //VLC鎾斁
-    if (PlayType.VLC == data.playType) {
-        htm = "<object type='application/x-vlc-plugin' "
-            + "events='true' width='100%' height='100%'"
-            + "pluginspage='http://www.videolan.org'"
-            + "th:codebase='@{../../static/plugins/vlc/npapi-vlc-2.2.2.tar.xz}'>\n"
-            + "<param name='mrl' value='" + data.playUrl + "'/>\n"
-            + "<param name='volume' value='50'/>\n"
-            + "<param name='autoplay' value='true'/>\n"
-            + "<param name='loop' value='false'/>\n"
-            + "<param name='fullscreen' value='true'/>\n"
-            + "<param name='toolbar' value='false'/>\n" + "</object>";
-    }
+
     //web-rtc鎾斁鏂瑰紡
-    if (PlayType.PLAY_TYPE_WEB_RTC_DH == data.playType || PlayType.PLAY_TYPE_WEB_RTC_HIK == data.playType) {
+    if (PlayType.PLAY_TYPE_WEB_RTC == data.playType) {
         playUrl = data.playUrl;
         playNum = order;
         videoId = data.cameraId;
         htm = '<video class="video" id="video' + playNum + '" autoplay="" muted="" playsinline=""></video>';
+    }
+    if (PlayType.PLAY_TYPE_YD_QLY == data.playType) {
+        htm = '<iframe src="' + data.playUrl + '" width="100%" height="100%" frameborder="0" allowfullscreen></iframe>';
     }
 
     if (1 == order) {
@@ -140,7 +157,7 @@
     if (3 == order) {
         $("#kccz-r-video3").append(htm);
     }
-    if (PlayType.PLAY_TYPE_WEB_RTC_DH == data.playType || PlayType.PLAY_TYPE_WEB_RTC_HIK == data.playType) {
+    if (PlayType.PLAY_TYPE_WEB_RTC == data.playType) {
         if (1 == order) {
             webRtcToPlay1();
         }

--
Gitblit v1.9.3