【发布时间】:2012-05-31 10:18:14
【问题描述】:
我正在尝试在设备上播放视频。视频是这个 video
和我的代码:
NSString *urlStr = @"http://easyhtml5video.com/images/happyfit2.mp4";
NSURL *url = [NSURL fileURLWithPath:urlStr];
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
[self.view addSubview:moviePlayer.view];
moviePlayer.view.frame = CGRectMake(0, 0, 320, 400);
[moviePlayer play];
当我启动应用程序时,会看到一个电影屏幕,但没有播放电影。你能帮我看看错在哪里吗?
【问题讨论】:
标签: ios objective-c mpmovieplayercontroller