Embedding files into wordpress blog is pretty easy with many wordpress plugins present to support the embedding of media files like mp3, and video files. To do the same in a simple web page, or to embed the media files without the usage of plugins there are a few codes that you can directly use with the mp3 file link if you have uploaded it to your server.
The visitors to the website can listen to the mp3 and play the mp3 files through the flash players in their browsers and don’t require any additional players like Windows media player etc. Here is how you can insert MP3 files in the web pages –

Google Media Player –

Just use this code in the HTML of the web page –

<embed type=”application/x-shockwave-flash” width=”400″ height=”27″ src=”http://www.google.com/reader/ui/3523697345-audio-player.swf” flashvars=”audioUrl=INSERTMP3URL” quality=”best”></embed>

The flash player would appear like this –

In the code, you need to replace the “INSERTMP3URL” by the URL of the mp3 file. The above given code is of the Google Reader player. It is the same that you see in the Google reader when any feeds have the MP3 files. It works on the non-Google websites too.

Yahoo Media Player –

This is a media player where you are inserting the mp3 files in web pages regularly, and don’t want to use the flash player code in every page. The Yahoo! Media Player enhances your web site or blog by creating an embedded player for each audio link. All the links can be played with one click, turning the page into a playlist. This is done by adding our JavaScript to your page.

You just need to place the HTML code of the MP3 URL, and then place the following code in the page –

<script type=”text/javascript” src=”http://mediaplayer.yahoo.com/js”></script>

yahoo media player

Check this page to know more how to insert the MP3 files in web pages using Yahoo media player.

iFrame code of Google Mail –

You can use the iFrame code that is usually used to share the music even in the Google internal systems like in Gmail. You just need to place the following code, and replace the “fileurl.mp3″ with the MP3 file URL. –

<iframe src=” http://mail.google.com/mail/html/audio.swf?audioUrl=fileurl.mp3 ” style=”width: 500px; height: 25px; border: 1px solid #aaa;”></iframe>

Related Posts Plugin for WordPress, Blogger...