开发者

Playing videos works on iPhone 4 but not on 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 presentMoviePlayerVie开发者_StackOverflowwControllerAnimated: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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜