2

Im playing around with the C# Web API and built a RESTfull API to access resources in my Database.

What i want to achieve is a HTML5 Audio Tag is playing a mp3 loaded from the database. As the src attribute i make a request, and on the server i respond with a ByteArrayContent

The MP3 is playing ... so far so good. Im displaying the controls of the audio tag, but i cant seek through the MP3.

My Questions:

  • Do i serve the right response for Seeking?
  • Do i need to make a ranged request?
  • Do i need any javascript to seek, or is the audio tag all i need?
  • Does someone has an example to achieve this?
deterministicFail
  • 1,271
  • 9
  • 28
  • You may want to have a look at [mediaelement.js](http://mediaelementjs.com/) for having a decent player. – Marcel Feb 13 '14 at 08:15
  • Do you have the problem with seeking only with your server, or is it a general problem? – Marcel Feb 13 '14 at 08:15
  • thank you for the response. Im try to achieve it without any extentions and just in chrome. If i serve a static file on my server, i can seek through the mp3. This is the reason why im not sure about the ByteArrayContent – deterministicFail Feb 13 '14 at 08:27
  • Does your server send the size of your file? If not, seeking will not work. Also have a look at this question about the range header: http://stackoverflow.com/q/2798931/79485 – Marcel Feb 13 '14 at 08:32

0 Answers0