开发者

MPMoviePlayerContentPreloadDidFinishNotification does not fire [iPhone]

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 ?


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜