0

I use a MPMoviePlayerController to show a movie in a small box. Default controls allow the user to switch to fullscreen. Everything works perfect, but the controls in fullscreen mode have a black background and the status bar shows up, what looks weird.

_moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:resourceURL];
[[NSNotificationCenter defaultCenter] addObserver:self
    selector:@selector(moviePlaybackComplete:)
    name:MPMoviePlayerPlaybackDidFinishNotification
    object:_moviePlayerController];
[[NSNotificationCenter defaultCenter] addObserver:self
    selector:@selector(moviePlayerWillExitFullscreen:)
    name:MPMoviePlayerWillExitFullscreenNotification
    object:nil];
_moviePlayerController.view.frame = CGRectZero; // will be set to correct size later
_moviePlayerController.view.layer.borderWidth = kVideoBorderWidth;
_moviePlayerController.view.layer.borderColor = kVideoBorderColor.CGColor;
_moviePlayerController.scalingMode = MPMovieScalingModeAspectFit;
_moviePlayerController.controlStyle = MPMovieControlStyleDefault;
_moviePlayerController.shouldAutoplay = NO;
[_contentView addSubview:_moviePlayerController.view];

I've attached screenshots, any ideas?

enter image description here enter image description here

Thanks a lot!

4

0 回答 0