xcode 在 iphone 应用程序中从 YouTube 下载视频

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5786103/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 20:54:58  来源:igfitidea点击:

Download Video from YouTube in iphone Application

iphoneobjective-cxcodeipad

提问by Gaurav Thummar

In one Application i use YouTube Video for display i want first that video download from YouTube then it play from locally from downloaded source.

在一个应用程序中,我使用 YouTube 视频进行显示,我希望首先从 YouTube 下载视频,然后从下载的源本地播放。

This is Possible.....If yes then provide suggestion...

这是可能的.....如果是,请提供建议...

回答by comonitos

You can use PSYouTubeExtractor.h class It can get youtube mp4 video url and than downloading and viewing is not a problem

您可以使用 PSYouTubeExtractor.h 类它可以获取 youtube mp4 视频 url 并且下载和查看不是问题

Here is my example https://github.com/comonitos/youtube_video

这是我的示例 https://github.com/comonitos/youtube_video

回答by senthilMuthu

You have to download your video through file location url using NSURLConnection .After that you can MPMovieplayerContoller to run that video.you can google to get example for NSURLConnection and MPMovieplayerController.

你必须使用 NSURLConnection 通过文件位置 url 下载你的视频。之后你可以 MPMovieplayerContoller 来运行该视频。你可以谷歌获取 NSURLConnection 和 MPMovieplayerController 的示例。