views:

125

answers:

1

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?

+2  A: 

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.

Brandon