문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top