Reputation: 60909
I can hear audio for about 5 seconds, and then my screen is constantly "Loading Movie..."
I am testing in the simulator.
STVideo *mySTVideo;
mySTVideo = [items objectAtIndex:indexPath.row];
moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:mySTVideo.video_url]];
NSLog(@"URL: %@", mySTVideo.video_url);
moviePlayerViewController.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"st-screen.png"]];
[self presentMoviePlayerViewControllerAnimated:moviePlayerViewController];
[moviePlayerViewController release];
Upvotes: 0
Views: 2418
Reputation: 1015
I think presentMoviePlayerViewControllerAnimated: doesn't retain the moviePlayer and you are releasing it in the next line. Try deleting the release line and see if it works, if it does create a property to retain the moviePlayer and skip the leak.
Upvotes: 0