Reputation: 393
I want to play video in MPMoviePlayerViewController
, it works fine and plays video but problem is that it does not show done button unless i switch to the full screen mode. It should automatically show player along with done button as shown in attached screen.
here is the code:
mp = [[MPMoviePlayerViewController alloc] initWithContentURL:myURL];
[[mp moviePlayer] prepareToPlay];
[[mp moviePlayer] setUseApplicationAudioSession:NO];
[[mp moviePlayer] setShouldAutoplay:YES];
[[mp moviePlayer] setControlStyle:2];
[self presentMoviePlayerViewControllerAnimated:mp];
Upvotes: 0
Views: 834
Reputation: 162
Done button visible you set the ControlStyle.
[player.moviePlayer setControlStyle:MPMovieControlStyleFullscreen];
[player.moviePlayer setFullscreen:NO animated:YES];
Upvotes: 0
Reputation: 2634
Done button will be visible only when video is played in full screen mode. So, either you need to play the video in full screen mode using the following code:
player.moviePlayer.fullscreen = YES;
Or you need to customise the control to add your own Done button.
Upvotes: 1