Question

AVFoundation allows a developer to create a custom Video Player instead of using Apple's own fullscreen MPMoviePlayer.

In my project, I'm using this approach to achieve something close to what the YouTube iOS app does, which is to have a "canvas" view up on top where playback takes place, along with several controls and text labels at the bottom:

A very skilled Jedi

As you know, a YouTube URL "points" to HTML data, and it is meant to be used within a UIWebView. Tapping on the thumbnail inside this UIWebView brings up a fullscreen Player, which is what I'm trying to avoid.

I would like to know if the YouTube API provides a URL pointing to the actual video (mp4 file), so that I may use it along AVFoundation.

I want to find a legal way to do this, so it should definetely comply to both Apple's and Google's terms of service.

Thanks,

Was it helpful?

Solution

The easiest way to achieve this is by adding an overlay UIView, which you can place over any part of the screen. And putting it on top of the UIWebView, and set it to not respond to user interactions. As you can change size and placement and making it transparent, you can effectively choose which user interactions you want and which you don't want. And you will not mess around with youTube ToS in any way.

OTHER TIPS

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top