Skip to main content
Participant
July 3, 2024
Question

Insert MP3 as background

  • July 3, 2024
  • 1 reply
  • 145 views

Hi,

i'm pretty new to DW and I was trying to add a background music for the page I am creating. I inserted an HTML 5 Audio, I have the mp3 saved on my computer (and also uploaded on Altervista) but when I do a preview of the page the music doesn't start. I tried to use the Properties with Autoplay, Loop and so on but still doesn't work.

What I wrote in the code is the following:

 

<audio controls="controls" autoplay="autoplay" loop="loop" >
<source src="The Misty Mountains Cold - The Hobbit.mp3" type="audio/mp3">
<source src="https://ajknivv.altervista.org/CertificatiForgia/The_Misty_Mountains_Cold_-_The_Hobbit.mp3" type="audio/mp3">
</audio>

 

Please help if you can, would be much appreciate it.

    This topic has been closed for replies.

    1 reply

    Nancy OShea
    Community Expert
    Community Expert
    July 3, 2024

    Forget about it.  'Autoplay' won't work on most devices without user input.  'Autoplay' is considered invasive. Many people have 'autoplay blockers' enabled for just that reason. They don't appreciate 1) gratuitous noise and 2) unwanted bandwidth consumption.  Media should always be the user's choice.

     

    See below for more details.

    https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide

     

    Nancy O'Shea— Product User & Community Expert