WordPress MP3 Plugin
Just started work on my second WordPress plugin, this time it’s an MP3 jukebox…

XML, Flash and No Database!
A development, non plugged-in version can be found here.
So far, it has the following features:
- XML-driven, no database required
- Configurable data source (XML or PHP)
- Configurable mp3 base directory
- Configurable playlist mp3 directory (for separate albums etc.)
- Skinnable!
- Configurable text, label and title colours
- Autoplay on/off
- Pseudo spectrum analyzer overlay
- Pop-up standalone (listen whilst browsing)
The Flash movie makes the call to a PHP backend file which is responsible for traversing the mp3 folder and pulling out all the tracks. The naming of tracks and artists is by using a simple file naming convention - Track Name__Artist.mp3 - it simply splits the name if it finds a double underscore.
The configurable data source means that you can hook in MP3 playlists and stream tracks from other servers. This can either be a PHP function or a static XML file.
The player is embedded into a web page using the SWFObject method, and as such, any amount of variables can be passed at runtime. This should make things nice and easy when integrating it into WordPress…
<script type="text/javascript"> // <![CDATA[ var so = new SWFObject("flukebox.swf", "flukebox", "310", "310", "8", "#FFFFFF"); so.addParam("menu", "false"); so.addParam("allowScriptAccess", "all"); so.addVariable("standalone","false"); so.addVariable("datasource","flukebox.php"); so.addVariable("mp3base","mp3"); so.addVariable("mp3dir","demo"); so.addVariable("autoplay","false"); so.addVariable("playlist_title","My Play List"); so.addVariable("show_spectrum","true"); so.addVariable("skin_name","stripe"); so.addVariable("colour_nowplaying","#996600"); so.addVariable("colour_status","#996600"); so.addVariable("colour_label","#666666"); so.addVariable("colour_playlist_title","#996600"); //so.addVariable("colour_playlist_link","#3399CC"); //so.addVariable("colour_playlist_hover","#000000"); //so.addVariable("colour_playlist_body","#000000"); //so.addVariable("colour_playlist_selected","#CC0000"); so.write("flukebox"); // ]]> </script>
ETA roughly one week. The hardest part is trying to think of a name for it…
No Comments »
RSS feed for comments on this post. TrackBack URL
Leave a comment
You must be logged in to post a comment.