Reputation: 434
I have MPMoviePlayerController, and I want to show controls programmaticaly, like after user's tap, or simulate users tap.
How can I do this? Thanks.
Upvotes: 3
Views: 8129
Reputation: 379
Someone already answer to that question here i think
Set controlStyle
property to MPMovieControlStyleNone
initially, and then set it to MPMovieControlStyleFullscreen
one second later using a [performSelector:withObject:afterDelay:1]
. It works well, controls do not appear until user taps on video.
Upvotes: 1
Reputation: 4091
creating the MPMoviePlayerController object in the following way would give you an interface for video controls
yourMoviePlayerController = [MPMoviePlayerController new];
yourMoviePlayerController.controlStyle=MPMovieControlStyleEmbedded;
[yourMoviePlayerController setContentURL:[NSURL fileURLWithPath:videoPath]];
yourMoviePlayerController.backgroundView.hidden = YES;
[yourMoviePlayerController setScalingMode:MPMovieScalingModeAspectFit];
yourMoviePlayerController.shouldAutoplay=YES;
yourMoviePlayerController.movieSourceType = MPMovieSourceTypeFile;
Upvotes: 6