1
votes

I need to play some youtube videos within my iPhone app, can I use the native youtube app?

I've tried to embedding the video, but it doesnt work well.

Anyone can help me?

Thanks

2

2 Answers

0
votes

The simplest way to play YouTube videos is to just use the URL scheme for YouTube. Opening a YouTube URL will open the video in the YouTube app instead of in Safari:

NSString *stringURL = @"http://www.youtube.com/watch?v=WZH30T99MaM";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
0
votes

You could create a new UIWebView and open m.youtube.com link inside it.