Hello all,
Till yesterday My MPMovieController was wokring fine in iPhone SDK 3 . But yesterday when I upgraded the SDK ti iphone SDK 4 my movieplayer stops working it is giving me a deprecation warning on the following line (They have deprecated lots of methods )
moviePlayer.movieControlMode = MPMovieControlModeDefault;
My full code is as follows :
NSURL *fileURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@/videos/%@",[[NSUserDefaults standardUserDefaults] objectForKey:@"SERVICE_URL"]
,customObject.movieURL]];
MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
if (mp)
{
// save the movie player object
self.moviePlayer = mp;
moviePlayer.movieControlMode = MPMovieControlModeDefault;
[mp release];
// Apply the user specified settings to the movie player object
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(myMovieFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayer];
// Play the movie!
[self.moviePlayer play];
}
please Tell me which method to replace instead of the deprecated method or should do something different ?
Thanks ,