需求:在瀏覽器加載完畢后,自動播放視頻:出現play() failed because the user didn't interact with the document first.錯誤


解決方法:給video標簽加入<video muted></video> 靜音即可。

Chrome 66為了避免標簽產生隨機噪音。

 

參考鏈接:https://juejin.im/post/5af7129bf265da0b8262df4c


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM