0

I used following code to embed YT video on my website together with autoplay and loop, everything is working smoothly, yet i found that it loop only once. So autoplay fire and then video fire once more and that's it - next i see only infinity loader. Any idea why its so and how can i make this an infinity loop? I'm basing on information found on https://developers.google.com/youtube/player_parameters?hl=en

<iframe width="1000px" height="560px" src="https://www.youtube.com/v/VIDEOID/?playlist=VIDEOID&controls=0&showinfo=0&loop=1&autoplay=1" frameborder="0"></iframe>

Thank you in advance.

Ganga
  • 787
  • 1
  • 9
  • 27

1 Answers1

0

From the IFrame Player API documentation, it is stated here that:

The loop parameter has limited support in the AS3 player and in IFrame embeds, which could load either the AS3 or HTML5 player. Currently, the loop parameter only works in the AS3 player when used in conjunction with the playlist parameter. To loop a single video, set the loop parameter value to 1 and set the playlist parameter value to the same video ID already specified in the Player API URL.

If you want to know how the different parameters of Embedded player works, you can check this link for it.

Also try to use this if it works on your case.

<iframe width="1000px" height="560px" src="https://www.youtube.com/embed/VIDEOID/?playlist=VIDEOID&controls=0&showinfo=0&loop=1&autoplay=1" frameborder="0"></iframe>

For more information, check this related SO question.

Community
  • 1
  • 1
KENdi
  • 7,576
  • 2
  • 16
  • 31