Cocoa touch SDK 3.2 - How to play video
Possible duplicate:
Using MPMoviePlayerViewController in SDK 3.2 for iPad
How to play videos on SDK 3.2 (iPad)?
Read a lot of questions here, but they mostly talked about the iPhone.
For example MoviePlayer example here http://developer.apple.com/iphone/library/samplecode/MoviePlayer_iPhone/Introduction/Intro.html
This works on 3.1.3, but when I run it on 3.2 it doesn't work.
So basically I can play video on 3.1.3 with this code, but the same code won't work on 3.2
NSString * moviePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: @ "Movie.mp4"];
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:moviePath]];
moviePlayer.movieControlMode = MPMovieControlModeDefault;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayer];
[moviePlayer play];
Thanks
Tee
a source to share
MPMoviePlayerController no longer works on iPad - only audio plays. You have to use MPMoviePlayerViewController to get correct functionality
Using MPMoviePlayerViewController in SDK 3.2 for iPad
Thanks for the Apple update :(
a source to share