I need to stream audio from a location that can’t be directly accessible to a client app. To this end Im investigating using a Java servlet or PHP to create the stream on an as needed basis.
Anyone done this before?
How would this handle skip / seek commands from the <audio> tag?
Is there any way to prevent a client from caching the audio?
Yes, I’m pretty sure this has been done before. In case you’re looking for code, see HTTP_Download.
There is nothing to do on the server-side about that. Your browser handles that. If you want to handle that in the browser, please consult your browsers technical specification about the features of the
<audio>HTML tag your browser supports.Not at all. The current copy of the data is available at the client side, otherwise the browser is not able to play / skip / seek the media.