可以在 iPhone 4 上播放视频,但不能在 iPhone 3G 上播放视频

发布于 2024-09-14 09:15:55 字数 654 浏览 2 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

话少情深 2024-09-21 09:15:55

我有这个完全相同的问题,但还没有找到解决方案。有人在苹果论坛上发起了一个关于此问题的帖子,我在那里发布了我的代码(与你的非常相似)。 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文