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