Re: Code confusion...playlists

"Mark C . Langston" <[email protected]>
Newsgroups gmane.music.equipment.slimp3.dev
Message-ID <[email protected]>
On Tue, Oct 23, 2001 at 05:46:48PM -0700, dean blackketter wrote:
> 
> This control goes through SliMP3::Playlist::executecommand(), you could use:
> 
> SliMP3::Playlist::executecommand($client,"playlist", "play", 
> $thepathorurlyouwishtoplay);
> 
> then use:
> 
> SliMP3::Playlist::showPlaylist($client);
> 
> to update the display.
> 
> Right now the metadata is either extracted from the file (in the case 
> of a local file path or file: URL) or from the path (in the case of 
> an HTTP url.)
> 
> Problem is, that you want to have metadata that's gathered separately 
> and cached.
> 
> Sean and I have talked about a metadata cache (to speed up HTTP 
> serving), and this would help you out too.  Wanna go ahead and add 
> it?  Otherwise, stub out your metadata somewhere obvious and I'll 
> hook it into the cache when I get to it.
> 
> I'm in the middle of tweaking the buttons per our discussions, so 
> it'll have to wait a little bit.



Actually, I think this is the core of the problem; I can't currently
use the executecommand and showPlaylist method, because the live365
info isn't an in-band metadata stream like ice/shoutcast streams.

Instead, I have to:

1)  Identify the URL in the playlist as a live365 stream
2)  Call a new function which munges that URL appropriately, grabs
    the station owner's ID, and then uses that ID to call the
    proprietary javascript interface Live365 insists upon using, 
    in order to get the current track info and seconds remaining.


So I can't just assume the data will be there when the MP3 is actually
being streamed.  My choices are:

1)  Grab this data whether or not the MP3 stream is running.  I.e.,
    when you browse to the .pls containing the live365 stream, go
    ahead and grab the data, and either
	a) display it immediately in lieu of the Title1 string,
	b) cache it until "play" is actually hit, and then display it.

2)  Figure out a way to determine when the stream is playing
    (right now, that indicator is showPlaylist() has been called), and
    then run out and grab the data and display it.


There would be logistical differences between Live365 streams and
shout/icecast streams; caching shout/icecast streams would require
monitoring the metadata stream on a regular basis, looking for that
"tick" that indicates a new song is about to start, and then grabbing
the new data.

With the Live365 streams, as soon as I grab the info, I know how many
seconds remain in the current song, so I can just start a countdown
timer, and grab new info when the timer hits zero.

I considered hijacking or rewriting isPLS, but that's not the right
solution.


It would seem, however, that Live365.com is currently down, so I can't
continue development tonight, unless it comes back up.  And I've been
wrangling with it enough that it's time for the "walk away and come
back to it fresh" strategy.

-- 
Mark C. Langston
[email protected]
Systems & Network Admin
http://www.bitshift.org



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get your FREE VeriSign guide to security solutions for your web site: encrypting transactions, securing intranets, and more!
http://us.click.yahoo.com/UnN2wB/m5_CAA/yigFAA/rIp0lB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.