Timm
Timm

Reputation: 169

Removing/Deactivating fullscreen button on MoviePlayerControl

is there a way to remove the fullscreen button from MPMoviePlayerController? Or at least deactivate it?

Yes I searched, but the older question isn't solved and I don't know if there is something like a "push" feature.

Upvotes: 0

Views: 2376

Answers (3)

Agent Chocks.
Agent Chocks.

Reputation: 1312

Try this one it worked for me

- (void)viewDidLoad {
    [super viewDidLoad];

    [[NSNotificationCenter defaultCenter] addObserver:self 
                                             selector:@selector(movieEventFullscreenHandler:) 
                                                 name:MPMoviePlayerWillEnterFullscreenNotification 
                                               object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self 
                                             selector:@selector(movieEventFullscreenHandler:) 
                                                 name:MPMoviePlayerDidEnterFullscreenNotification 
                                               object:nil];

    self.moviePlayer.controlStyle = MPMovieControlStyleEmbedded;
}

- (void)movieEventFullscreenHandler:(NSNotification*)notification {
    [self.moviePlayer setFullscreen:NO animated:NO];
    [self.moviePlayer setControlStyle:MPMovieControlStyleEmbedded];
}

Upvotes: 2

Midhun MP
Midhun MP

Reputation: 107121

Actually there is no way to achieve this.

You can use either:

[yourPlayer setMovieControlMode:MPMovieControlModeNone];

(But it'll hide all controls)

or

Disable the user interaction using:

yourPlayer.view.userInteractionEnabled = NO;

(But no controls can be used)

Upvotes: 3

Ratikanta Patra
Ratikanta Patra

Reputation: 1177

There is no way to do that. You can hide the entire control panel. Hopefully this link helps.

Upvotes: 0

Related Questions