MPMoviePlayerController is playing YouTube video?

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 UIWebView uses
this html:

<body style="margin:0"> 
    <iframe class="youtube-player" type="text/html" width="280" 
        height="200" src="" 

  • Cropping AVCaptureVideoPreviewLayer output to a square
  • set background images for Iphone 3g, Iphone 4s and Iphone 5
  • iOS: Google Authentication Code
  • Lost Connection to “iPhone”
  • Swift Generics will not instantiate generic when using inheritance
  • iOS 9 read file permission
  • So after click on play in video rect, we can see msg in console like this:

    YT_Player[1520:207] setting movie path:

    So here the question is – how get YT_Player object or how to generate “right” url?

    2 Solutions Collect From Internet About “MPMoviePlayerController is playing YouTube video?”

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

    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].

    For me this library did work perfectly!