I am using MPMoviePlayer to display a video from an external URL onto my iPhone App, however when I run the App a black screen is all that shows. Here is the URL I am using:
2015-04-27 00:11:29.655 Floadt[21069:2598414] http://ift.tt/1HMhFmp
Here is my code to try to setup MPMoviePlayer:
if (entry[@"videos"] != nil) {
NSLog(@"There is a Video: %@", entry[@"videos"]);
NSString *urlString = entry[@"videos"][@"standard_resolution"][@"url"];
NSLog(urlString);
NSURL *url = [NSURL URLWithString:urlString];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL: url];
[player prepareToPlay];
[player.view setFrame: CGRectMake(10, 65, 299, 299)];
[cell.contentView addSubview: player.view];
player.shouldAutoplay = YES;
[player play];
}
Aucun commentaire:
Enregistrer un commentaire