views:

212

answers:

2

Hi, i have created a application that plays movie on button click..my application is running without any warning or error. But i am not able to see the movie don't know why? I have added the Media player framework and also imported the #import in viewController.h my button action code is as follow... -(IBAction)playMyMovie:(id)sender{

NSBundle *bundle =[NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"jumps" ofType:@"mov"];
NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
MPMoviePlayerController *theMovie =[[MPMoviePlayerController alloc] initWithContentURL:movieURL];
theMovie.scalingMode = MPMovieScalingModeAspectFill;
[theMovie play];

}

Please tell me what i am missing..

A: 

can anyone answer.... as i only get to see Quick Time player but it not playing the movie. I'm completely new to the iPhone SDK development so any help will work. Thanks in Advance...

Neelam Roy
A: 

in iPhone simulator you could not play movie properly.

test the applcation on iPhone (Real instrument).

It will work fine.

yakub_moriss