답변

0

MPMoviePlayerLoadStateDidChangeNotification에 등록하십시오. 처리기 내에서 현재로드 상태를 확인하고 MPMovieLoadStateStalled을 마스크 처리합니다.

- (void)MPMoviePlayerLoadStateDidChange:(NSNotification *)notification 
{ 
    //is the player stalled, hence possibly starving? 
    if ((movieController_.loadState & MPMovieLoadStateStalled) == MPMovieLoadStateStalled) 
    { //yes->do something 
     NSLog(@"hey there, I am starving to death here"); 
    } 
} 

상위 if 절에 타이머를 등록 할 수 있습니다. 10 초. 아기가 더 이상 상태를 변경하지 않고 시간이 끝나면 비디오 재생을 종료하거나 건너 뛸 수있는 작업을 수행하십시오.

0

잘 모르겠지만 타이머로 performSelector을 사용할 수 있다고 생각하십니까?

[self performSelector:@selector(checkTimeout:) withObject:theMovie afterDelay:15]; 

그런 다음 영화 상태를 확인하십시오.

관련 문제