Making an embedded video automatically start playing when a client loads your web page is a surprisingly popular request, especially for landing pages that are meant to capture the visitors attention in as short of a time period as possible. Unfortunately YouTube doesn’t offer an autoplay option within their embed generator – however there is a parameter you can add to your YouTube URL to make your video autoplay.
Step 1: First off go ahead and get your embed code the way you normally would for your chosen video.
Step 2: Now we’re going to modify the embed code that YouTube gave us and add the parameter ?rel=0&autoplay=1
to the end of the URL for our video. Here is how that would look:
That’s all it takes. Simply by changing our embedded video’s URL from https://www.youtube.com/embed/zFOvAIN6mTc
to https://www.youtube.com/embed/zFOvAIN6mTc?rel=0&autoplay=1
our embedded YouTube video will autoplay.