Commit b6c97528aeff3a976faa2f9f80bd3fbf42aedfdd

Authored by 648540858
1 parent 07956b48

添加界面停止逻辑

web_src/src/components/dialog/devicePlayer.vue
@@ -851,6 +851,21 @@ export default { @@ -851,6 +851,21 @@ export default {
851 }else if (this.broadcastStatus === 1) { 851 }else if (this.broadcastStatus === 1) {
852 this.broadcastRtc.close() 852 this.broadcastRtc.close()
853 this.broadcastRtc = null; 853 this.broadcastRtc = null;
  854 + this.$axios({
  855 + method: 'get',
  856 + url: '/api/play/broadcast/stop/' + this.deviceId + '/' + this.channelId
  857 + }).then( (res)=> {
  858 + if (res.data.code == 0) {
  859 + let streamInfo = res.data.data.streamInfo;
  860 + this.startBroadcast(streamInfo.rtc)
  861 + }else {
  862 + this.$message({
  863 + showClose: true,
  864 + message: res.data.msg,
  865 + type: "error",
  866 + });
  867 + }
  868 + });
854 this.broadcastStatus = -1; 869 this.broadcastStatus = -1;
855 } 870 }
856 }, 871 },