是否有任何 sdk 或方法以编程方式在 iphone 中下载带有 youtube url 的 youtube 视频。
请帮助我。
提前致谢。
问候,
是否有任何 sdk 或方法以编程方式在 iphone 中下载带有 youtube url 的 youtube 视频。
请帮助我。
提前致谢。
问候,
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.
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.