一、audio.1.html:39 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. Audio 标签的 autoplay ...
最近在开发一个网站时,有个需要是 如果有新预警信息要在网页中播放提示音。页面打开会请求是否有新信息,有则播放提示音。在Chrome的最新浏览器中,播放会报错,控制台显示Uncaught in promise DOMException: play failed because the user didn t interact with the document first.搜索发现Chrome 为了 ...
2018-12-03 11:37 0 6915 推荐指数:
一、audio.1.html:39 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. Audio 标签的 autoplay ...
(in promise) DOMException: play() failed because the user did ...
Chrome的autoplay政策在2018年4月做了更改。新的行为:浏览器为了提高用户体验,减少数据消耗,现在都在遵循autoplay政策,Chrome的autoplay 政策非常简单 muted ...
//加上静音属性也播放不了 <audio ref="audio" preload="auto" a ...
解决方法:给video标签加入<video muted></video> 静音即可。 Chrome 66为了避免标签产生随机噪音。 参考链接:https://juej ...
错误原因:Chrome的autoplay政策在2018年4月做了更改。 解决办法: 第一步,在chrome浏览器中输入:chrome://flags/#autoplay-policy 第二步,在Autoplay policy中将Default改为No user gesture ...
问题: Uncaught (in promise) DOMException: Failed to load because no supported source was found.出现上边的错误一方面是从后台获取到的video的字节数是0,是一个空的音频 判断音频是否可以下载,在播放器 ...