2023年5月19日 修复关闭后错误的播放
This commit is contained in:
parent
eba3fdbf4b
commit
0943180460
|
@ -70,7 +70,7 @@
|
|||
</a-table-column>
|
||||
</a-table>
|
||||
</div>
|
||||
<a-modal :visible="isShowAllLive" width="80%" style="top: 20px" title="直播" :ok-button-props="{ style: { display: 'none' } }" cancelText="关闭" @cancel="() => isShowAllLive = false">
|
||||
<a-modal :visible="isShowAllLive" width="80%" style="top: 20px" title="直播" :ok-button-props="{ style: { display: 'none' } }" cancelText="关闭" @cancel="() => (isShowAllLive = false,showAllLiveRef.close())">
|
||||
<showAllLive ref="showAllLiveRef" :currentItem="currentItem"/>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
|
|
@ -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
|
||||
})
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue