Reputation: 47
i want to integrate youtube in my app. and show video in table view can anybody help me. please give me details in steps how to integrate youtube and show videos list in tableview or can i download these videos on button click.
Thanks in advance.
Upvotes: 2
Views: 1518
Reputation: 326
http://developers.google.com/youtube/v3/guides/ios_youtube_helper
You can integrate it by cocoa pod.You can show it in UITableView.
You can't download youtube videos directly from youtube.
Upvotes: 0
Reputation: 16957
I would highly recommend you to use pod to integrate youtube in your app.
pod 'youtube-ios-player-helper', :git =>'https://github.com/youtube/youtube-ios-player-helper', :commit=>'head'
Its official way to use youtube in it. Give it try, you don't need to write html and css yourself.
Sample Usage
1) Add UIView
in xib and change its class to YTPlayerView
2) Create IBOutlet for YTPlayerView
@property(nonatomic, strong) IBOutlet YTPlayerView *playerView;
2) In ViewController.m
NSDictionary *playerVars = @{
@"playsinline" : @1,
@"showinfo" : @0,
@"rel" : @0,
@"controls" : @1,
@"origin" : @"https://www.example.com", // this is critical
@"modestbranding" : @1
};
[self.playerView loadWithVideoId:@"Youtube Video Id" playerVars:playerVars];
For complete documentation please visit.
https://github.com/youtube/youtube-ios-player-helper
For Detailed tutorial provided by Youtube
https://developers.google.com/youtube/v3/guides/ios_youtube_helper#installation
Upvotes: 2