8
votes

I have a MPMoviePlayerController on my iPad app that works good when its frame is regular (not fullscreen).

When I tap the fullscreen button, the player goes fullscreen, but the movie stops. I perpetually see the title "Loading...", a black background, and the standard controls (back, play and next) disabled.

I declare an instance variable for the player:

MPMoviePlayerController *player;

In my implementation:

MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:videoUrl];

player.shouldAutoplay = NO;
player.movieSourceType = MPMovieSourceTypeFile;
player.controlStyle = MPMovieControlStyleEmbedded;
player.allowsAirPlay = YES;

player.view.frame = CGRectMake(xPos, yPos, width, height);

[self.view addSubview:player.view];

[player prepareToPlay];

Do you have any idea? I'm using iOS 6 SDK, and I'm testing the app on iPad 6.0 simulator and a real iPad2 with iOS 6 beta (latest).

1
Update: I installed the official iOS 6 on iPad2 and the problem is still there. So it is not due to the beta version of iOS 6.Tony Mobile

1 Answers

27
votes

OMG!!!

I wrote...

[player stop];

in viewWillDisappear!!! How could I be so stupid?! No cake tonight...