|
From: Tim N. <zi...@cs...> - 2007-01-29 21:30:53
|
On Thu, Jan 25, 2007 at 01:40:33PM -0800, Kevin Nowaczyk wrote: > Hey Tim, > Hopefully you get this and have something to add: > I've been working on tjukebox again. I created a PHP > web client which works pretty well. There's one thing > you might be able to help with. The console client > keeps the socket connection open so it constantly > recieves updates from the server on the current song. > The web client, on the otherhand, get's it's > information and closes the socket. I want to try to > ensure that the "current song" name is correct. I > could do this by forcing the entire page to reload > every 10 second, but that's annoying. I know > Javascript does not support socket connections, but It > can do AJAX. > It might be most flexable if the communication between the clients and server was in the form of XML. Google for WSDL and/or SOAP. This way you also aren't having to do your own raw TCP/IP connections. > Do you know how we cound harness the AJAX functions to > get the current artist, album, and song from the > tjukebox server. > A first step might be doing this. > Also, I want to implement a wait time between playing > random songs. You pretty much have it figured out. The Jukebox server needs a new variable let's call waittime_thread. When a new song is added to the playlist if the list is empty and waittime_thread is not null, kill waittime_thread then add the new song. The function of waittime_thread is then simply to wait for x minutes then add a random song to the playlist and then end. It's been a long time since I've done any mutli-threaded c++ programming, so I can't really be of any more help. Good luck. Tim -- A wink is as good as a nudge to a blind bat. --Eric Idle ----------Tim Now...@cs...-------------------- GPG Key ID: 0x4F9A159C GPG Fingerprint: 0B1C 3D7B 6EB3 B8B6 D408 F7CC BD48 8E2D 4F9A 159C |