|
Posted by Andy Hassall on 11/16/13 11:26
On Mon, 12 Sep 2005 11:05:39 +0200, alex bazan <me@privacy.net> wrote:
>I've got musicplayer http://musicplayer.sourceforge.net/ pointing to a
>php file which dumps with fpassthru and appropiate headers an mp3 file.
>
>If i point the mp3 directly i have no problems, but with the php script
>songs stop playing when after a while (always at the same length)...
How is the player reading the file?
If it is streaming it, i.e. only reading just about as fast as it's playing
give or take a buffer size, it'll exceed PHP's maximum execution time, and PHP
will drop the connection.
>
>I've tried removing headers but then the file does not play at all. With
>other players i've experience the same cut at the same length. If i
>don't use the player (ie, dumping the file directly to the browser), i
>can hear all the song without problems.
>
>It seems as if the player only gets ok the first X bytes that got
>transfered.
This is probably exactly so; the browser downloads the file then plays it,
whereas the other player streams it gradually and so keeps PHP running all the
time.
>I want to have the files out of the apache root path, that's why i use
>the php script to dump the files.
You would probably be better off using an Alias in Apache.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Navigation:
[Reply to this message]
|