• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

Flash mp3 player that uses a dynamically generated XML file.

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.
0
sganjam
Asked:
sganjam
  • 4
  • 3
  • 2
  • +3
1 Solution
 
negatyveCommented:
sample: http://www.negatyve.com/EE/DynamicMP3playlist/DynamicMP3playlist.html
source: http://www.negatyve.com/EE/DynamicMP3playlist/DynamicMP3playlist.zip

you can change the xml whenever you want, the player will know what to do.
0
 
sganjamAuthor Commented:
Hmm, that works well. I am assuming its basically reloading the playlist before loading next track. However this player is missing a lot of the stuff that comes w/ most of the other players. There is no volume control, progress bar, pause button, and it doesnt display the list of songs in the playlist. Anyway to keep that refreshing too?
0
 
sganjamAuthor Commented:
Did you write this yourself? Is there any documentation that comes with it? Any official website where I can go look around?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
negatyveCommented:
>I am assuming its basically reloading the playlist before loading next track

Yes, it does: flash cannot be notified (if the movie it's not served via Flash Communication Server) of any change apported to the playlist, so it should reload it periodically.

>However this player is missing a lot of the stuff that comes w/ most of the other players.

I know, it's made from scratch, but it has the main logic related to the dynamic playlist loading. All other features are something more than an example created on the fly.. :)

>Did you write this yourself

I did.. :)

>Is there any documentation that comes with it?

No, at all, but I can comment it for you (if you tell me what's your knowledge level about it), and can help you to implement other functions..
0
 
negatyveCommented:
For example: Flash can read mp3 id3 tags, but it can read em only when the file is completely loaded. Are you going to write, in your xml file, informations like song title, author, duration, etc..?
0
 
sam85281Commented:
Not looking for any points here, but...

As long as the mp3s use ID3 version 2 AND the user is using Flash Player 7 it will read the ID3 tags as soon as it begins loading.

ID3Ver2 tags are at the beginning of the file, where ID3Ver1 tags were at the end.  The only thing it won't pick up until the end, is the duration of the song.

Here's a player I'm working on that is completely independent of XML or any other type of playlist.  All info is pulled from ID3 and the playlist is generated by reading folder contents.  There is no XML or any other file that needs to be updated.

Sorry, I'm not ready to release this yet, but it'll let you see how quick the ID3 tags load in and display the content.(provided you have player 7).

http://www.hotflashaudio.com  Click on the live demo.

-Sam
0
 
sokhodomCommented:
It's getting interesting here :)
Negatyve, the source code is great, thank you for your effort.
Sam, I went to your site and the Music player cool. By the way, how could you make the Copy right stuff? i.e. when you Right Click on the Flash movie at http://www.hotflashaudio.com/demo.html , you will see some copyright words.
Thank you :)

Sokhodom
0
 
sam85281Commented:
Sokhodom, here's the code for the right click menu:

function menuFunction(){}
function menuFunction2(){}
function menuFunction3(){
getURL("http://www.hotflashapps.com", _blank);
}
MENU.customItems.push(Functioned2);
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("HotFlash Audio Player", menuFunction);
Functioned2 = new ContextMenuItem("©2005 Hot Flash Applications", menuFunction2);
Functioned3 = new ContextMenuItem("Click Here to Visit Our Website", menuFunction3);
MENU.customItems.push(Functioned);
MENU.customItems.push(Functioned2);
MENU.customItems.push(Functioned3);
_root.menu = MENU;

Just put it in your first frame and mod as neccessary.

-Sam
0
 
sokhodomCommented:
Sam,
Thank you, Really appreciate a lot :)

Cheers,
0
 
FLAASHERCommented:
Good work Sam
0
 
negatyveCommented:
@sam85281:

1. really nice work! :)
2. (surely your right on id3, I just thinked at it as the lowest level solution - as 1.0, fp 6, streaming sound, etc..)
0
 
Jakob_ECommented:
Good work :)
0
 
sam85281Commented:
Thanks for all the compliments guys!

-Sam
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 3
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now