« Web, HTML, Tech Forum

Issue with music playing in the background of my profile

Posted by Bones 0-\\

posted
updated

Forum: Web, HTML, Tech

I tried adding music (from youtube) but it doesn't automatically play on my profile unless I go into the profile editor and click "save all" every couple dozen times. 

It's hard to put into words, but does anybody know how to resolve this?

Also, is there a workable code I can use to loop the video? 




Report Topic

3 Replies

Sort Replies:

Reply by Gluma

posted

I use this code for looping YouTube music (you can put it anywhere [not in the <style> tag though] but I noticed that it creates some blank space wherever you put it. It’s not that noticeable but still):

<iframe width="0" height="0" src="https://www.youtube.com/embed/INSERT VIDEO ID HERE?autoplay=1&loop=1&playlist=INSERT VIDEO ID HERE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" loading="lazy" data-ruffle-polyfilled="">

Video ID is basically the 11 characters after the slash in a video’s link (ex: https://youtu.be/-tWkgDQQAcc?si=HgjIOxzdHLdflVmP). I think it’s always 11 characters long; did 3 videos with it and seems to be the case. Also gonna emphasize that you should only put the ID in the bolded areas; don’t accidentally paste it over the ? in that one area lolol (speaking from experience)


Report Reply

Reply by Bones 0-\\

posted

@Gluma thank you so much, I will try that!


Report Reply

Reply by Bones 0-\\

posted

Update:

So, the loop seems to work fine (I had to make a few changes with the coding to get it to work properly), but I'm still having issues with auto-play. Basically, after I'm done editing my profile and click "view profile" it auto plays, but after that it just doesn't work anymore. I've sent the link to my profile to my friends multiple times to know if it was a problem on my end, every time they all said no music was playing. So the it only works once.

If it helps, I can paste the code I'm using


Report Reply