I noticed that the embed code everyone uses doesn't loop songs for me even though it's supposed to. I'm pretty sure it's because YouTube embed doesn't like to loop standalone videos -- but it does work for playlists! All you have to do is "create" a playlist using the embed code, like this:
<iframe width="0" height="0" src="https://www.youtube.com/embed/YOURVIDEOCODE?autoplay=1&loop=1&playlist=YOURVIDEOCODE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" loading="lazy" data-ruffle-polyfilled="">
</iframe>
So mine looks like this:
<iframe width="0" height="0" src="https://www.youtube.com/embed/27WKaZ3AY4U?autoplay=1&loop=1&playlist=27WKaZ3AY4U" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" loading="lazy" data-ruffle-polyfilled="">
</iframe>
If it doesn't work, try changing the word playlist to list. Note this only works for playing one song on loop, not playing an actual playlist... I haven't been able to get a playlist with multiple songs to even autoplay properly yet, let alone have it loop itself lol
Not sure if anyone has already done this, but I haven't seen it so I made this post anyway :P
Happy coding! ^__^
Comments
Displaying 20 of 58 comments ( View all | Add Comment )
binrin.xoxo
using tysm <3
Francisco❀
using :3
rupt !!
using this :0 thanks so much
RA1NY_DAYZ
its not working for me :((
RenCringe
works perfectly tysm for posting ^_^!!
Ari ✩°。 ⋆⸜ 🎧✮
Using <3
Ari ✩°。 ⋆⸜ 🎧✮
Using <3
xin ᡣ𐭩
thank u so much !!!
Emeri
Using!! Btw if this manages to break any other code on ur profile (it managed to break the vhs overlay layout i used?) just put the code in a different profile section and it'll work!!
𝙵𝚊𝚕𝚕𝙿𝚛𝚎𝚜𝚎𝚗𝚝ᶻ 𝗓 ᶻ
Thank you
MCi
thank u~ ヾ(*'▽'*)
b0ringg
i actually love you so much thank you
angelwingsxx
I love you for making this
mw-008e
IT WORKED FUCK YEAH
ARI [DO NOT BEND]
YAY THANK YOU!! BEST TUT
Scarleth:P
TY so much!o(≧o≦)o it work!!
kat
sick!! I was trying to do this myself and it wasn't working well xD thank you!!
Jonas
YOU ARE SO HELPFUL!!!
Zopandrel
This is so useful
box
yay ty!! it worked for me :))