Wednesday, May 4, 2011

Two Ways to Embed MP3 Files on Blog or Website

Want to embed an audio player right into your blog post, that readers can play and listen to your uploaded Mp3 files? Here are two easy ways to do that.

The first one is the Google audio player. To embed an MP3 file, add the following code to your web page or blog post.

<embed type="application/x-shockwave-flash" src="" quality="best" flashvars="audioUrl=LINK" width="500" height="27"></embed>

Replace LINK with the URL of the MP3 file. The file can be uploaded to any server or file hosting services including your own, as long as the file is directly accessible. You can adjust the width and height of the player by changing the appropriate parameters in the code above. The player has a volume control too.

Try to play the audio file below. It is embedded using the above code.

Another option is to use the Yahoo Media Player. Now I have written about this at length quite a while ago, but here is a re-cap.

If you have a website and host directly downloadable MP3 files on your server, or link to MP3 files on your pages, then you can take advantage of Yahoo’s Media Player. All you have to do is add the following code to the <head> section of your web pages.

<script src = ""></script>

Automatically, a small collapsible media player will appear at the bottom-left of the screen that will create a playlist of all MP3 files found on the page. Additionally, small play buttons appear in front of every MP3 links. This allows visitors to play media files directly on the site without having to download the files first.


The interesting bit about the Yahoo Media Player is that visitors can invoke the player on any website that links to MP3 files even if the website author has not embedded any player for direct playback. For this there are bookmarks and a Greasemonkey script available. Interested readers can read more about it here.

Thanks QuickOnlineTips


Post a Comment

Popular Posts