From c25d369c352b959887999da035e019b840d0b75c Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期一, 05 一月 2026 15:03:43 +0800
Subject: [PATCH] 移动千里眼接口对接

---
 fzzy-igdss-web/src/main/resources/static/security/video-list-dept.js |   96 +++++++++++++++++++++++++++---------------------
 1 files changed, 54 insertions(+), 42 deletions(-)

diff --git a/fzzy-igdss-web/src/main/resources/static/security/video-list-dept.js b/fzzy-igdss-web/src/main/resources/static/security/video-list-dept.js
index 784ca79..7ca15fb 100644
--- a/fzzy-igdss-web/src/main/resources/static/security/video-list-dept.js
+++ b/fzzy-igdss-web/src/main/resources/static/security/video-list-dept.js
@@ -7,6 +7,8 @@
 var playCamera = null;
 var playList = {};
 
+var playTag = 1;  //榛樿鍐呯綉鎾斁
+
 var playUrl1 = null;
 var videoId1 = null;
 let webrtc1;
@@ -50,49 +52,9 @@
         table = layui.table;
     });
 
-    showDeptSelect();
-
     //鍒濆鍖栨覆鏌撴挱鏀惧垪琛�
     renderList();
 });
-
-
-/**
- * 寮瑰嚭鍒囨崲搴撳尯鍒楄〃
- */
-function showDeptSelect() {
-    if(showDeptList === "N"){
-        $("#deptList").css('display', 'none');
-    }
-    if(showDeptList === "Y"){
-        $("#deptList").css('display', 'block');
-    }
-}
-
-/**
- * 寮瑰嚭鍒囨崲搴撳尯鍒楄〃
- */
-function showDepotAreaSelect() {
-    layer.open({
-        type: 2,
-        title: '閫夋嫨搴撳尯',
-        area: ['400px', '650px'],
-        offset: ['50px', '170px'],
-        shade: 0,
-        content: "/com.fzzy.igds.SelectDept.d",
-        closeBtn: 1
-    });
-}
-
-/**
- *
- * @param id
- * @returns {boolean}
- */
-function onDeptAreaChange(id) {
-    window.location.href = "./security/video-dept?type=" + type + "&deptId=" + id;
-    return true;
-}
 
 /**
  * 娓叉煋鐩戞帶鍒楄〃
@@ -257,10 +219,60 @@
     }
 }
 
-
-
+/**
+ * 鍒ゆ柇鍐呯綉鎾斁杩樻槸澶栫綉鎾斁
+ */
 function startPlay() {
 
+    startPlay1();
+}
+
+/**
+ * 澶栫綉鎾斁
+ */
+function startPlay1() {
+
+    if(windowsNum > splitWin){
+        windowsNum = 1;
+    }
+    if (!playCamera) {
+        $("#f" + splitWin + "_d" + windowsNum).html("鏈幏鍙栧埌鎽勫儚澶存挱鏀句俊鎭紒锛�");
+    }
+
+    if (playCamera.playUrl) {
+
+        var divId = "#f" + splitWin + "_d" + windowsNum;
+        var html = '<video class="video" id="video' + splitWin + '_' + windowsNum+'" style="width:100%;height: 100%"  controls>';
+        $(divId).html(html);
+
+        if (flvjs.isSupported()) {
+            var videoElement = document.getElementById("video" + splitWin + '_' + windowsNum);
+            var flvPlayer = flvjs.createPlayer({
+                type: 'flv',
+                isLive: true,
+                cors: true,
+                url: playCamera.playUrl
+            });
+            flvPlayer.attachMediaElement(videoElement);
+            flvPlayer.load();
+            flvPlayer.play();
+        }
+
+        // var html = '<video class="video" id="video'+splitWin + "_" + windowsNum+'" autoplay playsinline="true" webkit-playsinline="true" crossorigin="anonymous"';
+        // html += 'crossorigin="anonymous" src="blob:'+playCamera.playUrl+'" style="display: none;"></video>';
+        // html += '<canvas width="100%" height="100%" style="height: 100%">';
+        // $("#f" + splitWin + "_d" + windowsNum).html(html);
+        curCamera = playList[windowsNum];
+    } else {
+        $("#f" + splitWin + "_d" + windowsNum).html("鏈幏鍙栧埌鎽勫儚澶�(" + playCamera.cameraName + ")鎾斁淇℃伅锛侊紒");
+    }
+}
+
+/**
+ * 鍐呯綉鎾斁
+ */
+function startPlay2() {
+
     if(windowsNum > splitWin){
         windowsNum = 1;
     }

--
Gitblit v1.9.3