views:

282

answers:

1

I'm running into a problem with the MPMoviePlayerContentPreloadDidFinishNotification notification. I've regisered to recieve the MPMoviePlayerContentPreloadDidFinishNotification notification and MPMoviePlayerPlaybackDidFinishNotification but the first one never fires. Is this bug in Firmware OS 3.0 ? maybe fixed in 3.1 ? or ? Because my divice and similator is 3.0 maybe this is a bug ?

My code :

...
[[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];  

}

The MPMoviePlayerPlaybackDidFinishNotification is always fired but MPMoviePlayerContentPreloadDidFinishNotification is never fired. Any ideas ?

A: 

I answered a similar question here with a workaround. It's not ideal but may be worth a look if no other solution can be found?

cidered