问题
I've an iframe which I use to embed the videos of a channel to an html page. This web page is used for digital signage so no one will be able to navigate. My problem is that the videos of the channel don't start automatically although I used &autoplay=1. Here is the code:
<iframe width="480" height="480" src="http://www.youtube.com/embed?listType=user_uploads&list=NBA&loop=1&autoplay=1&rel=0&showinfo=0&controls=0&autohide=1" frameborder="0" allowfullscreen></iframe>
Thanks.
回答1:
try this it will work,
mistake i noticed here, embed/video_id
was not found
<iframe width="480" height="480" src="http://www.youtube.com/embed/eF5fRl3BMTY?listType=user_uploads&list=NBA&loop=1&autoplay=1&rel=0&showinfo=0&controls=0&autohide=1" frameborder="0" allowfullscreen></iframe>
回答2:
It seems your video contains content from the NBA, and that it is restricted from playback or certain sites/applications.
I've tried another YouTube video with the same code and it worked. Perhaps try another video?
<iframe width="560" height="315" src="https://www.youtube.com/embed/1sDH1UBXI44?autoplay=1&listType=user_uploads&list=NBA&loop=1&rel=0&showinfo=0&controls=0&autohide=1" frameborder="0" allowfullscreen></iframe>
回答3:
<iframe width="560" height="315" src="https://www.youtube.com/embed/1sDH1UBXI44?autoplay=1&listType=user_uploads&list=NBA&loop=1&rel=0&showinfo=0&controls=0&autohide=1" frameborder="0" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/1sDH1UBXI44?autoplay=1&listType=user_uploads&list=NBA&loop=1&rel=0&showinfo=0&controls=0&autohide=1" frameborder="0" allowfullscreen></iframe>
来源:https://stackoverflow.com/questions/44329151/youtube-embed-videos-autoplay