Adding a small sound file

Hi, I have a small (66KB) WAV file I want to add to a web page. I can convert it to another file type if required. Ideally I would like it to play when an image is clicked on but, at least, to be able to play it when a button is clicked on. I am not going to be in the habit of adding sound to sites and this may even be a one off. I have been unable to find a way to do this but I appreciate that I have probably been looking in all the wrong places. Can anyone suggest a simple way to get this done? Thanks.

This is what I ended up doing for a site. I’m sure there are other ways though…
I added an html stack and added the following:

<audio src="" preload="auto"></audio>
<div class="buttonWrapper">
  <div class="button">BUTTON TITLE</div>

This was for a button and I got it off of codepen, I believe. I also used an mp3, but I imagine a wav would work fine.

1 Like

If you use Stacks there are several ‘player’ options. These players will generally offer Start / Stop / Pause and Volume controls. Off the top of my head you can get audio player stacks from Stacks 4 Stacks, Weaverspace, Doobox and a number of others. Some are suitable for single tracks and others offer multiple audio tracks

I have an HTML5 audio stack. I am sure that we could get this hooked up to a button if you wanted to…

This topic has been discussed here:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.