5

I am embedding a YouTube video without playback controls, or video title, but I want it to autoplay and loop. Everything works except the loop. What am I doing wrong?

<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>
user1724434
  • 688
  • 4
  • 9
  • 24
  • Possible duplicate of [Getting an Embeded You Tube Video to Auto Play and Loop](http://stackoverflow.com/questions/13041088/getting-an-embeded-you-tube-video-to-auto-play-and-loop) – Tim Troiano Feb 05 '16 at 18:02
  • The solution on that question didn't work for me. – user1724434 Feb 05 '16 at 18:04

1 Answers1

9

You shoud add playlist=VIDEO_ID at your src

<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>
Mr. Nobody
  • 340
  • 3
  • 17