problem with video in iphone app only sound work
i want to play a video in my iphone app . I used this code .

    - (void)viewDidLoad
    {
        [super viewDidLoad];
        NSURL *movieUrl = [NSURL fileURLWithPath:
                           [[NSBundle mainBundle] pathForResource:@"Myvideo" 
                                                           ofType:@"mp4"]];
        
        //create a new instance of MPMoviePlayerController
        MPMoviePlayerController* myMovie=[[MPMoviePlayerController alloc] 
                                          initWithContentURL:movieUrl];
        
        //disable scaling of our movie
        myMovie.scalingMode = MPMovieScalingModeNone;
        
        //don't show any controls
       // myMovie.movieControlMode = MPMovieControlModeHidden;
        
        //you can specify at which time the movie should 
        //start playing (default is 0.0)
        myMovie.initialPlaybackTime = 2.0;
        
        //register a callback method which will be called
        //after the movie finished
        [[NSNotificationCenter defaultCenter] addObserver:self 
                                                 selector:@selector(movieFinished:) 
                                                     name:MPMoviePlayerPlaybackDidFinishNotification 
                                                   object:myMovie]; 
        
        //start the movie (asynchronous method)
        [myMovie play];
        // Do any additional setup after loading the view from its nib.
    }

But there is only sound who work . Any one can help me please ?


problem with video in iphone app only sound work
===

i want to play a video in my iphone app . I used this code .

    - (void)viewDidLoad
    {
        [super viewDidLoad];
        NSURL *movieUrl = [NSURL fileURLWithPath:
                           [[NSBundle mainBundle] pathForResource:@"Myvideo" 
                                                           ofType:@"mp4"]];
        
        //create a new instance of MPMoviePlayerController
        MPMoviePlayerController* myMovie=[[MPMoviePlayerController alloc] 
                                          initWithContentURL:movieUrl];
        
        //disable scaling of our movie
        myMovie.scalingMode = MPMovieScalingModeNone;
        
        //don't show any controls
       // myMovie.movieControlMode = MPMovieControlModeHidden;
        
        //you can specify at which time the movie should 
        //start playing (default is 0.0)
        myMovie.initialPlaybackTime = 2.0;
        
        //register a callback method which will be called
        //after the movie finished
        [[NSNotificationCenter defaultCenter] addObserver:self 
                                                 selector:@selector(movieFinished:) 
                                                     name:MPMoviePlayerPlaybackDidFinishNotification 
                                                   object:myMovie]; 
        
        //start the movie (asynchronous method)
        [myMovie play];
        // Do any additional setup after loading the view from its nib.
    }

But there is only sound who work . Any one can help me please ?

