|
@@ -251,7 +251,7 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
//关闭弹框
|
|
//关闭弹框
|
|
closeDialog(){
|
|
closeDialog(){
|
|
- this.destroyHls(this.hls_video2)
|
|
|
|
|
|
+ this.destroyHls()
|
|
},
|
|
},
|
|
handleChange(id,val){
|
|
handleChange(id,val){
|
|
this.selectVideoHc[id].label = this.list.find( item => item.url == val).label
|
|
this.selectVideoHc[id].label = this.list.find( item => item.url == val).label
|
|
@@ -455,37 +455,51 @@ export default {
|
|
},1000)
|
|
},1000)
|
|
},
|
|
},
|
|
//销毁hls 视频流
|
|
//销毁hls 视频流
|
|
- destroyHls(id) {
|
|
|
|
- if(id){
|
|
|
|
- if(this.hls_video2){
|
|
|
|
- for (let i = 0; i < this.hls_video2.length; i++) {
|
|
|
|
- var ref_video = this.hls_video2[i].ref;
|
|
|
|
- var hls_video = this.hls_video2[i].hls;
|
|
|
|
- if ((ref_video, this.$refs[ref_video][0] != undefined)) {
|
|
|
|
- this.$refs[ref_video][0].pause();
|
|
|
|
- hls_video.destroy();
|
|
|
|
- hls_video = null;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- if(this.hls_video){
|
|
|
|
- for (let i = 0; i < this.hls_video.length; i++) {
|
|
|
|
- var ref_video = this.hls_video[i].ref;
|
|
|
|
- var hls_video = this.hls_video[i].hls;
|
|
|
|
- if ((ref_video, this.$refs[ref_video][0] != undefined)) {
|
|
|
|
- this.$refs[ref_video][0].pause();
|
|
|
|
- hls_video.destroy();
|
|
|
|
- hls_video = null;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ destroyHls() {
|
|
|
|
+ if(this.hls2){
|
|
|
|
+ this.hls2.destroy();
|
|
|
|
+ this.hls2 = null;
|
|
|
|
+ }
|
|
|
|
+ if(this.hls_video[0].hls){
|
|
|
|
+ for(let i =0;i<6;i++){
|
|
|
|
+ this.hls_video[i].hls.destroy();
|
|
|
|
+ this.hls_video[i].hls = null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // if(id){
|
|
|
|
+ // if(this.hls_video2){
|
|
|
|
+ // for (let i = 0; i < this.hls_video2.length; i++) {
|
|
|
|
+ // var ref_video = this.hls_video2[i].ref;
|
|
|
|
+ // var hls_video = this.hls_video2[i].hls;
|
|
|
|
+ // if ((ref_video, this.$refs[ref_video][0] != undefined)) {
|
|
|
|
+ // this.$refs[ref_video][0].pause();
|
|
|
|
+ // hls_video.destroy();
|
|
|
|
+ // hls_video = null;
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }else{
|
|
|
|
+ // if(this.hls_video){
|
|
|
|
+ // for (let i = 0; i < this.hls_video.length; i++) {
|
|
|
|
+ // var ref_video = this.hls_video[i].ref;
|
|
|
|
+ // var hls_video = this.hls_video[i].hls;
|
|
|
|
+ // if ((ref_video, this.$refs[ref_video][0] != undefined)) {
|
|
|
|
+ // this.$refs[ref_video][0].pause();
|
|
|
|
+ // hls_video.destroy();
|
|
|
|
+ // hls_video = null;
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+
|
|
},
|
|
},
|
|
onSubmit() {
|
|
onSubmit() {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ destroyed(){
|
|
|
|
+ this.destroyHls()
|
|
|
|
+ }
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|