可以在 iPhone 4 上播放视频,但不能在 iPhone 3G 上播放视频
我正在使用 MPMoviePlayerController 来播放电影:
STVideo *mySTVideo;
mySTVideo = [items objectAtIndex:indexPath.row];
moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:mySTVideo.video_url]];
moviePlayerViewController.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"st-screen.png"]];
[self presentMoviePlayerViewControllerAnimated:moviePlayerViewController];
[moviePlayerViewController release];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
这在 iPhone 4 上效果很好,但在 iPhone 3G 上,它会显示视图,然后自动将其关闭。为什么?
I am using the MPMoviePlayerController to play movies:
STVideo *mySTVideo;
mySTVideo = [items objectAtIndex:indexPath.row];
moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:mySTVideo.video_url]];
moviePlayerViewController.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"st-screen.png"]];
[self presentMoviePlayerViewControllerAnimated:moviePlayerViewController];
[moviePlayerViewController release];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
This works great on the iPhone 4, but on an iPhone 3G, it shows the view and then automatically dismisses it. Why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有这个完全相同的问题,但还没有找到解决方案。有人在苹果论坛上发起了一个关于此问题的帖子,我在那里发布了我的代码(与你的非常相似)。 https://devforums.apple.com/message/278621
我也尝试过打开使用 UIWebView (加载它自己的电影播放器)。结果与之前相同 - 它适用于 iPhone 4 和 3GS,但不适用于 3G。
I have this exact same problem and haven't found a solution yet. Someone started a thread on the Apple forums about this and I've posted my code there (very similar to yours). https://devforums.apple.com/message/278621
I have also tried to open the using a UIWebView (which loads it's own movie player). Same result as before - it works on the iPhone 4 and 3GS but not on a 3G.