1

With the YouTube API you can construct ad hoc playlists on the querystring like this...

https://www.youtube.com/v/jdqsiFw74Jk?playlist=ylLzyHk54Z0,-vH2eZAM30s&autoplay=1

When this is a link on a web page, viewed on an Android device and the YouTube official app is selected as the default app to launch when these links are clicked, it only plays one of the videos and does not show any playlist like you see on the web.

Even if you select the browser as the default app, it just downloads the first video, but then it is unplayable.

I do not want to create a predefined YouTube playlist ahead of time with the videos defined - I know that will work - this feature of my site is designed to allow the user to autoplay a selection of videos at the touch of a button on the web and on mobile.

I have looked at all sorts of combinations of defining the url but alas, no joy with any combinations.

Anyone got this to work or have any suggestions of things to try?

Thanks!

1 Answers1

0

You can use recyclerView for the list. I have done this using Youtube api rest calls.

The Youtube rest call will look like this(I believe the max results are 50):

https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=iBi9LVIrC-fVelw2-I2r-yrEk6SpXfO8&key=AIzaSyCI1oCTXwZzgVv7LDQ8NykSIUEWt247KnU&maxResults=50

You will need to get a browser key from the google developer console. I've explained this in my answer here:

https://stackoverflow.com/a/41201084/3689744

Community
  • 1
  • 1
cmcoffee91
  • 131
  • 3
  • 7
  • Thanks for taking the time to share your suggestion but this does not answer my question. RecyclerView is for a native Android app. That is not what I have asked about, so this suggestion does not fix my problem. – Shane Bough Apr 16 '17 at 16:01