Przeglądaj źródła

2025-07-03 update video error (vms & cctv control page)

junggilpark 1 miesiąc temu
rodzic
commit
1a46b993b6

+ 0 - 1
src/main/resources/static/application/op/00.main/main-func.js

@@ -805,7 +805,6 @@ async function fetchFcltData() {
             //     //`${nowTime()} FcltData, CCTV(${values[0].length}), VMS(${values[1].length}), VDS(${values[2].length}),  PARK(${values[3].length}), BIT(${values[4].length})`
             //     `${nowTime()} FcltData, CCTV(${values[0].length}), VMS(${values[1].length}), VDS(${values[2].length})`
             // );
-
             _mapManager.makeLayer(LayerIndex.Cctv, values[0]);
             _mapManager.makeLayer(LayerIndex.Vms, values[1]);
             _mapManager.makeLayer(LayerIndex.Vds, values[2]);

+ 1 - 0
src/main/resources/static/application/op/00.main/main.js

@@ -148,6 +148,7 @@
                         break;
                 }
                 const cctvObj = _mapManager.findLayerObject(index, fcltNmbr);
+                console.log(cctvObj);
                 e.items = [{
                     text: "카메라영상",
                     onItemClick: function (e) {

+ 3 - 3
src/main/resources/static/application/op/04.cctv/05.control/control.html

@@ -4,9 +4,9 @@
     <meta charset="UTF-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <script src="/libs/include-common.js"></script>
-    <script src="/libs/include-web-rtc.js"></script>
-    <script src="./control.js"></script>
+    <script src="/libs/include-common.js?v=2025-07-03"></script>
+<!--    <script src="/libs/include-web-rtc.js"></script>-->
+    <script src="./control.js?v=2025-07-03"></script>
     <link rel="stylesheet" href="./control.css">
     <title>CCTV 제어</title>
 </head>

+ 24 - 15
src/main/resources/static/application/op/04.cctv/05.control/control.js

@@ -106,6 +106,14 @@ let ctrlBtnColumns = [
     },
 ]
 let _cctvServerUrl;
+const _iceServerMap = new Map();
+getDataAsync("/api/database/strm_ice_svr", (data)=>{
+    if (data && data.length) {
+        data.forEach((obj)=>{
+            _iceServerMap.set(obj.svr_ip, obj);
+        })
+    }
+});
 $(()=>{
     //모달 화면 설정
     $("body").append(modalDiv);
@@ -137,9 +145,6 @@ $(()=>{
             enabled: false,
             pageSize: 1000,
         },
-        selection : {
-            mode  : 'single',
-        },
         scrolling: {
             mode: 'standard',
         },
@@ -570,9 +575,6 @@ function getPresetDiv(){
             enabled: false,
             pageSize: 1000,
         },
-        selection : {
-            mode  : 'single',
-        },
         scrolling: {
             mode: 'standard',
         },
@@ -866,9 +868,6 @@ function getSubTitleDiv(){
         // headerFilter: {
         //     visible: true,
         // },
-        selection  : {
-            mode :'single'
-        },
         keyExpr : ['cctv_ctrl_id', 'sect_id'],
         paging: {
             enabled: false,
@@ -1202,7 +1201,6 @@ function fetchBaseData(){
     getData('/api/cctv/common/cctv-list', listData);
     getData('/api/cctv/monitoring/stts', sttsData);
     getData('/api/cctv/pset', presetData);
-
     if (listData[0].length > 0) {
         listData[0].map((item)=>{
             if (item.last_crct_dt) {
@@ -1275,12 +1273,23 @@ function listTableClick(info){
     _presetList.option('dataSource', data);
     const videoBox = $('.video-box');
     videoBox.css('background-color', 'black');
-    if (_selectedVideo){
-        $('#video').stop();
-        videoBox.empty();
-        videoBox.append($('<video id="video" class="mont-body" autoplay playsinline muted></video>'));
+    videoBox.empty()
+    const iceInfo = _iceServerMap.get(selectedData.web_rtc_svr_ip);
+    if (iceInfo) {
+        const {svr_ip, svr_prot, svr_port, svr_id, svr_pswd} = iceInfo
+        const obj = {
+            ID : selectedData.cctv_ctlr_id,
+            NAME : selectedData.istl_lctn_nm,
+            local_ice_svr : svr_prot + ":" + svr_ip + ":" + svr_port,
+            local_ice_id : svr_id,
+            local_ice_pswd : svr_pswd,
+            rtc_id : selectedData.rtc_id,
+            rtc_svr_ip : selectedData.rtc_svr_ip,
+            rtc_svr_port : selectedData.rtc_svr_port,
+        }
+        const objStr = encodeURIComponent(JSON.stringify(obj));
+        videoBox.html(`<iframe src="/application/op/99.common/video.html?info=${objStr}" width="100%" height="100%"></iframe>`);
     }
-    _selectedVideo = webRtcConnector(selectedData, videoBox, "video");
 
     _presetList.option('focusedRowIndex', -1);
     _presetList.clearSelection();

+ 1 - 1
src/main/resources/static/application/op/05.vms/01.system/02.control/control.html

@@ -5,7 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <script src="/libs/include-common.js"></script>
-    <script src="/libs/include-web-rtc.js"></script>
+    <script src="/libs/include-hive-rtc.js"></script>
     <script src="./control.js"></script>
     <link rel="stylesheet" href="./control.css">
     <title>VMS 제어</title>

+ 6 - 0
src/main/resources/static/application/op/08.dsrc/01.info/info.html

@@ -52,6 +52,12 @@
                             <div class="rse_ctlr_id"></div>
                         </div>
                     </div>
+                    <div>
+                        <div class="label">DSRC 명칭 (*)</div>
+                        <div>
+                            <div class="rse_nm"></div>
+                        </div>
+                    </div>
                     <div>
                         <div class="label">도로지점 ID (*)</div>
                         <div>

+ 10 - 0
src/main/resources/static/application/op/08.dsrc/01.info/info.js

@@ -45,6 +45,7 @@ let logCnncPw     = null;
 let clctAbnrBasi  = null;
 let mnfcCmpyCd    = null;
 let dsrcCtlrPort  = null;
+let rseNm         = null;
 
 //공통
 let commonUri        = '/api/rse/tb_rse_ctlr';
@@ -59,6 +60,15 @@ const inputArr = [
         label    : "ID",
         max      : 10,
     },
+    rseNm = {
+        box      : null,
+        option   : 230,
+        readOnly : false,
+        column   : "rse_nm",
+        must     : true,
+        label    : "명칭",
+        max      : 40,
+    },
     dsrcCtlrId = {
         box      : null,
         option   : 230,