I have a stream of bytes that represent a movie with H264 video and AAC audio. I got it using an RTMP library (rtmp-dump) and the data is comming through the network to my iOS simulator.
However I have no idea how to show it to the user. The MPMoviePlayerController seems to accept only an URL. Is there a way to play videos by supplying something like a NSPipe or similar to the player?
preguntado el 08 de enero de 11 a las 15:01
You could try implementing a custom URL protocol (see NSURLProtocol). Basically you create the protocol and register it, then any in-app requests to load a url having this protocol will be routed to your protocol instance. You'd likely have to mimic the responses that a HTTP server would send for a progressive-download of the file.
This wont work if MPMoviePlayerController uses lower-level CFNetwork calls vs. NSURLConnection to make its requests. This question implies that MPMoviePlayerController DOES make use of NSURLConnectino: ¿Cómo reproducir películas con una URL usando un protocolo NSURL personalizado?
Entonces lee el Sistema de carga de URL docs.