【发布时间】:2013-07-08 20:58:49
【问题描述】:
我得到了这段代码:
theMoviPlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:@"/Resources/disc.mp4"]];
theMoviPlayer.controlStyle = MPMovieControlStyleFullscreen;
theMoviPlayer.view.transform = CGAffineTransformConcat(theMoviPlayer.view.transform, CGAffineTransformMakeRotation(M_PI_2));
UIWindow *backgroundWindow = [[UIApplication sharedApplication] keyWindow];
[theMoviPlayer.view setFrame:backgroundWindow.frame];
[backgroundWindow addSubview:theMoviPlayer.view];
[theMoviPlayer play];
但我真的不知道如何将视频添加到我的项目中。我必须将视频文件放在哪个文件夹中!?还是我必须做其他事情才能将其添加到我的项目中?
编辑:
在 xcode 中看起来像这样,对吗? 因为我现在确实收到播放错误。 以前我用一个 url 播放这个视频,效果很好,但是在本地没有这个文件:(
【问题讨论】:
标签: iphone ios ios5 ios6 ios6.1