In my app, I have some movies playing. I have checked the information for the movies and they appear to be within what MPMoviePlayerController
should be able to handle (bitrate, etc.)
They're streaming from a URL, and it will only play on a 3GS, nothing lower. I have tried to collect the error from the notifications in MPMoviePlayerController
for MPMoviePlayerContentPreloadDidFinishNotification
and MPMoviePlayerPlaybackDidFinishNotification
but I am getting a useless error string for the userInfo
key in the notification, that doesn't tell me anything but the fact that the movie could not be played.
The URL I am testing with is: http://movies.apple.com/movies/independent/lawabidingcitizen/lawabidingcitizen_h.480.mov
On a 3G or 2G iPhone the MPMoviePlayerController appears and it briefly tries to load the movie but then fades back to the view controller where it came from.
Does anyone have a clue why I am unable to stream and play the above URL only on a 3GS? I am sure it's a memory issue, but I have tried on a 2G iPhone with 50MB memory free and it still doesn't work.
I am using the piece of code from Apple's own sample app for streaming movies to launch the movie:
MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:@"http://movies.apple.com/movies/independent/lawabidingcitizen/lawabidingcitizen_h.480.mov"];
if (mp) {
self.moviePlayer = mp;
[mp release];
[self.moviePlayer play];
}
Thanks