Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
播放视频可以在iPhone4上使用,但不能在iPhone3G上使用_Iphone_Objective C_Cocoa Touch_Mpmovieplayercontroller - Fatal编程技术网

播放视频可以在iPhone4上使用,但不能在iPhone3G上使用

播放视频可以在iPhone4上使用,但不能在iPhone3G上使用,iphone,objective-c,cocoa-touch,mpmovieplayercontroller,Iphone,Objective C,Cocoa Touch,Mpmovieplayercontroller,我正在使用MPMoviePlayerController播放电影: STVideo *mySTVideo; mySTVideo = [items objectAtIndex:indexPath.row]; moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:mySTVideo.video_url]]; movie

我正在使用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];

这在iPhone4上非常有效,但在iPhone3G上,它会显示视图,然后自动将其取消。为什么?

我也有同样的问题,但还没有找到解决办法。有人在苹果论坛上发了一条关于这一点的帖子,我在那里发布了我的代码(与你的代码非常相似)


我还尝试使用UIWebView(加载自己的电影播放器)打开。结果与之前相同-它可以在iPhone 4和3GS上运行,但不能在3G上运行。

请检查您的电影编码好吗?我认为3g不支持.mov和.mp4!