1

I'm looking to use an existing video player library for iOS apps with HLS support so that I can implement a player with some very specific networking behavior, as opposed to letting Apple decide the size and timing of requests. It needs to be customizable enough to support new networking policies such that I can override the request sizes, change what files are requested, and read data from an existing local cache file. In short, I'm attempting to override the networking portion that actually calls out and fetches the segments such that I can feed in data from partial cache as well as make specific algorithmic changes to the timing and size of external HTTP requests.

I've tried AV Foundation's AVAssetResourceLoaderDelegate Protocol but, unless there is something I'm not seeing, there doesn't seem to be a way to override the outgoing requests and just feed bytes to the media player.

I've also looking into VLC but unfortunately my current project is incompatible with a GPL license.

Ideally, there would be a way to directly feed bytes or complete segments to MPMoviePlayerController, but I can't find any way of accomplishing this in the API. The only method I'm aware that works is using a local HTTP server, which I have been doing but it seems overly complicated when all I'm really trying to do is override some internal networking code.

Any suggestions of another way of doing this?

MxSagan
  • 123
  • 1
  • 7
  • This question is good, but it is likely to get closed because you are asking for a recommendation of a library or tool which is one of the main reasons questions get removed. Perhaps reword your question in a way that clearly states the problem and what you have tried to do to resolve it. – picciano Oct 10 '14 at 16:14
  • Thanks for the tip, I changed my question to better reflect what I'm asking. I guess what I'm looking for is a good starting point for tackling the specific problem described above. – MxSagan Oct 10 '14 at 16:27
  • @picciano Do you have any other suggestions for how I could state my question better? – MxSagan Oct 10 '14 at 16:31
  • Looks better now. This is a good question and I didn't want to see it get closed. I ran into a similar problem last week and am looking forward to seeing an answer! – picciano Oct 10 '14 at 16:34
  • CoacaHTTPServer is my current solution, but it is not pretty and most of the code I end up writing are workarounds to accommodate/predict the way that MPMoviePlayerController requests HLS segments. Also, the project currently has nobody actively managing it. – MxSagan Oct 10 '14 at 16:50
  • To use delegate you need to change the HLS url so AVPlayer can't load it by itself. http://stackoverflow.com/questions/26649865/avassetresourceloaderdelegate-methods-not-working-on-device – Chugaister Dec 29 '14 at 16:50

0 Answers0