HI,
I have a problem with a movie in fullscreen.
What is happening:
the user starts the movie over the movieControls and if the movie is finishing playing my code runs in a method where I remove the moviePlayer.view from its superview.
But nothing happens. The Movie disappears but there is still a black view and the movieControls.
If I make this without fullscreen all works fine.
here is the code:
theMoviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
[theMoviePlayer setShouldAutoplay:NO];
[theMoviePlayer setScalingMode:MPMovieScalingModeNone];
[theMoviePlayer setControlStyle:MPMovieControlStyleFullscreen];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(playbackFinished:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
[caller.view addSubview:theMoviePlayer.view];
[theMoviePlayer setFullscreen:YES animated:NO];
and here the playBackDidFinish Method:
- (void)playbackFinished:(NSNotification *)aNotification {
NSLog(@"MovieViewController moviePlayBackDidFinish");
[[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:nil];
//[theMoviePlayer setFullscreen:NO animated:NO];
[theMoviePlayer.view removeFromSuperview];
}
Why the movie does not disapear when it is in fullscreen?
thank you
jens