설치된 Xcode 4.5, MPMoviePlayerController는 더 이상 작동하지 않습니다
문제
Xcode 4.5로 "업그레이드"할 때 이제는 App All에서 App에서 비디오 중 어느 것도 없음을 알아 보려면 매우 기쁩니다.
일반적으로 나는 다음과 같이합니다 :
self.moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[self getBundleClip:@"theVideo"]];
self.moviePlayer.controlStyle = MPMovieControlStyleNone;
self.moviePlayer.shouldAutoplay = YES;
self.moviePlayer.repeatMode = MPMovieRepeatModeOne;
self.moviePlayer.view.frame = self.container.frame;
self.moviePlayer.view.userInteractionEnabled = NO;
[self.container addSubview:self.moviePlayer.view];
- (NSURL*)getBundleClip:(NSString*)clip
{
NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:clip ofType:@"mp4"];
return [NSURL fileURLWithPath:moviePath];
}
.
다시 Xcode를 4.5로 업데이트하기 전에 모든 것이 완벽하게 재생됩니다.다른 사람 이이 문제가 있습니까?
나는 또한이 출력을 얻는다 :
[MPAVController] Autoplay: Disabling autoplay for pause
[MPAVController] Autoplay: Disabling autoplay
. 해결책
나는 그것이 왜 그것이 특별히 재생되지 않는지 확신하지 못하지만, 어떤 버전의 iOS SDK 버전에 대해 다른 것처럼 보이는 것처럼 보입니다. "NoFollow"> MPMoviePlayerController
문서 .
특히 무비 플레이어에서 prepareToPlay
메소드를 호출하려고 할 수 있습니다.
다른 팁
함수 내에서 그것을 정의한다고 가정합니까?
아크를 사용하는 경우 MPMoviePlayerController 을 유지해야합니다.
인터페이스 파일에 추가하십시오!
@property(nonatomic, strong) MPMoviePlayerController *moviePlayer;
. 제휴하지 않습니다 StackOverflow