Does anyone know how to make an embedded youtube video to play in loop?
I have tried the code generated from official youtube developer website but it does not work at all. It doesn’t replay after the video ends in both Firefox and Chrome. Here is the generated code that doesn’t work.
<object style="height: 390px; width: 640px">
<param name="movie" value="https://www.youtube.com/v/u1zgFlCw8Aw?version=3&feature=player_embedded&loop=1">
<param name="allowFullScreen" value="true">
<param name="allowScriptAccess" value="always">
<embed src="https://www.youtube.com/v/u1zgFlCw8Aw?version=3&feature=player_embedded&loop=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344">
</object>
I have tried to google it but there aren’t any good instruction.
Try taking a look here https://developers.google.com/youtube/player_parameters#loop
Taken from the link
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:
http://www.youtube.com/v/VIDEO_ID?version=3&loop=1&playlist=VIDEO_IDIt appears that you may be missing the playlist parameter needed in conjunction with the loop paramenter.
Demo link: http://jsfiddle.net/E3Euv/