2023年5月19日 修复关闭后错误的播放

This commit is contained in:
bai 2023-05-19 00:42:23 +08:00
parent eba3fdbf4b
commit 0943180460
2 changed files with 13 additions and 2 deletions

View File

@ -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>

View File

@ -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>