|
@@ -9,6 +9,7 @@ const _videoMap = new Map();
|
|
|
const _drctMap = new Map();
|
|
const _drctMap = new Map();
|
|
|
const _cameraUri = '/api/scrs/tb_sc_ixr_cmra_mngm';
|
|
const _cameraUri = '/api/scrs/tb_sc_ixr_cmra_mngm';
|
|
|
let lange = 0;
|
|
let lange = 0;
|
|
|
|
|
+const _iceServerMap = new Map();
|
|
|
|
|
|
|
|
const _tfvlSeries = [{
|
|
const _tfvlSeries = [{
|
|
|
data : [{
|
|
data : [{
|
|
@@ -233,9 +234,6 @@ function drawChart(id, type, xAxis, series, tooltip, name, unit){
|
|
|
},
|
|
},
|
|
|
tickInterval: 100,
|
|
tickInterval: 100,
|
|
|
},
|
|
},
|
|
|
- tooltip: {
|
|
|
|
|
- shared: true,
|
|
|
|
|
- },
|
|
|
|
|
legend: {
|
|
legend: {
|
|
|
layout: 'vertical',
|
|
layout: 'vertical',
|
|
|
align: 'right',
|
|
align: 'right',
|
|
@@ -271,6 +269,7 @@ function drawChart(id, type, xAxis, series, tooltip, name, unit){
|
|
|
enabled: false
|
|
enabled: false
|
|
|
},
|
|
},
|
|
|
tooltip: {
|
|
tooltip: {
|
|
|
|
|
+ shared: true,
|
|
|
formatter: function () {
|
|
formatter: function () {
|
|
|
return tooltip(this, name, unit);
|
|
return tooltip(this, name, unit);
|
|
|
}
|
|
}
|
|
@@ -303,6 +302,13 @@ function getTooltip(obj, name, unit){
|
|
|
* 필요 데이터 호출
|
|
* 필요 데이터 호출
|
|
|
*/
|
|
*/
|
|
|
function fetchBaseData() {
|
|
function fetchBaseData() {
|
|
|
|
|
+ getDataAsync('/api/database/strm_ice_svr',(rec)=>{
|
|
|
|
|
+ if (rec && rec.length) {
|
|
|
|
|
+ rec.forEach((obj)=>{
|
|
|
|
|
+ _iceServerMap.set(obj.svr_ip, obj);
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
getDataAsync(_codeUrl + '/DRCT', recvCdData);
|
|
getDataAsync(_codeUrl + '/DRCT', recvCdData);
|
|
|
getDataAsync(_ixrUri, recvListData);
|
|
getDataAsync(_ixrUri, recvListData);
|
|
|
}
|
|
}
|
|
@@ -346,11 +352,34 @@ function recvListData(jsonData){
|
|
|
* @param {*} data 교차로 데이터
|
|
* @param {*} data 교차로 데이터
|
|
|
*/
|
|
*/
|
|
|
function listDblClick(data){
|
|
function listDblClick(data){
|
|
|
|
|
+ const videoBox = $('.video-box');
|
|
|
if (data) {
|
|
if (data) {
|
|
|
$('.list-title').text(' - ' + data.desc);
|
|
$('.list-title').text(' - ' + data.desc);
|
|
|
- $('.video-box').empty();
|
|
|
|
|
- $('.video-box').append($('<video id="video" autoplay playsinline muted></video>'))
|
|
|
|
|
- webRtcConnector(data, $('.video-box'), 'video', false);
|
|
|
|
|
|
|
+ videoBox.empty();
|
|
|
|
|
+ videoBox.append($('<video id="video" autoplay playsinline muted></video>'))
|
|
|
|
|
+ // webRtcConnector(data, $('.video-box'), 'video', false);
|
|
|
|
|
+ const localIceInfo = _iceServerMap.get(data.rtc_svr_ip);
|
|
|
|
|
+ if (localIceInfo) {
|
|
|
|
|
+ const {svr_prot, svr_ip, svr_port, svr_pswd, svr_id} = localIceInfo;
|
|
|
|
|
+ const iceServer = svr_prot + ":" + svr_ip + ":" + svr_port;
|
|
|
|
|
+ const cctvInfo = {
|
|
|
|
|
+ ID : data.cmra_id,
|
|
|
|
|
+ NAME : data.istl_lctn,
|
|
|
|
|
+ local_ice_id : svr_id,
|
|
|
|
|
+ local_ice_pswd : svr_pswd,
|
|
|
|
|
+ local_ice_svr : iceServer,
|
|
|
|
|
+ rtc_id : data.rtc_id,
|
|
|
|
|
+ rtc_svr_ip : data.rtc_svr_ip,
|
|
|
|
|
+ rtc_svr_port : data. rtc_svr_port
|
|
|
|
|
+ }
|
|
|
|
|
+ const infoStr = encodeURIComponent(JSON.stringify(cctvInfo));
|
|
|
|
|
+ videoBox.empty();
|
|
|
|
|
+ videoBox.append($(`<div id="video" style="width:100%; height:100%;">
|
|
|
|
|
+ <iframe width="100%" height="100%" src="/application/op/99.common/video.html?info=${infoStr}"></iframe>
|
|
|
|
|
+ </div>`));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
let now = new Date();
|
|
let now = new Date();
|
|
|
let fromDt = getSendDate(now).substring(0,8) + '000000';
|
|
let fromDt = getSendDate(now).substring(0,8) + '000000';
|
|
|
let toDt = getSendDate(now).substring(0,8) + '235959';
|
|
let toDt = getSendDate(now).substring(0,8) + '235959';
|