2

I use a loopback server to play locally cached HTTP Live Streaming files (m3u8, ts, etc). This used to work perfectly in iOS6 circa May-Jun 2013.

Revisiting the app now after about a year with iOS7, it looks like the loopback server does not work anymore. I read at just one source that loopback servers do not work anymore due to additional sandboxing restrictions, but the general silence of the internet on this matter is surprising (I don't see too many hits in Google for "localhost server ios7" or "loopback server ios7") considering how this was in common use, especially when serving HLS in combination with 3rd party (non-native) DRM like PlayReady.

Coming to the question, I'd like verification from the SO community, that iOS7, definitively, does not support loopback servers using any of the following syntaxes:
1. localhost:port
2. 127.0.0.1:port
3. [wifi-ip-address]:port

P.S:
1. Reference links if any, would as always be appreciated.
2. If somebody that uses the latest version of PlayReady or other equivalent non-native DRM, could shed light on how they're able to serve HLS without using a loopback proxy to decrypt the media first, that would be extremely helpful too. Of course, as long as no NDA is violated in the process.

Dev Kanchen
  • 2,332
  • 3
  • 28
  • 40
  • Note: P.S.#2 looks like a "second" question, but the answer to that could in-fact confirm that loopback servers have indeed stopped working in iOS7 (if Microsoft had to change their approach to accomodate additional sandboxing, what better confirmation is there?). – Dev Kanchen Jun 02 '14 at 16:48
  • I just remembered that apps like GoodPlayer use a loopback server to implement their WiFi file-transfer functionality (unless there is some other way to achieve that). But I'll wait for the community to confirm with any additional, more direct evidence. – Dev Kanchen Jun 03 '14 at 03:19

1 Answers1

0

Loopback servers for m3u8 playback do work in iOS 7 + iOS 8, however, you cannot use localhost:[port]/file.m3u8. Instead you need to use 127.0.0.1:[port]/file.m3u8. Most DRM providers have patched this by now but you may want to check to see if your DRM library is outdated or still sending localhost to the player. If so, you can simply replace localhost with 127.0.0.1 before the URL is passed to the player and it should work.

Imran
  • 967
  • 1
  • 8
  • 12
  • Syntax #2 and #3 as mentioned in my question haven't worked either (all 3 used to work before). Note that my implementation of the server was using a simple POSIX socket, listening on it within a loop. Perhaps you're using a Cocoa-based server which is working? – Dev Kanchen Oct 24 '14 at 07:44