首页

Chrome 66禁止声音自动播放之后 DOMException: play() failed because the user didn't interact with the document first.

kkcode
2023-06-26  阅读 453

Chrome报错提示最为友善,意思是说,用户还没有交互,不能调play。用户的交互包括哪些呢?包括用户触发的touchend, click, doubleclick或者是 keydown事件,在这些事件里面就能调play.

  1. https://juejin.cn/post/6844903605170864136
  2. https://www.cnblogs.com/lcidy/p/10039592.html
  3. https://www.cnblogs.com/tianma3798/p/13544692.html
  4. https://www.jianshu.com/p/16472f24e277
本文为作者原创文章,转载无需和我联系,但请注明转载链接。 【前端黑猫】
排序: 时间 投票

您的连接不是私密连接 chrome://net-internals/#hsts

2024-01-12 回复