Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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