If you already embed YouTube videos on your website, you may want to know how to make the video automatically start playing when a visitor lands on your video page. Well, it’s actually pretty easy to do and I’m going to share this little trick with you. Basically, it’s as simple as adding the tag ?autoplay=1 to your video’s embed code. You’ll want to insert the tag right after the video id#. Take a look at the example below:
Default HTML Code for Embedded Video:
Code to Autoplay your Embeded YouTube Video:
Note that we added the autoplay tag immediately after the video ID# and before the closing quotation mark.
Also, keep in mind that if you have more than one command, for example, if you already have the command to not show related or suggested videos when your video is done playing which would be tag ?rel=0, you’ll need to use a & instead of a ? to add an additional command. In other words, the first command is preceded by a ? and each additional command is preceded by a &. So to add the autoplay code, you would use tag &autoplay=1. See the example below:
Code to Autoplay your YouTube video AND turn off related videos:
Pretty easy, right?