我可以为iphone播放youtube视频吗
为什么它不工作您指向的是html页面,而不是视频 也许这会有帮助我可以为iphone播放youtube视频吗,iphone,Iphone,为什么它不工作您指向的是html页面,而不是视频 也许这会有帮助 您指向的是html页面,而不是视频 也许这会有帮助 NSString *url = @"http://www.youtube.com/watch?v=DqCxv6a5Iu0"; /* NSString *url = @"http://www.youtube.com/watch?v=DqCxv6a5Iu0"; mp = [[MPMoviePlayerController alloc] initWithConten
您指向的是html页面,而不是视频 也许这会有帮助
NSString *url = @"http://www.youtube.com/watch?v=DqCxv6a5Iu0";
/*
NSString *url = @"http://www.youtube.com/watch?v=DqCxv6a5Iu0";
mp = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:url]];
[mp play];*/
NSString *videoFilepath = [[NSBundle mainBundle] pathForResource:@"Movie" ofType:@"m4v"];
NSURL *videoURL = [NSURL fileURLWithPath:url];
MPMoviePlayerController *movie;
movie = [[MPMoviePlayerController alloc] initWithContentURL:videoURL];
[movie play];