Youtube integration in iOS SDK

2019-01-29 00:55发布

How I can integrate Youtube with iOS? Mainly I want to play private videos without asking for login. Login should be hard coded in the app and will not ask user before playing the private video.

1条回答
爷、活的狠高调
2楼-- · 2019-01-29 01:12

Some YouTube videos can be played back in a MPMoviePlayerController - some cannot. When you query a video through the YouTube Data API https://developers.google.com/youtube/2.0/reference#Videos_feed you'll get back all the content types available for a particular videos, including the Flash player, 3GPP, MP4 (if available), etc. You can use these URLs to load up a MPMoviePlayerController. This is perfectly fine, but as I've said - not all videos are available to embed this way. Some videos (mainly ones that require adverts to be displayed) can't be put into native controllers.

查看更多
登录 后发表回答