Reputation: 1883
I have been trying to play the mp3 file in browser using default html5 player.
http://ujyaaloonline.com/audios/programAudios/1a8fdf5d0433ed581bbcee74836b3305.mp3
Audio is playing but the seek bar is not working here. What might be the problem. Please help.
Upvotes: 0
Views: 1268
Reputation: 17168
You need to support byte range requests on the machine from which you're serving the audio. See SoundManager2's Technical Notes on the subject.
Byte Serving is automatically negotiated between client and server, and offers a number of advantages over traditional downloads. Most notably, Byte Serving is closer to a "streaming" technology and enables clients to seek, buffer and resume playback at arbitrary positions within a file once the duration is known.
Example Request:
GET 1a8fdf5d0433ed581bbcee74836b3305.mp3 HTTP/1.1
Range: bytes=5210604-5275910
Expected Response:
HTTP/1.1 206 Partial Content
Accept-Ranges: bytes
Content-length: 65307
Content-Range: bytes 5210604-5275910/5275911
Content-Type: audio/mpeg
206 Partial Content
status.Content-Range
response header.416 Requested Range Not Satisfiable
status.Upvotes: 2