ahoff
ahoff

Reputation: 1334

Playing youtube videos on iOS

I was wondering how are apps like McTube (https://itunes.apple.com/us/app/mctube-for-youtube/id559618284?mt=8) playing youtube videos. It looks like a custom MPMoviePlayerController but is that allowed?

BTW I need autoplay which I couldn't achieve with UIWebView, that's why i was wondering.

Upvotes: 7

Views: 1932

Answers (1)

lxt
lxt

Reputation: 31304

Some YouTube videos can be played back in a MPMoviePlayerController - some cannot. When you query a video through the YouTube Data API (link here) you'll get back all the content types available for a particular videos, including the Flash player, 3GPP, MP4 (if available), etc. You can use these URLs to load up a MPMoviePlayerController.

This is perfectly fine, but as I've said - not all videos are available to embed this way. Some videos (mainly ones that require adverts to be displayed) can't be put into native controllers.

Upvotes: 10

Related Questions