Here are some problems I face when embedding YouTube videos on my website.

First, the user has to click on the “play” button for the video to play. People who are new to online video might not even know to how to do that.

autoplay youtube

Second, at the end of the video, the “related videos” pop up taking your visitor to other sites. In other words, off your site!

Related-Videos

So have you ever wanted your embedded YouTube video to automatically play (autoplay) when your page loads? How about turning off the “related video” feature at the end the video?

You’ve come to the right place. After much experimenting, here are all the YouTube embed code variations to get your video just the way you want it. Just replace the video URL with the video you want to embed:

Default YouTube Embed Code:
<object width=”425″ height=”355″><param name=”movie” value=”http://www.youtube.com/v/EBM854BTGL0&autoplay=1″></param><param name=”wmode” value=”transparent”></param><embed src=”http://www.youtube.com/v/EBM854BTGL0&rel=1&border=0″ type=”application/x-shockwave-flash” wmode=”transparent”width=”425″ height=”344″></embed></object>

Code to Autoplay a YouTube Movie:

<embed src=”http://www.youtube.com/v/EBM854BTGL0&autoplay=1″ type=”application/x-shockwave-flash” wmode=”transparent” width=”425″ height=”344″></embed>

Code to turn off RELATED MOVIES at the end of the movie
<embed src=”http://www.youtube.com/v/EBM854BTGL0&rel=0&border=0″ width=”425″ height=”344″ type=”application/x-shockwave-flash” wmode=”transparent”></embed>

Code to Autoplay YouTube Movie AND turn OFF related movies at the end of the movie:
<embed src=”http://www.youtube.com/v/EBM854BTGL0&autoplay=1&rel=0″ type=”application/x-shockwave-flash” wmode=”transparent” width=”425″ height=”344″></embed>

Want to see what it looks like? Click on the image below to see a live example of the codes in action.

Picture 4
Click on this link to get the codes and view the live example.

Enjoy.



Related Posts with Thumbnails

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , , ,

About the Author

Brian Wong is a serial entrepreneur, Internet marketer and social media marketing expert. Brian helps individuals to build and monetize their personal brand online.

12 Comments

Joe Shibata Corrigan

28. Sep, 2008

thanks mate. I was thinking about a solution yesterday!

Law of attraction strikes again…

Brian Wong

30. Sep, 2008

Glad to be of service. :)

Paul Loudon

03. Dec, 2008

Hi There,

my autoplay won’t work the added code: “&autoplay=1″ keeps being replaced by: “-50&autoplay=1″ when the page refreshes.

The entire thing is below (yes I want the the music from Conan to play automatically on the page) Thanks for any help:

Brian Wong

04. Dec, 2008

Hi Paul,

As you can see, the codes are working fine here: http://brianwong.com/blog/other/youtube-embed-codes.htm

Its very likely that you will need to edit the page in a better html editor that does not replace your code with different characters.

Vicky

03. Jan, 2009

COOLNESS!! Thanks, I’ve ALWAYS wanted to be able to do that.

Do you know HOW to turn the sound OFF in a flash video, by any chance?

I want to post some flash video animations I’ve created, that autoplay, in a group at my page, but its getting very annoying to have the sound playing on all of them, all at once.

Thanks so mmuch if, you know how to do that, and can let me know…

XOX Vicky

[...] YouTube Embed Code Options – Autoplay On or Off | Web 2.0 Marketing – [...]

shane anciso

19. Apr, 2009

Informative article Brian, just what I was needing, thanks!

-Shane Anciso of the Shane Network

Hardric Demsley

20. Apr, 2009

Thanks a bunch for sharing this! You’ve saved me a lot of time poking around on my own.

Regards, Hardric Demsley, Barely B Films

Jim Stiner

16. Jul, 2009

I was able to make autoplay work by replacing en=1 with rel&autoplay=1, but I could not understand what I need to do to turn off the thumbnails.

Do I copy the code you have displayed and paste inside the orginal embed or after the orginal embed?

Puzzeled in Kansas City.

Jim

Brian Wong

17. Jul, 2009

Hi Jim, Since I posted this article, YouTube has updated their embed code. You can now turn off the “related video” thumbnails directly from YouTube. Just click on the customize icon next to the embed code and turn off the related videos option. :)

valerie

18. Dec, 2009

I finally googled “youtube embed options” with a frustration mind and an aching heart today and happily this popped up #2. Thanks dude. Cured what ailed me in about 60 seconds. Yer made of WIN!

Brian Wong

18. Dec, 2009

Yer welcome Valerie! Glad to be of service! :)

Leave a reply