Skip to content


HTML embed an audio clip and repeat / loop it

I needed to loop an audio clip for a friends static web page. I found out that there are so many idosyncracies to take into account with various browsers.
Here’s how to do it with an mp3

ok so

1. The header contains the tag

enclosed within a tag

This is used in older browsers that do not support the tag

2. The tag

is used with the correct parameters to call the sound autoplay it and loop it
3. The

supported by pretty much anything is there just in case the browser is not IE and does not support the tag

The only other alternative is to do the following

Posted in HTML.


2 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Rob Oresteen says

    Hi.

    thank you for this tutorial. I am half-way there, I just can’t seem to get it to loop. It plays the intial clip then stops.

    I have checked src pointers and url’s and they seem right.

    Thank you,

    Rob

  2. Vineen Manarang says

    Hello Andre,

    I’m in the same situation with Rob. The music plays but it does not loop or repeat. Also, do you have any tutorial wherein I can embed a music playlist instead of mp3?

    Regards,
    Vineen



Some HTML is OK

or, reply to this post via trackback.