欢迎光临散文网 会员登陆 & 注册

html video 循环播放(连续播放)

2023-02-14 21:05 作者:_天天写代码_  | 我要投稿

这个是vue的写法,基本一致,添加两个监听器,在数据准备好的时候再调用play 这样就不会被浏览器卡住了

We fixed this problem by registering a loadeddata event listener on the video element that we were trying to play, then load()ing the video, and finally play()ing it inside the event handler:

const playVideo = (video) => {  video.addEventListener('loadeddata', () => {    video.play();  });  video.load();


html video 循环播放(连续播放)的评论 (共 条)

分享到微博请遵守国家法律