<iframe width="560" height="315" src="http://www.youtube.com/embed/Your_Video_Id" frameborder="0" allowfullscreen></iframe>
The <iframe> tag below would load a 560x315px player that would play the YouTube video. Since the URL sets the autoplay parameter to 1, the video would play automatically once the player has loaded. <iframe width="560" height="315" src="http://www.youtube.com/embed/Your_Video_Id?autoplay=1" frameborder="0" allowfullscreen></iframe>
If you want to loop YouTube video, set the loop parameter value to 1 and set the playlist parameter value to the same video ID in the embed URL, Here is the example of iframe version: <iframe src="http://www.youtube.com/embed/Your_Video_Id?autoplay=1&loop=1&playlist=VIDEO_ID" width="560" height="315" frameborder="0" allowfullscreen></iframe>
References:https://developers.google.com/youtube/player_parameters#Manual_IFrame_Embeds
https://developers.google.com/youtube/player_parameters#loop
0 comments:
Post a Comment