0

I'm developing a cocoa application. I have to play a youtube video. http://www.youtube.com/watch?v=dElLBPL_h1Q

I'm using QTKit for playing video. Code is as follow:

NSURL *fileURL = [NSURL URLWithString:@"http://www.youtube.com/watch?v=dElLBPL_h1Q"];
QTMovie *movie = [QTMovie movieWithURL:fileURL error:&error];
[movieView setMovie:movie];
[movieView.movie play];

Where, movieView is an instance of QTMovieView.

Please help.

iPhoneDv
  • 1,969
  • 1
  • 19
  • 34
  • Check out if your video is in one of these formats : AVI, AVR, DV, M-JPEG, MPEG-1, MPEG-2, MPEG-4 – Anil May 01 '13 at 11:59

1 Answers1

2

Use LBYouTubeView to play YouTube videos with choice of streaming with high-quality and standard quality .

LBYouTubeView contains is LBYouTubePlayerViewController and its just a small view that is able to display YouTube videos in a MPMoviePlayerController. You even have the choice between high-quality and standard quality stream.

EDIT : Its easy to use.

Paresh Navadiya
  • 38,095
  • 11
  • 81
  • 132