2009-08-02 5 views
0

저는 3.0 SDK 용 MPMediaPlayer 프레임 워크로 작업 해 왔습니다. 미디어 플레이어가 느리게 응답하거나 전혀 응답하지 않는 경우가 있습니다. 콘솔에 경고 메시지가 표시되지만 사용자가 이러한 메시지를 볼 수 없으므로 시간 초과로 인해 내 앱이 비난됩니다.MPMediaPlayer로 보낸 메시지를 확인하는 방법 시간이 초과 되었습니까?

이러한 제한 시간을 복구 할 수있는 방법이 있습니까? 다시 시도하지 않도록 설정할 수 있습니까?

답변

0

앱이 MPMediaPlayer에서 알림을 수신하도록 등록합니까? 이러한 시간 초과를 보지 못했기 때문에 오류로 채워진 userInfo를 사용하여 MPMoviePlayerContentPreloadDidFinishNotification을 반환하는지 여부를 알 수 없습니다. MPMoviePlayerController.h에서

다음 MoviePlayer 예제 코드에서

MP_EXTERN NSString *const MPMoviePlayerContentPreloadDidFinishNotification; // userInfo contains NSError for @"error" key if preloading fails 

:

// Register to receive a notification that the movie is now in memory and ready to play 
[[NSNotificationCenter defaultCenter] addObserver:self 
       selector:@selector(moviePreloadDidFinish:) 
       name:MPMoviePlayerContentPreloadDidFinishNotification 
       object:nil]; 

// Register to receive a notification when the movie has finished playing. 
[[NSNotificationCenter defaultCenter] addObserver:self 
       selector:@selector(moviePlayBackDidFinish:) 
       name:MPMoviePlayerPlaybackDidFinishNotification 
       object:nil]; 

// Register to receive a notification when the movie scaling mode has changed. 
[[NSNotificationCenter defaultCenter] addObserver:self 
       selector:@selector(movieScalingModeDidChange:) 
       name:MPMoviePlayerScalingModeDidChangeNotification 
       object:nil]; 
+0

내 애플은 그러나, 나는 MPMusicPlayer이 아닌 동영상 플레이어를 사용하고, 알림에 자신을 등록한다. 그래도 보람있는 방향으로 보입니다. 감사! – casademora

관련 문제