2016-06-20 10 views
2

私は自分のアプリにYouTubeを統合したいと思っています。誰も私を助けることができるテーブルビューでビデオを表示します。 youtubeを統合してテーブルビューでビデオリストを表示する方法や、ボタンをクリックしてこれらのビデオをダウンロードする方法を詳細に教えてください。iosアプリでYouTubeをどのように統合するのですか?

ありがとうございます。

+1

https://github.com/youtube/youtube-ios-player-helper –

+0

が提供する詳細なチュートリアルについては
https://github.com/youtube/youtube-ios-player-helper

それをuはhttpのための完全なヘルプでこのリンクをチェックしてください:// WWW .appcoda.com/youtube-api-ios-tutorial/ –

答えて

2

あなたのアプリにyoutubeを統合するためにポッドを使用することを強くお勧めします。

pod 'youtube-ios-player-helper', :git =>'https://github.com/youtube/youtube-ios-player-helper', :commit=>'head' 

YouTubeの公式な使い方です。試してみてください、あなたはhtmlとcssを書く必要はありません。

使用例

1)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]; 
YTPlayerView

@property(nonatomic, strong) IBOutlet YTPlayerView *playerView; 

2)のためにIBOutletをXIBでUIViewを追加し、YTPlayerView

2)を作成し、そのクラスを変更

詳しくは、こちらをご覧ください。 Youtube https://developers.google.com/youtube/v3/guides/ios_youtube_helper#installation

+0

良い答えです...おかげさまですが、youtubeを使用する前にあなたのための認証にいくつかのコードを提供できますか?ビデオ、認証、またはダウンロードを取得するために必要なすべてのAPI ... –

関連する問題