问题描述
我已将此 iframe 代码附加到我的纯 html 页面.在这里,我想在页面加载时进行自动播放.我在 Firefox 中尝试过,它对我来说工作正常.当我加载 chrome 时,它没有自动播放.
I have attached this iframe code to my plain html page. here i want to make an auto play when the page is loaded. i tried in firefox its working fine for me . when i load in chrome its not getting the autoplay.
我的代码是 </iframe>
它适用于 Firefox 浏览器.但是当我加载到 chrome 浏览器时它不起作用.
its working fine for firefox browser . but when am loading to the chrome browser its not working.
有人可以帮我吗?
我必须做额外的参数吗?
any thing i have to make extra parameters?
谢谢.
推荐答案
chrome 开发团队禁用了自动播放功能,以避免因为自动视频播放而引起用户的不适.您可以通过以下步骤启用它:
The chrome developer team disabled the autoplay feature to avoid irritation among users because of the automatic video play. You can enable it by the following steps:
- 打开 Chrome 浏览器并输入:chrome://flags/#autoplay-policy
- 将自动播放政策"从默认"更改为没有用户手势需要"
- 按重新启动"
- 重启设备
从现在开始,您的应用中使用的 webview 组件中的自动播放功能再次起作用.
From now on autoplay works again in webview components used in your app.
这篇关于Youtube iframe src 自动播放在 Chrome 浏览器中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!