铬-“由于用户未首先与文档进行交互而失败”。在铬? [英] Chromium - "Failed because the user didn't interact with the document first" in chrome?

查看:162
本文介绍了铬-“由于用户未首先与文档进行交互而失败”。在铬?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,访问时自动播放曾经在我们的网站上起作用。但是现在,我们得到了:

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


play()失败,因为用户没有首先与文档进行交互

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

自动播放如何在YouTube上起作用?例如,在新标签中的打开视频中。

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

使用HLS.js不再起作用。

Using HLS.js it no longer work.

Youtube在做什么?我们可以在这里吗?

What is Youtube doing that we could do here?

推荐答案

如果用户在域上与媒体进行了20次互动,则最新版本的chrome会为每个域创建得分,可以自动播放。如果互动得分较低,则不能。 Chrome在开发者博客上发布了与此相关的帖子。

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.

这篇关于铬-“由于用户未首先与文档进行交互而失败”。在铬?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆