I'm creating a custom MovieController using MPMovieController as base. I can switch the video to full-screen by calling
_[moviePlayer setFullscreen:YES animated:YES];_
Calling the same function ([moviePlayer setFullscreen:NO animated:YES];) to bring the movie-player back to the original state (ie when user press Done button) does not work.
As an alternative, I've also tried to -
a) listening to MPMoviePlayerDidExitFullscreenNotification and calling moviePlayBackDidFinish: function as a result of this.
b) posting my custom notification from inside "Done" function using this -
NSDictionary *thisDictionary = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:MPMovieFinishReasonUserExited] forKey:MPMoviePlayerPlaybackDidFinishReasonUserInfoKey];
[[NSNotificationCenter defaultCenter] postNotificationName:MPMoviePlayerDidExitFullscreenNotification object:moviePlayer userInfo:thisDictionary];
But in all these cases, the movie-player view does not come back to its original state.
Help Please.
Thanks!