为了账号安全,请及时绑定邮箱和手机立即绑定

DOMException: play() failed because the user didn't interact with the document first

DOMException: play() failed because the user didn't interact with the document first

木木祭曦 2019-01-12 16:47:43
用C# cefsharp 写了个chrome内核的壳。打开了自己写的页面,页面上没有其他功能,只有一个音频<audio>,无法自动播放。没有办法进入chrome://flags/#autoplay-policy(chrome://about/等地址也是一样),用壳打开会自动转到chrome://version/。有没有办法直接用代码设置不需要用户交互就可以自动播放?
查看完整描述

1 回答

?
pardon110

TA贡献1038条经验 获得超227个赞

代码模拟交互操作动作即可

查看完整回答
反对 回复 2019-01-12
  • 木木祭曦
    木木祭曦
    一样的,模拟过了,audio.play();还是报需要用户交互。
  • 1 回答
  • 0 关注
  • 5787 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信