I'm attempting to stream an mp3 via javascript/html5 or expensive on my small webserver. The javascript/html front-end calls a script around the server which starts producing an mp3 file.

I would like the file to start playback immediately once enough audio is buffered, and also to stay in the hand.

I'm a new comer to streaming and wish to know the best way to get this done both in apache server and home windows iis.

In the beginning I figured I will have to make use of an actual streaming protocol, for example rtp or rtsp, however it appears enjoy it maybe better utilizing a custom javascript player that can take the mp3 file in via http. Nevertheless the anxiety about http would be that the file transfer stop when the incomplete tail from the mp3 file is hit. It is possible to way for this, possibly changing the config to create the apache/iis server hold back until the file is done before terminating the transfer?

I additionally investigated m3u files but this appears to want an entire mp3 file, although I am not obvious onto it.

Any advice/solutions/good examples is going to be appreciated.

I not have the exact solution, but you can test this http://learningsfromdotnet.blogspot.com/2011/11/playing-mp3-using-audio-tag-html-5-in.html.

I had been attempting to stream MP3 file from IIS server, had problem with Chrome since it constitutes a request with "Range" header. If you're able to make similar request with "Range" header and from server stream the bit of MP3, it could work.