I want to remove the audio and subtitle settings button from the player (iOS8, iOS9):

Player controller initialization:
- (void) configureMoviePlayer {
if(self.moviePlayerController == nil) {
self.moviePlayerController = [[AVPlayerViewController alloc] init];
[self.view setTranslatesAutoresizingMaskIntoConstraints:NO];
[self.moviePlayerController.view setTranslatesAutoresizingMaskIntoConstraints:NO];
[self.view addSubview: [self.moviePlayerController view]];
NSDictionary *views = @{ @"selfview" : self.view, @"movieControllerView" : [self moviePlayerController].view};
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[movieControllerView]|"
options:0
metrics:nil
views:views]];
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[movieControllerView]|"
options:0
metrics:nil
views:views]];
}
}
When the stream URL is received, it is passed to the new player instance:
self.moviePlayerController.player = [AVPlayer playerWithURL:self.contentUrl];
if([self.moviePlayerController respondsToSelector:@selector(allowsPictureInPicturePlayback)]) {
self.moviePlayerController.allowsPictureInPicturePlayback = YES;
}
The example in the WWDC video does not contain a button. Is there a way to disable only one button or get an array of toolbar buttons by default and disable a specific one.
source
share