I am designing a website that plays music. I need a flash player that has or can handle a now playing list. The problem I am facing is that I cannot update the playlist without refreshing the player which means it will interrupt the song that is currently playing. I have trying with JW player in particular so far and have not been successful. All i am able to do is pass a playlist as an xml file but not able to update it without refreshing the playlist. Is there any other player that would better suit my needs? Is there a way i can do this with jw player itself
+1
A:
DEMO: http://jsbin.com/ehonu/20
Ok. here we go..!
First of, here there is a Must Read from the JW official site! and here the events doc
Anyway, my way is by using COOKIES & JW Player: ActionScript API Calls
the idea behind, is that since jw player can use Listeners and theese can Listen also the Curent Position of the song in this moment, we track it into coockie when Page UNLOAD
then it can also SEND EVENTS so when page refresh and dom is loaded we send back the position to the player! ;-)
for the Refreshing Playlist without refresh Page you can of course use the Send Event like this:
setTimeout("refreshPlaylist('myfile.xml')",2000);
function refreshPlaylist(theFile) {
currentItem = -1;
previousItem = -1;
//this Reload the playlist
player.sendEvent('LOAD', theFile);
};
For better Understand Look Into the code of demo example!
Let me know!
aSeptik
2010-03-14 21:04:28
already saw that...the links that explain how to exactly to that dont work anymore :(
Shanon
2010-03-14 22:26:46
Read the Updated Responce!
aSeptik
2010-03-15 17:11:26
hello. THe demo site doesnt seem to work for me. The player doesn't load. Thanks for the code anyway.... i'm having a look at it now
Shanon
2010-03-16 00:53:49
I know! ;-) the Demo could not work cause of jsbin server but try to upload the script on your own server! Let me know!
aSeptik
2010-03-16 01:53:56