Uncaught (in promise) DOMException: The play() request was interrupted by a new load request.

原因是:video.play是一个promise,因此错误需要在结束以后catch

video.play().catch((err)=>{
    
    
	console.log(err)
})

然后再次调用play函数即可。如下:

const play = ()=>{
    
    
	video.play().catch((err)=>{
    
    
	console.log(err)
	play()
})
}

猜你喜欢

转载自blog.csdn.net/HGGshiwo/article/details/128649625