From f93a0d599e1619b46eb0bfcb7ceff74e10e4a3a1 Mon Sep 17 00:00:00 2001
From: mrjackwang <30337754+mrjackwang@users.noreply.github.com>
Date: 星期二, 02 八月 2022 15:32:15 +0800
Subject: [PATCH] Merge branch '648540858:wvp-28181-2.0' into wvp-28181-2.0
---
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java | 2
web_src/src/components/dialog/devicePlayer.vue | 2
web_src/src/components/common/jessibuca.vue | 14 ++++
web_src/src/components/control.vue | 102 +++++++++++++++++++--------------
src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java | 2
5 files changed, 73 insertions(+), 49 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 ae16379..f0baf9e 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 @@
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 6cdd108..82f0947 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 @@
platformCatalog.setParentId(platform.getDeviceGBId());
}else {
// 鑾峰彇椤跺眰鐨�
- PlatformCatalog topCatalog = getTopCatalog(platformCatalog.getParentId(), platformCatalog.getPlatformId());
+ PlatformCatalog topCatalog = getTopCatalog(platformCatalog.getParentId(), platform.getDeviceGBId());
platformCatalog.setBusinessGroupId(topCatalog.getId());
}
}
diff --git a/web_src/src/components/common/jessibuca.vue b/web_src/src/components/common/jessibuca.vue
index 7ab0b93..4049721 100644
--- a/web_src/src/components/common/jessibuca.vue
+++ b/web_src/src/components/common/jessibuca.vue
@@ -5,8 +5,8 @@
<i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick"></i>
<i v-if="playing" class="iconfont icon-pause jessibuca-btn" @click="pause"></i>
<i class="iconfont icon-stop jessibuca-btn" @click="destroy"></i>
- <i v-if="isNotMute" class="iconfont icon-audio-high jessibuca-btn" @click="jessibuca.mute()"></i>
- <i v-if="!isNotMute" class="iconfont icon-audio-mute jessibuca-btn" @click="jessibuca.cancelMute()"></i>
+ <i v-if="isNotMute" class="iconfont icon-audio-high jessibuca-btn" @click="mute()"></i>
+ <i v-if="!isNotMute" class="iconfont icon-audio-mute jessibuca-btn" @click="cancelMute()"></i>
</div>
<div class="buttons-box-right">
<span class="jessibuca-btn">{{ kBps }} kb/s</span>
@@ -243,6 +243,16 @@
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/control.vue b/web_src/src/components/control.vue
index 507cc0d..e0bbc13 100644
--- a/web_src/src/components/control.vue
+++ b/web_src/src/components/control.vue
@@ -324,7 +324,7 @@
*/
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 @@
},
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 @@
},
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]
+ }
- that.serverConfig = serverInfo;
- that.visible = true;
- });
+ this.serverConfig = serverInfo;
+ this.visible = true;
+ });
+ }
+
},
getWVPServerConfig: function () {
let that = this;
@@ -531,6 +535,14 @@
},
reStartServer: function () {
let that = this;
+ if (!!!this.mediaServerChoose) {
+ this.$message({
+ type: 'info',
+ message: '鏈�夋嫨鑺傜偣'
+ });
+ return;
+ }
+
this.$confirm('姝ゆ搷浣滃皢閲嶅惎濯掍綋鏈嶅姟鍣�, 鏄惁缁х画?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -571,17 +583,19 @@
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 = {
diff --git a/web_src/src/components/dialog/devicePlayer.vue b/web_src/src/components/dialog/devicePlayer.vue
index 9c254c9..6d73616 100644
--- a/web_src/src/components/dialog/devicePlayer.vue
+++ b/web_src/src/components/dialog/devicePlayer.vue
@@ -374,7 +374,7 @@
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;
--
Gitblit v1.8.0