views:

39

answers:

1

i am using the following code to play a video from a url but when the video loads only audio is played and no video is shown on simulator..right now i cant test it on iphone 4.0 device...is there a problem with the simulator or is MPMoviePlayerViewController is not the right way??

NSString *videoFilepath = @"http://www.migital.com/Hemant/1.3gp";
NSURL *videoURL = [NSURL URLWithString:videoFilepath ];

MPMoviePlayerViewController *movie = [[MPMoviePlayerViewController alloc] initWithContentURL:videoURL];


[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(playbackFinishedCallback:)
                                             name:MPMoviePlayerPlaybackDidFinishNotification
                                           object:movie];

[self presentMoviePlayerViewControllerAnimated:movie];
A: 

@hemant create instance of MPMoviePlayerViewController not MPMoviePlayerController to present it modally see your code

jeeva
sorry i mistyped it..
hemant
Did ur problem is solved or not.. if solved accept my answer
jeeva
nopes its still not showing video on simulator
hemant

related questions