Monday, October 22, 2007

Embedding YouTube Video (not a discussion topic)

Some of you may be interested in embedding video (or other media) in your blog. There are a couple of ways to do this. The first is to use the built in video player in Blogger that you can find when you are using the customize blog option. This will pop the video up at the top of your blog when the user plays it. The problem is that this may not be what you want to do.

A second option is to use the embed code that YouTube gives you, which looks something like this:

<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/wuZc8B9AdFw&rel=1"></param><paramhttp://docs.google.com/Doc?id=dfwvb5mw_61gth58z# Publish name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/wuZc8B9AdFw&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>

It comes out looking like this:









Here's the problem with that, while it works well for the main blog (and you want to make sure you copy it into your blog entry in HTML mode), it does not work well in a sidebar where you need a smaller version. Here's another video (it's on the right hand bar as well), with the code modified--I cut all the dimensions in half. Note that you have to tweak the numbers in the <object> tag and in the <embed> tag. I also added an extra paragraph tag at the beginning to bump the video down a bit and a <center> tag so that the video sits in the center of the page.

<p></p><center><object width="212" height="177"><param value="http://www.youtube.com/v/2Uaw2CdjU3c&rel=1" name="movie"/><param value="transparent" name="wmode"/><embed width="212" src="http://www.youtube.com/v/2Uaw2CdjU3c&rel=1" wmode="transparent" height="177" type="application/x-shockwave-flash"></embed></object></center>











Handy isn't it? This also means that if you are putting your video podcasts on YouTube you can embed them directly into your blog.

Speaking of video, if you want to use images in Garageband, but are unsure how to do it, check out my podcast offering for this week. It's a bit simplistic, but should work. In an ideal world, I would have used a screen recorder, which I think is going to be included in Leopard, the new version of OSX due out shortly.

See you in class.

No comments: