에 어떤 그림이 작동MPMoviePlayerController : 사운드하지만 아이 패드 1을 실행 iOS6의에서 전체 화면 모드
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"myMovie.mov" ofType:@""]];
self.moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
// Register to receive a notification when the movie has finished playing.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:self.moviePlayer];
// Use the new 3.2 style API
self.moviePlayer.controlStyle = MPMovieControlStyleDefault;
[self.moviePlayer prepareToPlay];
self.moviePlayer.view.frame = CGRectMake(0, 0, 1024, 768);
[self.uiView addSubview:self.moviePlayer.view];
//[self.moviePlayer setFullscreen:YES animated:YES];
[self.moviePlayer play];
.
그러나 setFullscreen
의 줄의 주석 처리를 제거하면 영화 오디오는 나오지만 완전히 검은 색 화면이 나타나며 그림이 표시되지 않습니다.
몇 줄의 순서를 변경하려고 시도했습니다. 특히 play
호출과 setFullscreen
호출은 효과가 없습니다.
업데이트는
이 질문에 직접 관련이 나타납니다 [[NSBundle mainBundle] pathForResource:@"myMovie.mov" ofType:@""]
에 : 모든
MPMoviePlayerController in full screen issue (showing blank black screen)
질문에 대한 답변이 아니지만 MPMoviePlayerViewController로 전환했습니다. 전체 화면 비디오에서 잘 작동합니다. – occulus