0
votes

I am using MPMovieController in my application in order to play fullscreen player, it works well on iOS 4, but not in iOS 5.

When I touch Done button, view player disappears stopping audio but a black screen is still there.

Here is my pretty simple source code:

moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:self.movieURL]; [moviePlayer play];

[self.view addSubview:self.moviePlayer.view]; [self.moviePlayer setControlStyle:MPMovieControlStyleFullscreen]; [self.moviePlayer setFullscreen:YES];

Did you experienced a similar behavior?

Thanks.

Thierry

1
I think, you have stopped the movie, but you have not removed the movieplayer view. ex:- [moviePlayer.view removeFromSuperview]; - mac
Yes I removed the player's view from superview. - thierryb

1 Answers

0
votes

You can use instead MPMoviePlayerViewController. It has property moviePlayer,which is MPMoviePlayerController,and you can handle with it. The plus of MPMovieViewController - you can show it by [self presentModalViewController:yourController], and after ending of video you can simply call [self dismissModalViewController];

Other way - simple try to add MPMoviePlayerController *moviePlayer in your header file.