How to Disable Autoplay in YouTube
When you embed a YouTube video on your website, users can watch it there or double-click it and view it on YouTube's site. If your YouTube video is set to play automatically, it will begin playing as soon as your site visitor reaches YouTube. Sometimes users do not want that to happen. If they are at work, for example, they may not want their computer to begin playing music because they double-click a link on your website. Prevent this from happening by making a small change to the HTML code that creates the embedded YouTube player.
Instructions
-
-
1
Open the HTML document that contains the YouTube player. The code will look similar to this example:
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/OdT9z-JdfJk&autoplay=1"></param><embed src="http://www.youtube.com/v/OdT9z-JdfjtJk&autoplay=1" type="application/x-shockwave-flash" width="425" height="350"></embed></object>
-
2
Locate "&autoplay=1" in the code block.
-
-
3
Hold down your left mouse button and drag the mouse pointer over that string to highlight it.
-
4
Right-click the string and select "Cut." Windows will remove that value from the HTML code.
-
5
Save the file and open it in your browser. Double-click the YouTube video. The browser will take you to the Youtube website and display the video. It will not begin playing because you disabled autostart.
-
1
Tips & Warnings
If the YouTube video does not play, verify that you cut the "&autoplay=1" parameter from the code correctly. If you accidentally cut other characters from the code block, the video will not play.
References
Resources
- Photo Credit Frau und Laptop image by Angelika Bentin from Fotolia.com