#import <MediaPlayer/MediaPlayer.h>
NSString *path = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"avi"];
NSURL * videoURL = [NSURL fileURLWithPath:path];
[self presentMoviePlayerViewControllerAnimated:[[MPMoviePlayerViewController alloc]initWithContentURL:videoURL]];