0

I'm creating a simple app that can play audio files (currently only mp3 files) located on a webserver.

Currently, I'm using Python's SimpleHTTPServer server side, and the AVAudioPlayer for iOS.

It sort of works, since the file is streamed over HTTP instead of just being downloaded from the webserver. But I often experience that the playback of a file is suddenly restarted.

I'm considering using another method of streaming, eg. RTMP, but on the other hand I want to keep things simple. I'm wondering if another HTTP server might do the trick? Any other experiences/suggestions?

Grav
  • 1,714
  • 14
  • 27

1 Answers1

0

What happens when the playback is restarted? Print the HTTP URLs on the server. Does the player start from index=0, go to index=4000, then back to index=0 again?

johntellsall
  • 14,394
  • 4
  • 46
  • 40
  • Is the index= a certain protocol? I tried logging using Charles, and it does not report that the client makes such requests. It just shows a request to the plain url, eg. http://localhost:3000/song.mp3 – Grav Jul 17 '14 at 21:10
  • I just made up `index=123`. Also log the HTTP headers, there might be an `Accept-Ranges` value. http://stackoverflow.com/questions/8293687/sample-http-range-request-session – johntellsall Jul 17 '14 at 22:50