You must have come across the Videos on any webpage that automatically starts play. This can be done by simply adding a simple code in the embedded video URL. But careful this may annoy your user if it’s not related for what user came on your webpage.
Here we are sharing a trick for YouTube Video. If you want to embed a Youtube video that will autoplay, then just follow the steps as given below. Let’s start the guide.
How to Embed YouTube Videos with Autoplay
To Embed YouTube videos with Autoplay, you have to add a code in the URL of the YouTube video. So, steps are pretty simple and straightforward, as explained below:-
Step 1: Open the official YouTube website in your browser and go to the video you want to embed and play it.
Step 2: Notice the ‘Share’ button right below the video name. Click on this button for multiple sharing options to appear.
Step 3: From this list, chose the ‘embed’ option. It is the first option in the list.
Doing this will open a new pop-up window containing the code to embed the video.
Step 4: Click on the ‘Copy’ button on the bottom right side of this window to copy the code.
Paste this copied code on a Notepad page.
Step 5: To add the autoplay feature to the video, this code needs to be edited. Add “?autoplay=1;” just after the video ID. The final code should look like this:
Paste this copied code in the HTML code in which you want to embed the auto-playing YouTube video. Update the code and save it. The video will now autoplay whenever the HTML page is opened.