Saturday, January 9, 2010

How to add Music,MP3,Audio Player to your Blogger Blog


Adding a nice music track to your blog may enhance the pleasure of reading your blog or annoy your visitors depending on the kind of blog you have. For example, if you have a music blog, adding some nice song tracks to your blog sidebar can make your visitors to stay longer which benefits you.
So, let's learn how to add mp3 to your Blogger Blog:

Step 1 : First, upload the music file to any free file hosting servers on the net. There are tons of sites that provide free music file hosting. Just google "Free music hosting"

Once you upload, they will provide you with a direct link to that music file.
ex: the file looks something
like this :


http://---------- .com/yourmusicfile.extension


(extension can be .mp3 or .wav or .mid or any other audio extension).

Step 2 : Here is the code you need to add music to your blog


<embed width="250" height="50" autostart="false" src="MUSIC FILE URL"/></embed>



width
: width of the music player

height: height of the music player
autostart : you want the music to start playing automatically ? or leave it to visitors choice..? (values : false or true)
MUSIC FILE URL : the direct link to your music file

If you use the autostart value: true, the music automatically plays.. but, it annoys many readers.

Few more attributes :
loop : true (or) false

If you want to continue playing the same track again and again until the visitor click on the 'STOP' button (or until he/she leaves your site), set the value to 'true'.
If you want the music to stop once the track is completed, use 'false'

playcount : n (n= any positive number)
suppose.. if you put playcount: 2 , the music will play two times and stop

If you want to use these two more additional features.. the code look something like this:

<embed width="250" height="50" autostart="false" loop="false" playcount="2" src="MUSIC FILE URL"/></embed>

Now you can add the music player anywhere you want in your Blogger blog..
Sidebar : If you want to add in sidebar, go to Layout » Add a gadget » html/javascript
and paste the code and save it.

No comments:

Post a Comment