In my application, I have several films. I checked the information for the movies, and they seem to be within what MPMoviePlayerControllershould be able to handle (bit rate, etc.).
They are broadcast from a URL, and will only play on 3GS , nothing lower. I tried to collect the error from the notifications in MPMoviePlayerControllerfor MPMoviePlayerContentPreloadDidFinishNotificationand MPMoviePlayerPlaybackDidFinishNotification, but I get a useless error line for the key userInfoin the notification that tells me nothing but the fact that the movie cannot be played.
URL I'm testing with: http://movies.apple.com/movies/independent/lawabidingcitizen/lawabidingcitizen_h.480.mov
On the iPhone 3G or 2G, MPMoviePlayerController appears and he briefly tries to download the movie, but then returns back to the view controller from where it came from.
Does anyone know why I can’t transfer and play the above URL only on 3GS? I'm sure this is a memory issue, but I tried using the iPhone 2G with 50 MB of free memory and it still does not work.
I am using a piece of code from my own sample movie streaming app from Apple to run a 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];
}
thank
source
share