Home › Forums › WordPress General Questions › How to embed background music in my WordPress site?
I have a client who wants me to embed a background music that auto plays when a person visits her website. I was wondering anyone has experience on how to do it?
It is possible, not recommend for user experience. Also some browsers will block autoplaying.
Plus it will stop playing when you switch page
You can likely do it using the <audio> tag in a Code Block: https://www.w3schools.com/tags/att_audio_autoplay.asp.
However, as mentioned by Taylor, some browsers will prevent it from playing.
Thank you Soph and Taylor