How to play youtube Videos With MPMoviePlayerViewController

旧巷老猫 提交于 2019-12-11 06:43:15

问题


Is there any other way to play youtube videos other than UIWebView.i want to play youtube videos in MPMOviePlayer.i have done research on it but i found no result.i got this url

Play YouTube videos with MPMoviePlayerController instead of UIWebView

please help me in doing this.thanks in advance


回答1:


I found a solution from github : https://github.com/hellozimi/HCYoutubeParser

It's great, but sometime it can't play few links, seem like it can't get real URL video,

NSDictionary *qualities = [HCYoutubeParser h264videosWithYoutubeURL:url];
_urlToLoad = [NSURL URLWithString:[qualities objectForKey:@"medium"]];

just return nil for qualities. Anybody have idea to solve it.




回答2:


Hi guys solution for this

https://github.com/larcus94/LBYouTubeView




回答3:


For me this solution es better and pretty simple but elegant and it did work perfectly

https://github.com/hellozimi/HCYoutubeParser



来源:https://stackoverflow.com/questions/10916673/how-to-play-youtube-videos-with-mpmovieplayerviewcontroller

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!