UPDATE: I spoke with Apple about this, and at the moment it is not possible to use MPMoviePlayerController with a subclass of NSURLProtocol!
Hey
I am not sure, but it is possible. I am currently working on something similar, but have not received it completely. I found that MPMoviePlayerController interacts with my custom subclass NSURLProtocol, but it seems to be important to consider the HTTPHeaders from NSURLRequest as they determine the range of bytes that MPMoviePlayerController needs.
If you dump them in your subclass NSURLProtocol, you will get something like this twice to start:
2011-01-16 17:00:47.287 iPhoneApp[1177:5f03] Start loading from request: { Range = "bytes=0-1";
}
So my GUESS is that while you can provide the correct range and return the mp4 file that MPMoviePlayerController can play, it should be possible!
EDIT: Here's an interesting link: Resource Protection in iPhone and iPad Applications
Oliver heyme
source share