Sunday, November 9, 2008

Adding a MP3 Player to your Blog

With Google Gadget, you can easily add a MP3 Player to your blog. I have added one at the bottom of the right sidebar in this blog Recreation and Sport. All I have to do is to go to Google Gadget, choose "MP3 Player", click "Add to your webpage" and will be taken to the page Add this gadget to your webpage. You can set, title, the height and width of the MP3 Player. A default URL of a song is already added for you. If you have your own song hosted somewhere, all you have to do is to replace the URL of the default song with the URL of your own song.

In the case of the above blog, a check of the template revealed this:

.sidebar {
float:left;
border-top: solid 1px #fff;
padding: 4px 0 0 7px;
background: #fff;
width: 260px;

That is, the width of the sidebar is 260 pixels. I thus set the width of the MP3 Player to 255I then click "Get the Code", copy the code generated, go to the template Layout, click "Add a Page Element" in the right sidebar section, choose HTML/Javascrip in the pop-up, pasted the code into the window and saved, then drag the new Page Element to the bottom of the right sidebar section.

To play the music, all one has to do is to click on the pink button.