video播放Uncaught (in promise) AbortError: The play() request was interrupted by a call to pause()
1.控制台报错: Uncaught (in promise) AbortError: The play() request was interrupted by a call to pause()执行了play()方法以后立即执行了pause()方法,所以你让video暂停150毫秒之后再播放就不会报错了if(video.paused || video.ended){setTimeout(() =
·
1.控制台报错: Uncaught (in promise) AbortError: The play() request was interrupted by a call to pause()
执行了play()方法以后立即执行了pause()方法,所以你让video暂停150毫秒之后再播放就不会报错了
if(video.paused || video.ended){
setTimeout(() => {
video.play();
}, 200)
}else{
video.pause();
}
更多推荐
所有评论(0)