tags:

views:

15

answers:

0

i am doing a simple program that adds video files..... i use the following code to do that..while using that i got an error that is "terminating due to uncaughtexception "the content url must not be nil"".......please help me to recover from this error....thanks in advance......

NSURL *url = [NSURL URLWithString:[[NSBundle mainBundle] pathForResource:@"annoying" ofType:@"3gp" ]];
    MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:url];
            [player setMovieControlMode:MPMovieControlModeHidden];
    [player setScalingMode:MPMovieScalingModeAspectFit];
    [player setBackgroundColor:[UIColor blackColor]];

    [player play];
    [player release];