« Web, HTML, Tech Forum

★ HOW TO AUTO-PLAY MUSIC ON YOUR PROFILE ★ [Step by Step Guide]

Posted by MARBLE_EYES43

posted
updated

Forum: Web, HTML, Tech

Background music is often desired by a multitude of users. It adds a lot more character to a profile and makes the place a bit less empty while looking through it!

I see a lot of other users requesting help to set up their own profile music when it's very simple to do so!

It's as easy as 2 Copy and Pastes!


// Step 1 // Paste this HTML code in any of your Blurb on your profile.


<iframe width="560" height="315" src="https://www.youtube.com/embed/(VIDEO URL)?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>


// Step 2 // Copy the desired YouTube video link and take a specific part of the URL.

https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley


// Step 3 // Once you got that, paste it away in the bold section of the script.

<iframe width="560" height="315" src="https://www.youtube.com/embed/(VIDEO URL)?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>


Results should look like this

<iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ?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>


And Voila! You should successfully have a working auto-playing page!

And for the people who wish to not have the video visible and keep it to nothing but background music, only 2 things needs to be changed in the HTML code.



// With Video Display //

<iframe width="560" height="315" src="https://www.youtube.com/embed/(VIDEO URL)?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>


// Without Video Display //

<iframe width="
0" height="0" src="https://www.youtube.com/embed/(VIDEO URL)?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>


There you go! I hope this was able to help some people!
If you liked this guide, make sure to interact with the Forum Topic to make some traction! Would help a lot! 

(edit #1) [03-03-2024]

I've heard a lot of users seems to be struggling with the auto play feature. The current HTML code is supposed to auto play it in most browsers. However, some users that are using Firefox might experiences some issues! I don't use Firefox, but I've heard it might be a very easy fix. Make sure you have auto play enabled in your browser settings!

(edit #2) [03-04-2024]

Additional information for you folks out there, after seeing the comments on this Forum, I've notice one that quotes:

This only partially works. After your done editing your profile and you click "view profile" it auto-plays, but after that it just doesn't work anymore. I've sent the link of 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. It only works once."

To start off to this reply, thank you for letting me aware of the situation!


After a few updates with Spacehey, I think something changed. I did notice that once I refresh my page, the auto-player doesn't seem to work! I believe that's because the page is already loaded somewhat. As soon as I direct my browser to another page THEN load my profile back in, the music seems to be playing as intended!

The player works, but only every time you load a page. Refreshing it seems to not be helpful to that regard. At least, to me. Let me aware if your browsers have indeed auto-play enabled and if re-loading your profile doesn't seem to fix the issue! 


Report Topic

19 Replies

Sort Replies:

Reply by Louisa ♥︎

posted

Is there a way to loop the songs?


Report Reply

Reply by MARBLE_EYES43

posted

In the code line itself, it says "loop". There's probably a correct wording to be put around that line. I'll IM you if I find a way.

The best solution I can give you for the time being, select a song, but look for someone who made a lengthy loop of it on youtube. Like a 10h loop


Report Reply

Reply by Martin C.

posted

I truly appreciate this! But Its still not autoplaying for me...


Report Reply

Reply by Boogley

posted

Don't know if anyone else is using firefox but you gotta make sure you allow autoplay for audio and media. That was my mistake cx


Report Reply

Reply by Donnie

posted

Thanks! I think im just doing something wrong but im gonna figure this out soon!


Report Reply

Reply by ladybug 🐞

posted

thank you now i can use john hutcherson whistle 


Report Reply

Reply by JC☆

posted

thank you!!!


Report Reply

Reply by ⤷ Alastor.

posted

it worked! thank you


Report Reply

Reply by Asher X3c

posted

Well I did it but I can't hear it, is it supposed to do that?


Report Reply

Reply by LegoLuigi

posted

thx now theres first round from gorilla night battle playing in my bg :D


Report Reply

Reply by Yula Ketamine

posted

Reply by Matt

posted

I can use a playlist


Report Reply

Reply by ☼𝐀𝐙𝐑𝐀𝐄𝐋⊕

posted

this only partially works. after your done editing your profile and you click "view profile" it autoplays, but after that it just doesnt work anymore. ive sent the link of my profile to my freinds multiple times to know if it was a problem on my end, everytime they all said no music was playing. it only works once.


Report Reply

Reply by Amina Seymone

posted

Thank you so much. I am truly grateful.


Report Reply

Reply by PostalDumbass

posted
updated

the loading thing doesn't seem to be an issue on my end. i can refresh the page multiple times and my song plays. probably seems to be dependent on browser instead of the site itself, as i use firefox (i assume its the latest version of it as of posting this). whoever reported that issue might be using another browser like chrome or opera gx, and those browsers might work differently with things such as reloading all of the code on a website on refresh. though i dont recall my music playing.


Report Reply

Reply by hello kwitti <33

posted

If you want to loop the music, find a long version of the song you want to play. don't do anything to the code (obviously change the (VIDEO URL) part to ur videos URL) and go to ur page and double click the video and click loop! (this only works for computer/pc users!! sorry!)


Report Reply

Reply by MARBLE_EYES43

posted

Replying to DwemeriOddity,

Some YouTube videos have a weird link. It seems longer and more complex for some reason. to make sure you got a link that WILL be valid.


Here's an example of a link may have more things that will render the text null if not copied correctly.


This would be what 
https://www.youtube.com/watch?v=rw392gowFu4&t=2455s


To be sure to have the right piece of HTML, head over to the sharing button under the video itself and click the "embed" option.
It should give you something similar as the code in the forum.

<iframe width="560" height="315" src="https://www.youtube.com/embed/rw392gowFu4?si=Z_Z4VX07Wj3SOZ-s" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

This should be easier to get working links!


Report Reply

Reply by Aero/space

posted

Thank you so much!! I am using Firefox and I didn't know that the browser automatically blocks autoplay, you're life saver!


Report Reply

Reply by Mew

posted

omg thank you ..the problem i had because it was wrong link without the video yay it finally works


Report Reply