Thursday, May 15, 2008

How to embed / play music / audio file within a blog or website

If you have a music file in any format and you wanted to show the option to play it on your blog or you wanted to play the music file on your blog, then this article will explain you how can you do this.

Before showing the steps for playing music file on your blog or website, I would like to warn you that playing background music on your blog may be annoying to many of your visitors and that may reduce your visitor count. I will suggest you not to play background music files on your blog. But yes you can have music player with music files installed on your blog and have visitor the option to play or not to play on the request.

Here are various ways to embed / play music files on your blog or website

  • The first thing you need to do is upload your music file to some public hosting website. You can have your own hosting site or you can use various free hosting sites like ,, etc
Method 1 Online Playlist
  • After uploading the music / audio file, you need to get its public URL which can be accessed from where in the browser (e.g.
  • You can upload any number of such files
  • After this is done create one text file using Notepad or TextPad or any other text editors and copy paste all the URLs of your uploaded music file into it one URL per line as shown bellow.
  • Now save this text file with .m3u extension (e.g. myplaylist.m3u)
  • Once it is done upload this file also to some hosting website and get its public URL (e.g.
  • After all this add HTML /JavaScript gadget to your blog and write code similar to bellow in content part of it
<a href="URL of m3u file">Play some music online</a>
  • If your m3u file's URL is then above code should look like
<a href="">Play some music online</a>
  • Save this gadget and you have embed link to online play list of your audio / music file with your blogger blog. In case of website you can copy paste above code in site HTML source of your web page
Method 2 Auto play or Background music

  • You can upload your audio or music file to any web hosting site as mentioned in above method and get its URL
  • Once you get the URL replace your URL in the bellow code in place of Audio File URL in the bellow code
&lt;EMBED src="Audio File URL"

&lt;BGSOUND src="Audio File URL"&gt;

No comments yet


Embed Wave to Blogger