Search code examples
htmlmicrosoft-edgebackground-music

Why don't the "hidden" and "loop" attribute do anything?


Ok, i pretty much just finished my tetris game. So now i wanted to implement the music - which i did like this: <embed src="Tetris.mp3" autostart="true" loop=infinite hidden="true">

Now, the autostart works, but the music doesn't loop after it ends, and also the music player isn't hidden. I'm using Microsoft Edge, by the way.


Solution

  • It should be like this

    <audio controls autoplay loop hidden>
      <source src="Tetris.mp3" type="audio/mpeg">
    </audio>