我在MPMoviePlayerViewController上播放一个URL。而且我无法单击播放器的任何控件。
这是我的实现:
NSURL *streamUrl = [NSURL URLWithString:movieUrl];
MPMoviePlayerViewController *mpvc = [[MPMoviePlayerViewController alloc] initWithContentURL:streamUrl];
[[mpvc view] setFrame:self.view.bounds];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(movieFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
mpvc.moviePlayer.movieSourceType = MPMovieSourceTypeStreaming;
[mpvc.moviePlayer setControlStyle:MPMovieControlStyleFullscreen];
[mpvc.moviePlayer setShouldAutoplay:YES];
[mpvc.moviePlayer setFullscreen:NO animated:YES];
[mpvc setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
[mpvc.moviePlayer setScalingMode:MPMovieScalingModeNone];
[mpvc.moviePlayer setUseApplicationAudioSession:NO];
[self presentMoviePlayerViewControllerAnimated:mpvc];
MPMoviePlayerViewController
最佳答案
通过使用performSelectorOnMainThread调用我的方法来修复它
关于ios - 无法单击我的MPMoviePlayerViewController上的控件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/37898874/