Merge branch '648540858:wvp-28181-2.0' into wvp-28181-2.0

This commit is contained in:
mrjackwang 2022-08-02 15:32:15 +08:00 committed by GitHub
commit f93a0d599e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 73 additions and 49 deletions

View File

@ -47,7 +47,7 @@ public interface PlatformCatalogMapper {
PlatformCatalog selectDefaultByPlatFormId(String platformId); 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); PlatformCatalog selectParentCatalog(String id);
@Select("SELECT pc.id as channelId, pc.name, pc.civilCode, pc.businessGroupId,'1' as parental, pc.parentId " + @Select("SELECT pc.id as channelId, pc.name, pc.civilCode, pc.businessGroupId,'1' as parental, pc.parentId " +

View File

@ -708,7 +708,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
platformCatalog.setParentId(platform.getDeviceGBId()); platformCatalog.setParentId(platform.getDeviceGBId());
}else { }else {
// 获取顶层的 // 获取顶层的
PlatformCatalog topCatalog = getTopCatalog(platformCatalog.getParentId(), platformCatalog.getPlatformId()); PlatformCatalog topCatalog = getTopCatalog(platformCatalog.getParentId(), platform.getDeviceGBId());
platformCatalog.setBusinessGroupId(topCatalog.getId()); platformCatalog.setBusinessGroupId(topCatalog.getId());
} }
} }

View File

@ -5,8 +5,8 @@
<i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick"></i> <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 v-if="playing" class="iconfont icon-pause jessibuca-btn" @click="pause"></i>
<i class="iconfont icon-stop jessibuca-btn" @click="destroy"></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-high jessibuca-btn" @click="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-mute jessibuca-btn" @click="cancelMute()"></i>
</div> </div>
<div class="buttons-box-right"> <div class="buttons-box-right">
<span class="jessibuca-btn">{{ kBps }} kb/s</span> <span class="jessibuca-btn">{{ kBps }} kb/s</span>
@ -243,6 +243,16 @@ export default {
this.err = ""; this.err = "";
this.performance = ""; this.performance = "";
}, },
mute: function () {
if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].mute();
}
},
cancelMute: function () {
if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].cancelMute();
}
},
destroy: function () { destroy: function () {
if (jessibucaPlayer[this._uid]) { if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].destroy(); jessibucaPlayer[this._uid].destroy();

View File

@ -324,7 +324,7 @@ export default {
*/ */
getThreadsLoad: function () { getThreadsLoad: function () {
let that = this; let that = this;
if (that.mediaServerChoose != null) { if (!!that.mediaServerChoose) {
this.$axios({ this.$axios({
method: 'get', method: 'get',
url: '/zlm/' + that.mediaServerChoose + '/index/api/getThreadsLoad' url: '/zlm/' + that.mediaServerChoose + '/index/api/getThreadsLoad'
@ -375,7 +375,7 @@ export default {
}, },
getLoadCount: function () { getLoadCount: function () {
let that = this; let that = this;
if (that.mediaServerChoose != null) { if (!!that.mediaServerChoose) {
that.mediaServer.getMediaServer(that.mediaServerChoose, (data) => { that.mediaServer.getMediaServer(that.mediaServerChoose, (data) => {
if (data.code == 0) { if (data.code == 0) {
that.loadCount = data.data.count that.loadCount = data.data.count
@ -473,42 +473,46 @@ export default {
}, },
getAllSession: function () { getAllSession: function () {
let that = this; this.allSessionData = [];
that.allSessionData = []; if (!!this.mediaServerChoose) {
this.$axios({ this.$axios({
method: 'get', method: 'get',
url: '/zlm/' + that.mediaServerChoose + '/index/api/getAllSession' url: '/zlm/' + this.mediaServerChoose + '/index/api/getAllSession'
}).then(function (res) { }).then((res)=> {
res.data.data.forEach(item => { res.data.data.forEach(item => {
let data = { let data = {
peer_ip: item.peer_ip, peer_ip: item.peer_ip,
local_ip: item.local_ip, local_ip: item.local_ip,
typeid: item.typeid, typeid: item.typeid,
id: item.id id: item.id
}; };
that.allSessionData.push(data); this.allSessionData.push(data);
});
}); });
}); }
}, },
getServerConfig: function () { getServerConfig: function () {
let that = this; if (!!this.mediaServerChoose) {
this.$axios({ this.$axios({
method: 'get', method: 'get',
url: '/zlm/' + that.mediaServerChoose + '/index/api/getServerConfig' url: '/zlm/' + that.mediaServerChoose + '/index/api/getServerConfig'
}).then(function (res) { }).then((res)=> {
let info = res.data.data[0]; let info = res.data.data[0];
let serverInfo = {} let serverInfo = {}
for (let i = 0; i < Object.keys(info).length; i++) { for (let i = 0; i < Object.keys(info).length; i++) {
let key = Object.keys(info)[i]; let key = Object.keys(info)[i];
let group = key.substring(0, key.indexOf(".")) let group = key.substring(0, key.indexOf("."))
let itemKey = key.substring(key.indexOf(".") + 1) let itemKey = key.substring(key.indexOf(".") + 1)
if (!serverInfo[group]) serverInfo[group] = {} if (!serverInfo[group]) serverInfo[group] = {}
serverInfo[group][itemKey] = info[key] serverInfo[group][itemKey] = info[key]
} }
this.serverConfig = serverInfo;
this.visible = true;
});
}
that.serverConfig = serverInfo;
that.visible = true;
});
}, },
getWVPServerConfig: function () { getWVPServerConfig: function () {
let that = this; let that = this;
@ -531,6 +535,14 @@ export default {
}, },
reStartServer: function () { reStartServer: function () {
let that = this; let that = this;
if (!!!this.mediaServerChoose) {
this.$message({
type: 'info',
message: '未选择节点'
});
return;
}
this.$confirm('此操作将重启媒体服务器, 是否继续?', '提示', { this.$confirm('此操作将重启媒体服务器, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -571,17 +583,19 @@ export default {
console.log(JSON.stringify(tabledata[index])); console.log(JSON.stringify(tabledata[index]));
}, },
deleteSession: function (id) { deleteSession: function (id) {
let that = this; if (!!this.mediaServerChoose) {
this.$axios({ this.$axios({
method: 'get', method: 'get',
url: '/zlm/' + that.mediaServerChoose + '/index/api/kick_session?id=' + id url: '/zlm/' + this.mediaServerChoose + '/index/api/kick_session?id=' + id
}).then(function (res) { }).then((res)=>{
that.getAllSession(); this.getAllSession();
that.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
});
}); });
}); }
}, },
getNameFromKey: function (key) { getNameFromKey: function (key) {
let nameData = { let nameData = {

View File

@ -374,7 +374,7 @@ export default {
url: '/zlm/' +this.mediaServerId+ '/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtmp&app='+ this.app +'&stream='+ this.streamId url: '/zlm/' +this.mediaServerId+ '/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtmp&app='+ this.app +'&stream='+ this.streamId
}).then(function (res) { }).then(function (res) {
that.tracksLoading = false; that.tracksLoading = false;
if (res.data.code == 0 && res.data.online) { if (res.data.code == 0 && res.data.tracks) {
that.tracks = res.data.tracks; that.tracks = res.data.tracks;
}else{ }else{
that.tracksNotLoaded = true; that.tracksNotLoaded = true;