Youtube Embed videos autoplay

百般思念 提交于 2019-12-12 05:30:00

问题


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

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