这是我播放视频的功能。但它只播放声音,没有观看视频
-(void)playMovieAtURL:(NSString *)moviePath
{
NSURL *movieURL=[NSURL URLWithString:moviePath];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
NSLog(@"url : %@",movieURL);
[player setControlStyle:MPMovieControlStyleDefault];
[player setScalingMode:MPMovieScalingModeAspectFit];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieDidExitFullscreen:) name:MPMoviePlayerPlaybackDidFinishNotification object:player];
[[player view]setFrame:[[self view]bounds]];
[[self view] addSubview:[player view]];
[player play];
}