2011-04-26 73 views

回答

4

您可以使用PSYouTubeExtractor.h类 它可以让YouTube的MP4视频网址,比下载和观看是没有问题的

这里是我的榜样 https://github.com/comonitos/youtube_video

+0

我如何可以下载两个视频并联Y-使用你的代码? – Warrior 2012-09-19 14:39:42

+0

为每个视频生成提取器_______ PSYouTubeExtractor * extractor = [[PSYouTubeExtractor alloc] init]; – comonitos 2012-09-24 08:47:56

+0

动态创建通知_______ NSString * notification = [NSString stringWithFormat:@“%@”,ID]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleYTVideoDownload :) name:notification object:nil]; – comonitos 2012-09-24 08:49:49

1

您必须下载您通过文件位置的URL使用NSURLConnection的。之后的视频,你可以MPMovieplayerContoller来运行video.you可以google为NSURLConnection和MPMovieplayerController获取示例。