1

可能重复:
在应用程序中将 Youtube 视频保存到 iPhone

是否有任何 sdk 或方法以编程方式在 iphone 中下载带有 youtube url 的 youtube 视频。

请帮助我。

提前致谢。

问候,

4

2 回答 2

1

If you are planning to release that app to AppStore I wouldn't advise you to leave that option. Youtube rules are not permitting that and Apple is following them very much these days although there are apps on AppStore that have that functionality enabled. One of my friends tried to add offline play to his Youtube player app and got rejected because of it.

于 2012-12-28T12:03:02.783 回答
0
   1) Get the NSURL Object First using url string.   
   2) Allocate and start an NSURLConnection to fetch the file from the URL. Do not use sendSynchronousRequest:returningResponse:error      
   3) In the connection:didReceiveResponse: delegate method, create NSData object
   4) In the connection:didReceiveData: delegate method, get the data and append it to NSData object
   5) play the video using MPMoviePlayerController after getting data.
于 2012-12-28T11:14:27.047 回答