How do you add a youtube video into a website?
Never mind got it all worked out and learned more about CSS and embedding videos then I wanted to know 😛
I think you managed to sort this out yourself but here are two additional tips for when your using video on your landing pages.
Say you want to embed this video:
Here is a before and after:
1) get the embed code
<iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/sMJutdAk6eg" frameborder="0" allowfullscreen></iframe>
2) add the autoplay option to the URL
<iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/sMJutdAk6eg?autoplay=1" frameborder="0" allowfullscreen></iframe>
Here are a bunch of other options you can add to remove titles, search, related videos, annotations etc etc.
Turn off Title & Ratings > &showinfo=0
Turn off Search > &showsearch=0
Turn off Related Videos > &rel=0
Turn off Annotations > &iv_load_policy=3
Force Closed Captions > &cc_load_policy=1
Turn on AutoPlay > &autoplay=1
Loop Playback > &loop=1
Remove Full Screen Option (not sure why you’d want to) > &fs=0
With all these options included the iframe embed code would be something like:
<iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/sMJutdAk6eg?autoplay=1&showinfo=0&showsearch=0&rel=0&iv_load_policy=3&cc _load_policy=1" frameborder="0" allowfullscreen></iframe>
Basically if you embed youtube on your landing pages remove as many distractions as you can.
Ultimately you can even use your own customized video player so that for example no ads are shows
Here is some detail about that (at the bottom of the page)
Is there an option to stop people from clicking through and going to the youtube site?
For me the iframe embed does not go to youtube on click. Try it out on http://30m.org/projects/youtube/
You’re quite right. It doesn’t!
Which bit of the code stopped that then?
i was wondering that myself. i think its the new embed code using iframes that stops it cause if you try the 1st video, which has all the url options removed, it still does not click througj.
The Article Published IN 02-14-2011 03:42 AM