Play YouTube playlist automatically

寵の児 提交于 2019-12-22 01:16:39

问题


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>

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

?autoplay=1&cc_load_policy=1

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.

Update after 2 years

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


回答1:


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

?autoplay=1

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.

http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/autoplay-wont-work/69ac674b-ef1b-491d-9be2-f7a1d675956c



来源:https://stackoverflow.com/questions/37861916/play-youtube-playlist-automatically

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