MPMoviePlayerController is playing YouTube video?

后端 未结 2 1674
轮回少年
轮回少年 2020-12-20 03:30

I found a method to play YouTube video on MPMoviePlayerController. For this simply need a right url. That url may be obtained after playing YouTube video in iframe. My UIWeb

相关标签:
2条回答
  • 2020-12-20 03:52

    For me this library did work perfectly! https://github.com/hellozimi/HCYoutubeParser

    0 讨论(0)
  • 2020-12-20 03:53

    There is no official API to get the "right" url, and likely there never will be. See the following link on the bottom.

    http://groups.google.com/group/youtube-api-gdata/browse_thread/thread/394c41dda8b4745a

    Note that your method based on UIWebView does not play the movie in MPMoviePlayerController, but rather in a custom class called YTMoviePlayer. You can confirm it by playing a movie and then dumping the subview hierarchy starting at [[UIApplication sharedApplication] keyWindow].

    0 讨论(0)
提交回复
热议问题