如何循环嵌入的 YouTube 视频?

How to loop an embeded YouTube video?

我要嵌入没有播放控件或视频标题的 YouTube 视频,但我希望它自动播放和循环播放。除了循环,一切正常。我究竟做错了什么?

<div class='embed-container'><iframe src="https://www.youtube.com/embed/Yo19ZhO7CAc?autoplay=1&loop=1&cc_load_policy=1rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe></div>

您应该在您的 src

添加播放列表=VIDEO_ID
<div class='embed-container'>
  <iframe 
      src="https://www.youtube.com/embed/Yo19ZhO7CAc?autoplay=1&loop=1&cc_load_policy=1rel=0&amp;controls=0&amp;showinfo=0&playlist=Yo19ZhO7CAc" 
      frameborder="0" 
      allowfullscreen>
  </iframe>
</div>