原文:需求:在浏览器加载完毕后,自动播放视频:出现play() failed because the user didn't interact with the document first.错误

解决方法:给video标签加入 lt video muted gt lt video gt 静音即可。 Chrome 为了避免标签产生随机噪音。 参考链接:https: juejin.im post af bf da b df c ...

2018-08-03 10:13 0 19509 推荐指数:

查看详情

浏览器无法自动播放视频

浏览器自动播放视频会报错:play() failed because the user didn't interact with the document first。 网上大部分资料是需要设置autoplay选项,但是我的谷歌浏览器版本是78 ; 设置改成如下 设置 ...

Tue Nov 12 19:10:00 CST 2019 0 435
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM