audio在浏览器网页上无法自动播放解决方案

音频播放时出现 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the ...

解决方案:

Chorm76版本及以上更高版本音频播放设置

Chorm76版本以下音频播放设置

输入地址chrome://flags/#autoplay-policy

设置Autoplay policy为No user gesture is required。

改完记得刷新页面

 

猜你喜欢

转载自blog.csdn.net/qq_43574079/article/details/115896445