Flash mp3 player that uses a dynamically generated XML file.
Posted on 2005-04-24
I am designing a perl site which allows members to upload music tracks and maintain semi custom web pages. One of the features I am coding, allows any user who visits the site, to add tracks from multiple memberpages. I have designed it so that when a user clicks on a track to add to the playlist, a popup opens up which displays a list of tracks in the playlist. and flash/java player that plays those tracks in order. Its the player that I am stucks on. From my research, I think flash is probably the simplest method.
So what I need is a player that will play those songs that have been added to the playlist. I have setup a script that can dynamically generate a playlist in any format... m4u or xml based on what the user has chosen. I know that there are literally hundreds of potentially useful flash mp3 players to choose from which can play tracks from a playlist. The problem I have enoucntered is that if the playlist is edited in anyway during playback, the flash player, which only loads the playlist initially, cannot detect playlist changes during playback. So if the user has been listening to the playback for a length of time, then suddenly decided to add antoher track or delte antoher track from the playlist, then those changes will not be reflected in the playback until the the page with the embedded player is refreshed, which will naturally break the playback.
So basically as I see it, I need a player that will reload the playlist after the end of each song or when next/previous is pressed, but should still retain its progress through the playlist. if it was playing playin the 3rd track and I click next, it should reload the playlist but should start playing the 4th track then, not back to the first track.
Hope this makes some sense and alternate solutions are appreciated as well. My experience with this is limited so I dont know the best way to go about it.