diff --git a/src/views/kc/jiaoshi/index.vue b/src/views/kc/jiaoshi/index.vue index e6b6cc6..05804d3 100644 --- a/src/views/kc/jiaoshi/index.vue +++ b/src/views/kc/jiaoshi/index.vue @@ -70,7 +70,7 @@ - + diff --git a/src/views/kc/jiaoshi/showAllLive.vue b/src/views/kc/jiaoshi/showAllLive.vue index 4e0f4fe..c847d33 100644 --- a/src/views/kc/jiaoshi/showAllLive.vue +++ b/src/views/kc/jiaoshi/showAllLive.vue @@ -208,9 +208,20 @@ function bVideoClick(e:any){ buttonEl.dataset.url = src; } +//窗口关闭时停止播放 +function close(){ + let mainVideo:any = document.querySelector('#mainVideo'); + mainVideo?.player?.pause(); + + bVideoRefs.value.forEach(x => { + x?.player?.pause(); + }) +} + defineExpose({ // playLive, - init + init, + close })