How to add holiday background music with mute button / volume control
You can add the following custom code:
<audio controls autoplay> <source src="your-file-url" type="audio/mpeg"> Your browser does not support the audio element. </audio>
Change the “your-file-url” part for the url where you have your file stored.
And where should I paste the code? The footer? In a blank div block? and I’m placing the position fixed… Last question. Is it going to load for each page?
Whenever you need the song to play add the custom code element from the components panel and inside of it add the code.
If you want to replicate the same in different pages I would suggest to create a symbol of this component and add it to the whatever pages you need.
Hope this helps.
I’m having issues with the custom code included in this thread.
I’ve attempted to place the code under the “custom code” section of my home page with no luck. I pasted the code below that I’m using:
Could it be that I’m trying to pull audio from Spotify using the URL and not using the embed or URI instead? If I can’t pull from Spotify, where can I pull music that I own on iTunes or use in Spotify?
I’d prefer download Spotify songs with a spotify song downloader I’d collect songs my family members love and download them all.
hi. this doesn’t work. or maybe if you could tell where you need to upload a file to source it from with this code.
it also creates a visual audioplayer. maybe you know how to let music just playing on the background without an option to pause?
I also put my Spotify music as the holiday background music via a tool. It is DRmare Spotify Music Converter, which can keep Spotify music as local audios and allows to use Spotify music easily.