Question

I would like to start the MoviePlyer without controls, but if the user touch the screen, the controls are displayed and allow user to go full screen or AirPlay.

self.player = [[MPMoviePlayerController alloc] initWithContentURL:url];
self.player.allowsAirPlay = YES;
self.player.view.frame = self.imageView.frame;
self.player.controlStyle = MPMovieControlStyleNone;

[self.view addSubview:self.player.view];
[self.player play];

self.player.controlStyle = MPMovieControlStyleDefault;

It seems that the only way to remove controls initially is to set to MPMovieControlStyleNone, but no controls will be shown later. If I set to MPMovieControlStyleDefault later, controls will always be shown.

What should I do? Is there a property to set controls to off initially?

Was it helpful?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top