In the past, we developed very intense video for the iPhone and iPad, and actually the opposite problem occurred - we wanted to use YTPlayerView to display embedded (not full-screen) videos on both devices, but were not able to do it on the iPhone. We ended up using the XCDYouTubeVideoPlayerViewController , which seems to have solved most of our problems. In fact, this is not recommended, as it violates YouTube’s terms of use to a large extent (it analyzes the html page, finds the .mp4 URL and plays it in MPMoviePlayer, which gives all the necessary flexibility for full use of the screen, download time and other notifications .
Throughout the process of finding a way to work with YTPlayerView, I contacted engineers from Google, who work on the basis of YouTube assistants, and they recommended working directly with the iframe player API , which allows you to configure controls and receive video events. This means that you will have to use your own webview instead of the YouTube assistant. The connection between parts of JavaScript and Objective-C can be complex (and what the helper library is actually trying to keep from the developer), but it will give you more flexibility.
It also helps you work with UIWebView to display YouTube videos: Play YouTube videos in the embedded WebView .
I know that this is not exactly what you asked for, but I hope this helps you in the right direction. I had a lot of problems with YouTube videos on iOS, so I know how this can be frustrating. Good luck
source share