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.