Thursday, January 13, 2011

Add Flash MP3 player in in Blogger, WordPress blog or your HTML website

0 comments
Most of the embedded music players that we see in web are are based on JavaScript and Flash (SWF). We need to encode the required music and video into MP3 and FLV formats to play them online. Also it requires the latest version of Adobe Flash player for online streaming. So if you are running a personal blog or something related with music or video, it would be much better if you can add music stream to your website. Here we have two methods for creating and MP3 music player for your WordPress- Blogger or blog . These players could also be used with Myspace, Orkut and other social networking profiles as scraps or messages .

The first MP3 music player code is pretty easy to implement when compared with the second one. It allows a lot customizations.

“This is how this player looks in your website”

Free Flash MP3 streaming audio player code:




<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="52" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="audio_duration=DURATION&amp;external_url=http://sound11.mp3pk.com/indian/aadekhenzara/aadekhenzara01(www.songs.pk).mp3" /><param name="src" value="http://cdn.techknowl.com/wp-content/uploads/2010/03/audio_player_standard_gray.swf" /><param name="wmode" value="transparent" /><embed type="application/x-shockwave-flash" width="400" height="52" src="http://cdn.techknowl.com/wp-content/uploads/2010/03/audio_player_standard_gray.swf" wmode="transparent" flashvars="audio_duration=DURATION&amp;external_url=http://sound11.mp3pk.com/indian/aadekhenzara/aadekhenzara01(www.songs.pk).mp3"></embed></object>

Create a new page or post in your Blogger or WordPress blog  including the above code and publish. Flash based player will start streaming the external music link added in the code. Remember to change the audio file with one of your choice.
Edit the above code to change the size, width and other parameters of the player.
The second type of Flash MP3 music player is derived from 1pixelout’s WordPress audio player plugin. We can directly use 1pixelout’s standalone mp3 player with websites having support for PHP script.
Here we will explain how you can use that plugin in Blogger and other static website/blogs/social sites .
Copy the the following code and place just before </head> in your Blog’s template HTML

<script language="JavaScript" src="http://cdn.techknowl.com/wp-content/uploads/2010/03/audio-player.js"></script>

Now, for enabling the flash mp3 player in a blog post, put the following in to your post.
<object type="application/x-shockwave-flash" data="http://cdn.techknowl.com/wp-content/uploads/2010/03/player.swf" id="audioplayer1" height="24" width="290"><param name="movie" value="http://www.techknowl.com/wp-content/uploads/2010/03/player.swf"><param name="FlashVars" value="playerID=1&amp;soundFile=http://sound11.mp3pk.com/indian/aadekhenzara/aadekhenzara01(www.songs.pk).mp3"><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent"></object>
If you plan on posting many MP3 clips in your blog (Blogger) , put the code into your post template by moving on to Settings>Formatting. Remember to edit the MP3 URL (in bold letters ) with your music link .
Hope you will enjoy these simpler embedded web music players. Check this post if you want to create playlists and add multiple music files to your web player.

0 comments:

Post a Comment

Followers

Blogumulus by Roy Tanck and Amanda Fazani
Free Blogger Tips, Hacks, Widgets, Templates and more