Chromium - “Failed because the user didn't interact with the document first” in chrome?

两盒软妹~` 提交于 2019-12-12 01:00:00

问题


Ok, autoplay on visit used to work on our site. However now, we are getting:

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

How come autoplay works on Youtube though? For instance on open video in new tab.

Using HLS.js it no longer work.

What is Youtube doing that we could do here?


回答1:


The latest version of chrome creates a per domain “score” if a user has interacted with media 20 times on a domain, it is allowed to auto play. If the interaction score is lower, it can't. Chrome has a post about this on the developer blog.



来源:https://stackoverflow.com/questions/51043187/chromium-failed-because-the-user-didnt-interact-with-the-document-first-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!