Seeking through a streamed MP3 file with HTML5 <audio> tag Seeking through a streamed MP3 file with HTML5 <audio> tag node.js node.js

Seeking through a streamed MP3 file with HTML5 <audio> tag


Make sure the server accepts Range requests, you can check to see if Accept-Ranges is in the header. In jPlayer this is a common issue in Webkit (particularly Chrome) browsers when it comes to progress and seeking functionality.

You might not be using jPlayer, but the Server Response information on the official website may be of some use.

http://www.jplayer.org/latest/developer-guide/#jPlayer-server-response


but I had the same problem.Its necessary to set some headers for media file response.

as example:

Accept-Ranges:bytesContent-Length:7437847Content-Range:bytes 0-7437846/7437847

Then audio tag will be able to seeking


have a look here http://www.scottandrew.com/pub/html5audioplayer/, I used this and it plays while it is downloading the file. It waits a little bit for the buffer but then plays. Never tried seeking though but I would start by trying to set the "aud.currentTime" in his code if that can be done.

Good luck