background once the user loads the website?
This is my code:
<audio id="myAudio" controls autoplay>
<source src="audio.mp3" type="audio/mpeg">
</audio>
<script>
function myFunction() {
let x = document.getElementById("myAudio").autoplay;
}
</script>
https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide
It seems to be correct, have u checked the console? Can u put it on codepen?
Обсуждают сегодня