添加界面停止逻辑

结构优化
648540858 2022-07-01 18:36:35 +08:00
parent 07956b48df
commit b6c97528ae
1 changed files with 15 additions and 0 deletions

View File

@ -851,6 +851,21 @@ export default {
}else if (this.broadcastStatus === 1) {
this.broadcastRtc.close()
this.broadcastRtc = null;
this.$axios({
method: 'get',
url: '/api/play/broadcast/stop/' + this.deviceId + '/' + this.channelId
}).then( (res)=> {
if (res.data.code == 0) {
let streamInfo = res.data.data.streamInfo;
this.startBroadcast(streamInfo.rtc)
}else {
this.$message({
showClose: true,
message: res.data.msg,
type: "error",
});
}
});
this.broadcastStatus = -1;
}
},