播放视频以启动应用程序
我有这个代码,我看不到视频,我可以听到音频。
谁能解释为什么?
-(void)awakeFromNib
{
NSURL *url2 = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"tecnolitevideo_1" ofType:@"mov"]];
moviePlayer = [[MPMoviePlayerViewController alloc]
initWithContentURL:url2];
[moviePlayer presentMoviePlayerViewControllerAnimated:moviePlayer];
[moviePlayer.moviePlayer play];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayerPlaybackStateChanged:) name:MPMoviePlayerPlaybackStateDidChangeNotification object:nil];
}
-(void)moviePlayerPlaybackStateChanged:(NSNotification *)notification {
}