How to Embed a YouTube Video with Autoplay and Sound Muted

This tutorial explains how you can embed a YouTube video that will automatically play when the web page is loaded but with muted audio by Embed code.

EMBED YOUTUBE PLAYER WITH AUTOPLAY AND SOUND MUTED

This is easy. Go the YouTube video page and note down the ID of the video from the URL. For instance, if the YouTube video link is http://youtube.com/watch?v=xyz-123, the video id is xyz-123. Once you have the ID, all you have to do is replace YOUR_VIDEO_ID in the following code with that string.

We should need to add two query string in embed video url for autoplay and mute.

&mute=1   For sound mute

&autoplay=1   For autoplay

 

1
<iframe src="https://www.youtube.com/embed/VIDEO_ID?rel=0&mute=1&amp;autoplay=1" frameborder="0" allowfullscreen=""></iframe>

Leave a Reply