Auto play & loop for Youtube embed code

Normal Youtube embed code looks like follow:

<iframe width="560" height="315" src="" frameborder="0" allowfullscreen></iframe>

The src of iframe is We need to modify this address as follow to make the embed code auto play & loop:

  • Replace embed by v
  • Add &autoplay=1 for auto play
  • Add &loop=1
  • Add &playlist=video_id

The new source will be