youtube autoplay embed code example

Example 1: iframe autoplay

<!-- 
first add ?autoplay=1 to your video url
then add allow='autoplay' attribute to your iframe element
-->
<iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=1" allow='autoplay'></iframe>

Example 2: html5 iframe youtube loop

<iframe class="embed-responsive-item"id="ytplayer" type="text/html" width="640" height="360" src="https://www.youtube.com/embed/M7lc1UVf-VE?&autoplay=1&loop=1&rel=0&showinfo=0&color=white&iv_load_policy=3&playlist=M7lc1UVf-VE"
      frameborder="0" allowfullscreen></iframe>

Example 3: embedded youtube

<iframe id="ytplayer" type="text/html" width="640" height="360"
  src="http://www.youtube.com/embed/M7lc1UVf-VE?autoplay=1&origin=http://example.com"
  frameborder="0"/>

Example 4: iframe youtube playlist not working html

<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLQGSXoAiT2W4W8D3397nl4OB_GxfOmJk9" allowfullscreen></iframe>

Tags:

Misc Example