Youtube iframe src自动播放在Chrome浏览器中不起作用 [英] Youtube iframe src autoplay not working in chrome browser

查看:446
本文介绍了Youtube iframe src自动播放在Chrome浏览器中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将此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 width="420" height="345" src="https://www.youtube.com/embed/qsP3Y4hHyeM?autoplay=1"> </iframe>

my code is <iframe width="420" height="345" src="https://www.youtube.com/embed/qsP3Y4hHyeM?autoplay=1"> </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:

  1. 打开Chrome浏览器并输入:chrome://flags/#autoplay-policy
  2. 将自动播放策略"从默认"更改为没有用户手势 必填"
  3. 按重新启动"
  4. 重新启动设备
  1. Opening a Chrome browser and typing: chrome://flags/#autoplay-policy
  2. Changing the "Autoplay policy" from "Default" to "No user gesture is required"
  3. Pressing "relaunch"
  4. Rebooting the device

从现在开始,自动播放将再次在您应用中使用的Webview组件中起作用.

From now on autoplay works again in webview components used in your app.

这篇关于Youtube iframe src自动播放在Chrome浏览器中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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