Re: More Streaming Woes....

Jon Buda <[email protected]> Mon, 19 Aug 2002 23:47:45 -0700
Newsgroups gmane.comp.apache.mod-mp3
Message-ID <[email protected]>
Two questions.  Im not really sure what the line

file://echo "http://$settings[w_host]/play.php?song=$s&uid=$user_id\r\n";

does exactly.  what is file://echo?  also, what does \r do for text 
formatting?
Also, how does Content-Disposition: inline; differ from 
Content-Disposition:attachment?
I'm finally getting my playing to work better.  I made a huge discovery 
in XMMS if anyone else is interested.  Maybe this is old news, but if 
you disable all of the shoutcast/icecast title streaming and icecast 
metadata channel, there are no more lockups.  ive been listening for 
hours.  and if you use the #EXTINF you dont need the shoutcast title anyhow.

Thanks for the help all.
I'm looking forward to be able to use my server in my house this fall. 
Also hopefully to get some sort of public release out.

Jon Buda
Rob Sarten wrote:

> Hi,
>  
> Here are some modifications i have made to Ampache along similar 
> lines. Added some extra stuff to stop IE caching the playlists as i 
> had problems with selecting different albums and listening to the 
> previous one or others because IE was lazy and pulled the playlist 
> straight from cache.
>  
>  
> This was originally playlist.m3u... but i have since changed it to 
> m3u.php because i think the original setup was rather odd.. ;-)
>  
>  
> require('../modules/config.php');
>  
> // kludge alert ... have to set this because IE is dumb (see php.net 
> and search
> //  for session_cache_limiter in the function reference
> file://session_cache_limiter('nocache');
> check_session($ampache_session);
>  
> header("Content-Type: audio/mpegurl;");
> header("Content-Disposition: inline; filename=\"playlist.m3u\"");
> header("Expires: 0");
> header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
> header("Pragma: nocache");
>  
> And some changes to make the playlists nicer to view with a text 
> editor on windows systems..
>  
> echo "#EXTM3U\r\n";
> while (list ($index, $s) = each ($songs)) {
>   $si = get_song_info_from_md5($s);
>   $artist = get_artist_name($si->artist);
> echo "#EXTINF:$si->time,$artist,$si->title\r\n";
> file://echo "http://$settings[w_host]/play.php?song=$s&uid=$user_id\r\n";
> echo "http://$settings[m_host]/?op=play&song=$s\r\n";
>  
> Works very well now..
>  
> -Rob