让嵌入式 YouTube 视频自动播放和循环播放

2022-01-19 00:00:00 youtube youtube-api html css

我正在尝试让基本的 Youtube 视频自动播放并自动循环嵌入页面,但我没有运气.

I am trying to get a basic Youtube video to auto play and auto loop embedded on a page, but I'm having no luck.

<div style="text-align: center; margin: auto"><object type="application/x-shockwave-flash" style="width:1120px; height:630px;" data="http://www.youtube.com/v/GRonxog5mbw?rel=0&amp;loop=1&amp;autoplay=1&amp;showsearch=0&amp;version=3&amp;showinfo=0&amp;modestbranding=1&amp;fs=1">
<param name="movie" value="http://www.youtube.com/v/GRonxog5mbw?rel=0&amp;loop=1&amp;autoplay=1&amp;showsearch=0&amp;version=3&amp;showinfo=0&amp;modestbranding=1&amp;fs=1" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always" />
</object></div>

推荐答案

YouTubes HTML5 嵌入代码:

YouTubes HTML5 embed code:

<iframe width="560" height="315" src="http://www.youtube.com/embed/GRonxog5mbw?autoplay=1&loop=1&playlist=GRonxog5mbw" frameborder="0" allowfullscreen></iframe>​

您可以在这里阅读:Link 查看 Internet Archive 项目的原始内容.

You can read about it here: Link View original content on the Internet Archive project.

相关文章