« Web, HTML, Tech Forum

Question about autoplay Youtube code. Maybe you can help me.

This is the code I'm using on my profile.

<iframe width="0" height="0" src="https://www.youtube.com/embed/songid//?&;amp;;autoplay=1&;loop=1&;controls=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" loading="lazy">
</iframe>

Is there a way edit this embed code in such a way that you can autoplay multiple songs in a row? Like, could I paste the code a few times, each with a different song ID. And then do something to the code that song 1 plays first, song 2 plays 2nd and so forth?


TIA


Report Topic

2 Replies

Sort Replies:

Reply by x.{finn}.x

posted

at the moment i dont think so. i wondered the same thing but a solution to this is uploading a youtube video with a bunch of songs on it in whichever sequence you like and putting that instead. i doubt people will be on your profile for long enough to hear all of them though which is why its an unnessisary thing in my opinion


Report Reply

Reply by slouch

posted
updated

you can make a playlist on youtube then embed the playlist. instead of embed/video-id you would use the parameter 'videoseries' : embed/videoseries?list=playlist-id


for instance to embed https://www.youtube.com/playlist?list=PLB40C9A6C570190B7



<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLB40C9A6C570190B7" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></iframe>



Report Reply