Why YouTube Autoplay Video Does Not Work in Embed Code

Why YouTube Autoplay Video Does Not Work in Embed Code

Are you trying to add AutoPlay video Embed in your HTML page or within Slider of PHP site or WordPress site but it is not working?

Well, I am here to provide you the reason and solution for it.

youtube autoplay in embed code

Sponsored Links

After April 2018, Google has updated its policy to facilitate user. As the users complained for autoplay video and the sound or music within video were annoying for them. So, Google has restricted the auto play option in by default Embed code of video. So, if you get an Embed code and add that iframe within your page, then autoplay does not work.

You need to add ?autoplay=1&mute=1&enablejsapi=1 at the end of source (src) link of your youtube video. Following is example:

`<iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/WtOOnpX2ly0?autoplay=1&mute=1&enablejsapi=1” frameborder=”0″ allow=”accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture” allowfullscreen></iframe>

I have added the additional code in Red color. If you will add embed code by updating like this, your video will autoplay on the page where you will embed it.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.