views:

13

answers:

0

Hi Everyone,

I want to play youtube video within my application with url.I tried the following code but it doesn't work.

NSURL *url = [NSURL URLWithString:@"http://www.youtube.com/v/pGqraZN5U0k&amp"]; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; if (moviePlayer) { [self.moviePlayer play]; }

Please help me.Thanks in advance.