iframe tag autoplay 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: Iframe video autoplay

<iframe src="//www.youtube.com/embed/{{YOUTUBE-ID}}?autoplay=1&mute=1" name="youtube embed" allow="autoplay; encrypted-media" allowfullscreen></iframe>

Example 3: iframe youtube playlist not working html

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

Tags:

Html Example