From e3bdcdf9123bb69d77ce42dfcd255047c09edafc Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期日, 11 一月 2026 16:53:04 +0800
Subject: [PATCH] 出入库视频及车牌识别

---
 fzzy-igdss-web/src/main/resources/static/inout/video-play.js |   50 +++++++++++++++++++++++---------------------------
 1 files changed, 23 insertions(+), 27 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..42f96a1 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,17 @@
  */
 function initVideo(snapParam1, snapParam2, snapPram3) {
 
+    if (!gatewaySer) {
+        layer.msg("鏈幏鍙栧埌搴撳尯缃戝叧淇℃伅锛岃棰戞挱鏀惧け璐ワ紒");
+        initVideo2(snapParam2, snapPram3);
+        return;
+    }
+    var url = "http://" + gatewaySer.ip + ":" + gatewaySer.apiPort + gatewaySer.playUrl;
     //杞︾墝璇嗗埆鎾斁
     if (snapParam1) {
         $.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 +51,16 @@
 }
 
 function initVideo2(snapParam2, snapParam3) {
+    if (!gatewaySer) {
+        layer.msg("鏈幏鍙栧埌搴撳尯缃戝叧淇℃伅锛岃棰戞挱鏀惧け璐ワ紒");
+        initVideo3(snapParam3)
+        return;
+    }
+    var url = "http://" + gatewaySer.ip + ":" + gatewaySer.apiPort + gatewaySer.playUrl;
     if (snapParam2) {
         $.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 +85,15 @@
 }
 
 function initVideo3(snapParam3) {
+    if (!gatewaySer) {
+        layer.msg("鏈幏鍙栧埌搴撳尯缃戝叧淇℃伅锛岃棰戞挱鏀惧け璐ワ紒");
+        return;
+    }
     if (!snapParam3) return;
+    var url = "http://" + gatewaySer.ip + ":" + gatewaySer.apiPort + gatewaySer.playUrl;
     $.ajax({
         type: "POST",
-        url: "../../inout/api/inout-video-play",
+        url: url,
         dataType: "json",
         contentType: "application/json;charset=UTF-8",
         data: JSON.stringify(snapParam3),
@@ -100,31 +118,9 @@
  */
 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;

--
Gitblit v1.9.3