2010-08-17 82 views
1

我使用的MPMoviePlayerController播放电影:播放视频适用于iPhone 4,但不能在iPhone 3G

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,它显示的视图,然后自动解除它。为什么?

+0

你能否检查你的电影的编码?我认为3g不支持.mov和.mp4 关心! – Siegfried 2011-12-07 18:11:08

回答

2

我有这个完全相同的问题,还没有找到解决方案。有人在苹果论坛上发起了一个关于此的帖子,并且我在那里发布了我的代码(非常类似于你的代码)。 https://devforums.apple.com/message/278621

我也试图打开使用UIWebView(加载它自己的电影播放器​​)。与以前相同 - 它适用于iPhone 4和3GS,但不适用于3G。