Play YouTube playlist automatically

2020-07-30 02:04发布

问题:

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