MPMoviePlayerController does not play a movie in full screen

I have an MPMoviePlayerController on my iPad application that works well when its frame is normal (not full-screen).

When I press the full-screen button, the player enters full-screen mode, but the movie stops. I constantly see the heading "Loading ...", a black background, and standard controls (back, playback, and more) are disabled.

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 ideas? I am using the iOS 6 SDK and I am testing an application on the iPad 6.0 simulator and a real iPad2 with iOS 6 beta (latest version).

+8
ios6 fullscreen mpmovieplayercontroller
source share
1 answer

OMG !!!

I wrote...

 [player stop]; 

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

+27
source share

All Articles