Question

I have a simple setup. I have the file embedded with audio tags, and then a link that when clicked on, will play that sound. Here is my code for one of the sounds.

<audio id="AFool" src="sounds/A Fool.wav" preload="auto"> </audio>
<a onclick="document.getElementById('AFool').play()" preload="auto" > <p>A Fool</p></a>

I am running Firefox 26.0 on a Mac OSX 10.8.5. This code works on both safari and chrome. Any help would be greatly appreciated.

Was it helpful?

Solution

Based on the details, here are a few things that could be wrong:

  1. The WAV file might be encoded using an unsupported codec. According to this page about media formats that Firefox supports, WAV files need to be raw PCM data.
  2. According to the same page, the MIME type needs to be set correctly in order for Firefox to honor the audio file. Either the web browser needs to deliver the correct MIME type, or you need to specify the type attribute in the <audio> tag.

Note that the QuickTime plugin should not be in play at any point here.

OTHER TIPS

Make sure you have quicktime plugin set as the handler for WAV files, in options -> applications.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top