自动播放YouTube播放列表 [英] Play YouTube playlist automatically

查看:261
本文介绍了自动播放YouTube播放列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此处的代码用于自动获取iframe中的最新视频.它会返回一个播放列表,其中以最近的视频作为第一视频.

The code under here is to get automatic the most recent video in the iframe. It returns a playlist with the most recent video as the first video.

<iframe play src="http://www.youtube.com/embed/?listType=user_uploads&list=UnboxTherapy"& width="2000" height="1160"></iframe>

现在,我想让第一个视频自动播放.自动播放YouTube视频的代码:

Now I want to let the first video play automatically. The code to play a YouTube video automatically:

?autoplay=1&cc_load_policy=1

如果将2结合起来,就会得到:

If you combine the 2 you get this:

<iframe play src="http://www.youtube.com/embed/?listType=user_uploads&list=UnboxTherapy?autoplay=1&cc_load_policy=1& width="2000" height="1160"></iframe>

当您将上面的代码放置在网站上时,视频将加载并正常工作,但是自动播放功能不起作用.它不会自动播放.

When you place the code above on your website the video will load and work properly, but the automatic play function doesn't work. It won't play automatic.

2年后更新

现在,在问了这个问题2年后,仍然没有答案.我认为这是不可能的.也许将来...

Now 2 years later after asking this question there is still no answer. I think it is not possible. Maybe in the future...

推荐答案

根据网络资源,使视频在页面加载时自动播放,您只需添加

According to web resources to make a video automatically play on page load, you simply have to add

?autoplay = 1

?autoplay=1

在网址末尾,这对我有用.但是,假设您尝试过此操作,我倾向于认为您遇到权限错误,并且您的网络管理员或网络浏览器当前都在限制自动播放视频.如果您使用的是Windows 7,请随时查看此链接;否则,请查看类似的链接.

to the end of the url, this worked for me. But assuming you tried this, I'm inclined to think you are having a permissions error, and either your network admin or web browser is currently restricting auto playing videos. Please feel free to look at this link if you are using windows 7, or a similar link if not.

查看全文

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