Description:
Using Javascript, I populate a YouTube link with video IDs that the user has selected, and end up with a URL like the following:
https://www.youtube.com/watch_videos?video_ids=0vrdgDdPApQ,cbut2K6zvJY
Visiting the above link, YouTube creates a list for those videos and returns you to it:
https://www.youtube.com/watch?v=0vrdgDdPApQ&list=TLQJeFf9I5pC0yMTA4MjAxNQ
And of course, it is possible to embed the second link by simply replacing the /watch URL with /embed.
My question(s):
Is it possible to embed the first link (/watch_videos) somehow? If not, is it possible to create a YouTube playlist client side (maybe using the YouTube API) and then embed it? (Other implementations / ideas are more than welcome)
If neither of the above, is it then possible to "chain" YouTube video IDs to an embeded player and play them successively (JavaScript / YouTube API)?
Thanks
You can embed the first video then in the playlist parameter add other selected Ids
For ex:
<iframe width="560" height="315" src="http://www.youtube.com/embed/0vrdgDdPApQ?playlist=cbut2K6zvJY,7iw30sK2UCo,sYV5MTy0v1I" frameborder="0" allowfullscreen></iframe>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments