From db929e5da9af5103345daf6cb41243f01fb456a9 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Mon, 1 Aug 2022 09:32:39 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=9C=AA=E8=8E=B7=E5=8F=96=E5=88=B0zlm=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=97=B6=E5=8F=91=E9=80=81=E9=94=99=E8=AF=AF=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_src/src/components/control.vue | 102 ++++++++++++++++------------- 1 file changed, 58 insertions(+), 44 deletions(-) diff --git a/web_src/src/components/control.vue b/web_src/src/components/control.vue index 507cc0da..e0bbc13d 100644 --- a/web_src/src/components/control.vue +++ b/web_src/src/components/control.vue @@ -324,7 +324,7 @@ export default { */ getThreadsLoad: function () { let that = this; - if (that.mediaServerChoose != null) { + if (!!that.mediaServerChoose) { this.$axios({ method: 'get', url: '/zlm/' + that.mediaServerChoose + '/index/api/getThreadsLoad' @@ -375,7 +375,7 @@ export default { }, getLoadCount: function () { let that = this; - if (that.mediaServerChoose != null) { + if (!!that.mediaServerChoose) { that.mediaServer.getMediaServer(that.mediaServerChoose, (data) => { if (data.code == 0) { that.loadCount = data.data.count @@ -473,42 +473,46 @@ export default { }, getAllSession: function () { - let that = this; - that.allSessionData = []; - this.$axios({ - method: 'get', - url: '/zlm/' + that.mediaServerChoose + '/index/api/getAllSession' - }).then(function (res) { - res.data.data.forEach(item => { - let data = { - peer_ip: item.peer_ip, - local_ip: item.local_ip, - typeid: item.typeid, - id: item.id - }; - that.allSessionData.push(data); + this.allSessionData = []; + if (!!this.mediaServerChoose) { + this.$axios({ + method: 'get', + url: '/zlm/' + this.mediaServerChoose + '/index/api/getAllSession' + }).then((res)=> { + res.data.data.forEach(item => { + let data = { + peer_ip: item.peer_ip, + local_ip: item.local_ip, + typeid: item.typeid, + id: item.id + }; + this.allSessionData.push(data); + }); }); - }); + } + }, getServerConfig: function () { - let that = this; - this.$axios({ - method: 'get', - url: '/zlm/' + that.mediaServerChoose + '/index/api/getServerConfig' - }).then(function (res) { - let info = res.data.data[0]; - let serverInfo = {} - for (let i = 0; i < Object.keys(info).length; i++) { - let key = Object.keys(info)[i]; - let group = key.substring(0, key.indexOf(".")) - let itemKey = key.substring(key.indexOf(".") + 1) - if (!serverInfo[group]) serverInfo[group] = {} - serverInfo[group][itemKey] = info[key] - } + if (!!this.mediaServerChoose) { + this.$axios({ + method: 'get', + url: '/zlm/' + that.mediaServerChoose + '/index/api/getServerConfig' + }).then((res)=> { + let info = res.data.data[0]; + let serverInfo = {} + for (let i = 0; i < Object.keys(info).length; i++) { + let key = Object.keys(info)[i]; + let group = key.substring(0, key.indexOf(".")) + let itemKey = key.substring(key.indexOf(".") + 1) + if (!serverInfo[group]) serverInfo[group] = {} + serverInfo[group][itemKey] = info[key] + } + + this.serverConfig = serverInfo; + this.visible = true; + }); + } - that.serverConfig = serverInfo; - that.visible = true; - }); }, getWVPServerConfig: function () { let that = this; @@ -531,6 +535,14 @@ export default { }, reStartServer: function () { let that = this; + if (!!!this.mediaServerChoose) { + this.$message({ + type: 'info', + message: '未选择节点' + }); + return; + } + this.$confirm('此操作将重启媒体服务器, 是否继续?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -571,17 +583,19 @@ export default { console.log(JSON.stringify(tabledata[index])); }, deleteSession: function (id) { - let that = this; - this.$axios({ - method: 'get', - url: '/zlm/' + that.mediaServerChoose + '/index/api/kick_session?id=' + id - }).then(function (res) { - that.getAllSession(); - that.$message({ - type: 'success', - message: '删除成功!' + if (!!this.mediaServerChoose) { + this.$axios({ + method: 'get', + url: '/zlm/' + this.mediaServerChoose + '/index/api/kick_session?id=' + id + }).then((res)=>{ + this.getAllSession(); + this.$message({ + type: 'success', + message: '删除成功!' + }); }); - }); + } + }, getNameFromKey: function (key) { let nameData = { From 0d2d73117e48d7611a4f87918533ec0ed5264173 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Mon, 1 Aug 2022 14:33:51 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E7=82=B9=E5=87=BB=E9=9F=B3=E9=87=8F=E6=8A=A5?= =?UTF-8?q?=E9=94=99=20#557=EF=BC=8C=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=A7=A3?= =?UTF-8?q?=E7=A0=81=E4=BF=A1=E6=81=AF=E8=8E=B7=E5=8F=96=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_src/src/components/common/jessibuca.vue | 14 ++++++++++++-- web_src/src/components/dialog/devicePlayer.vue | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/web_src/src/components/common/jessibuca.vue b/web_src/src/components/common/jessibuca.vue index 7ab0b930..4049721c 100644 --- a/web_src/src/components/common/jessibuca.vue +++ b/web_src/src/components/common/jessibuca.vue @@ -5,8 +5,8 @@ - - + +
{{ kBps }} kb/s @@ -243,6 +243,16 @@ export default { this.err = ""; this.performance = ""; }, + mute: function () { + if (jessibucaPlayer[this._uid]) { + jessibucaPlayer[this._uid].mute(); + } + }, + cancelMute: function () { + if (jessibucaPlayer[this._uid]) { + jessibucaPlayer[this._uid].cancelMute(); + } + }, destroy: function () { if (jessibucaPlayer[this._uid]) { jessibucaPlayer[this._uid].destroy(); diff --git a/web_src/src/components/dialog/devicePlayer.vue b/web_src/src/components/dialog/devicePlayer.vue index 9c254c9b..6d736161 100644 --- a/web_src/src/components/dialog/devicePlayer.vue +++ b/web_src/src/components/dialog/devicePlayer.vue @@ -374,7 +374,7 @@ export default { url: '/zlm/' +this.mediaServerId+ '/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtmp&app='+ this.app +'&stream='+ this.streamId }).then(function (res) { that.tracksLoading = false; - if (res.data.code == 0 && res.data.online) { + if (res.data.code == 0 && res.data.tracks) { that.tracks = res.data.tracks; }else{ that.tracksNotLoaded = true; From cbab9c9be17feb24cef069c84d2ba3f912d64d7c Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Tue, 2 Aug 2022 11:34:56 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E6=B7=BB=E5=8A=A0=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java | 2 +- .../iot/vmp/storager/impl/VideoManagerStorageImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java index ae16379f..f0baf9e9 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java @@ -47,7 +47,7 @@ public interface PlatformCatalogMapper { PlatformCatalog selectDefaultByPlatFormId(String platformId); - @Select("SELECT pc.* FROM platform_catalog pc WHERE pc.id = #{id}") + @Select("SELECT pc.* FROM platform_catalog pc WHERE pc.id = #{id}") PlatformCatalog selectParentCatalog(String id); @Select("SELECT pc.id as channelId, pc.name, pc.civilCode, pc.businessGroupId,'1' as parental, pc.parentId " + diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java index 6cdd1082..82f09479 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java @@ -708,7 +708,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { platformCatalog.setParentId(platform.getDeviceGBId()); }else { // 获取顶层的 - PlatformCatalog topCatalog = getTopCatalog(platformCatalog.getParentId(), platformCatalog.getPlatformId()); + PlatformCatalog topCatalog = getTopCatalog(platformCatalog.getParentId(), platform.getDeviceGBId()); platformCatalog.setBusinessGroupId(topCatalog.getId()); } }