How to play youtube Videos continuously like a playlist? - ios

We are able to play youtube videos by fetching the data using Youtube API for iOS Application. We would like to play a set of videos continuously like a playlist. Can someone guide us through this issue. we tried using different players but none of them are working for youtube links. we have used MPMoviePlayerViewController but it doesn't play videos continuously, and AVQueuePlayer we were able to play MP4 videos stored in the app but unable to play youtube links.
It would be a great help if someone can help us
Thanks in advance.

Related

How to get watched history of a music video on youtube using YouTube api

I am working on a music project and i will like to view the watched history of different music videos on youtube that are not on my channel.
A typical case is this music chart site
I have been exploring youtube but i cant see any endpoint for that.
https://developers.google.com/youtube/v3/docs
I have also check analytics API but it seems like it only works on videos on your channel
https://developers.google.com/youtube/analytics/reference/reports/query
Is there any way to do this or an alternative?
Thanks

AVPlayer can't play Vevo Youtube video

I'm developing my youtube app on iOS and using AVPlayer to play video. But I don't know why my player can't play the Vevo video. Any idea for my problem? Thanks a lot.
You should use the iOS Youtube Helper library for playing youtube videos.
https://developers.google.com/youtube/v3/guides/ios_youtube_helper
I don't know if you can use the AVPlayer. I've seen some examples using MPMoviePlayerController on CocoaControls, like this one: https://www.cocoacontrols.com/controls/hcyoutubeparser or this one: https://www.cocoacontrols.com/controls/xcdyoutubevideoplayerviewcontroller
But I don't think using youtube's url directly in your player fits the ToS of the platform. So I will recommend you tu use the Youtube Helper Library if you are planning to publish your app.

Can we PLay Youtube audio only inside app?

I am working on an app, where I am required to play the youtube's Audio and Video as well.
I am able to PLay video Using "XCDYouTubeVideoPlayerViewController" available on cocoa controls. (I am getting Youtube url from the backend)
Is there any way , where I can play audio also only inside my app. Because I checked over Internet and stackoverflow, but Couldn't find anything working.
And Is there any way, where the Video or audio can be played at the Back gorund , i.e when I press Home button the vidoe/audio keeps on playing.
All I fund on stack overflow is, that its forbidden, and the chances are your app will be blocked.
Please help, Thanks Again.
Youtube doesn't encourage audio only! here's what they have to say about this.
Your API Client will not, and You will not encourage or create functionality for Your users or other third parties to: "separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API" -Kuan Yong, YouTube API Team
However there's a hacky workaround workaround whereby you can use a hidden UIWebView and play in that.

How to play just the audio of YouTube Video?

In my app I have played a youtube video by embedding it, but how can i only play the audio of the video? I tried using AVAudioPlayer and use the videos url as the file path but it didnt work, any help?
No it is not possible, only one workaround is just to use a hidden UIWebView and play in that.
Youtube forbids playing audio only! here is the message from youtube
Your API Client will not, and You will not encourage or create functionality for Your users or other third parties to: "separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API"
-Kuan Yong, YouTube API Team

How to play video in streaming by using iOS GoogleDrive SDK?

I want to play video in streaming by using iOS GoogleDrive SDK.
GoogleDrive App in iOS app store can play video in streaming by YouTube.
I have seen this post:
http://apiblog.youtube.com/2009/02/youtube-apis-iphone-cool-mobile-apps.html
According to the post, the key of play video is the YouTube source link.
The link lists GoogleDrive's all of file properties:
https://developers.google.com/drive/v2/reference/files
All file's properties were tried to instead of the YouTube source link, but that doesn't work.
Could anyone tell me how to get the correct link to play video by YouTube?
Thank you very much.
You can the URL in the embedLink field to get a streaming player for the video.

Resources