|
@@ -37,7 +37,7 @@
|
|
|
/>
|
|
|
</ag-grid-layout>
|
|
|
|
|
|
- <el-dialog title="试听" width="300" :visible="stream!==null" :before-close="streamingStop">
|
|
|
+ <el-dialog title="试听" width="300" :visible="stream!==null" :show-close="false">
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
{{auditionTotalMsg}}
|
|
@@ -55,7 +55,7 @@
|
|
|
<audio ref="audio" loop autoplay playsinline :srcObject.prop="stream" v-if="stream" style="width: 300px;height:100px;"></audio>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="streamingStop">停止</el-button>
|
|
|
+ <el-button type="primary" @click="streamingStop(true)">停止</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
@@ -394,7 +394,7 @@ export default {
|
|
|
if (this.stream === null) {
|
|
|
this.streamingStart(param.data.id)
|
|
|
} else {
|
|
|
- this.streamingStop()
|
|
|
+ this.streamingStop(true)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -451,6 +451,9 @@ export default {
|
|
|
if (_this.janus === null) {
|
|
|
_this.connect(this.rtcServer)
|
|
|
}
|
|
|
+ if (_this.websock === null) {
|
|
|
+ _this.initAuditionWebSocket()
|
|
|
+ }
|
|
|
}, 60000)
|
|
|
},
|
|
|
methods: {
|
|
@@ -742,6 +745,7 @@ export default {
|
|
|
},
|
|
|
websocketonerror: function(e) {
|
|
|
console.log(this.$t('deviceManage.webSocketError'))
|
|
|
+ this.websock = null
|
|
|
},
|
|
|
websocketonmessage: function(e) {
|
|
|
// this.scheduledIds = JSON.parse(e.data)
|
|
@@ -760,7 +764,7 @@ export default {
|
|
|
|
|
|
if (result.finished){
|
|
|
this.auditionTotalMsg = null
|
|
|
- this.streamingStop()
|
|
|
+ this.streamingStop(false)
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: '试听结束'
|
|
@@ -769,6 +773,7 @@ export default {
|
|
|
},
|
|
|
websocketclose: function(e) {
|
|
|
console.log('connection closed (' + e.code + ')')
|
|
|
+ this.websock = null
|
|
|
},
|
|
|
refreshPlayStatus() {
|
|
|
if (this.rowData !== null) {
|
|
@@ -969,11 +974,13 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- streamingStop() {
|
|
|
+ streamingStop(personClose) {
|
|
|
this.pluginHandle.send({ message: { request: "stop" } })
|
|
|
this.pluginHandle.hangup()
|
|
|
this.onCleanup()
|
|
|
- API_Broadcast.auditionStop()
|
|
|
+ if (personClose) {
|
|
|
+ API_Broadcast.auditionStop(this.$store.getters.uuid)
|
|
|
+ }
|
|
|
this.auditionMsg = null
|
|
|
},
|
|
|
onCleanup() {
|