MPMoviePlayerContentPreloadDidFinishNotification does not launch [iPhone]

I am having a problem with notifying MPMoviePlayerContentPreloadDidFinishNotification. I registered receipt of the notification MPMoviePlayerContentPreloadDidFinishNotification and MPMoviePlayerPlaybackDidFinishNotification, but the first never works. Is this a bug in Firmware OS 3.0? perhaps fixed in 3.1? or? Because my divice and similator 3.0, maybe this is a mistake?

My code is:

...
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MovieDidLoad:) name:MPMoviePlayerContentPreloadDidFinishNotification object:nil];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MovieDidLoad:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil];
...
-(void)MovieDidLoad:(NSNotification*)notification
{
    UIAlertView *alert = [[UIAlertView alloc] 
                          initWithTitle:@"Notification Listener" 
                          message:@"Notification Listener invoked" 
                          cancelButtonTitle:@"Ok dude!" 
                          otherButtonTitles:nil];   
    [alert show]; 
    [alert release];    

}

MPMoviePlayerPlaybackDidFinishNotification always starts, but MPMoviePlayerContentPreloadDidFinishNotification never starts. Any ideas?

+3
source share
1 answer

. , , ?

0

Source: https://habr.com/ru/post/1724600/


All Articles