sound is actually very difficult to implement in a web browser (or at least web-based, i.e. not a mobile device). This is because a browser can’t render web audio without some sort of codec (which can include plugins and codecs), and browsers are far from capable of handling all of the audio formats that browsers support.
I see it as a “web sound” issue that is only going to be solved in web browsers that are able to render web audio without plugins and/or codecs. Chrome is one of those browsers.
The browser is the last thing I want to discuss, so I’ll only cover the codec issue. As it turns out sound is not a codec in Chrome (although Chrome has other codec issues as well). Sound is not just the ability to play audio files. It is a way to play a particular format of sound file.
It is possible to play audio files without a plugins and codec. Theoretically, this should be possible in any browser that supports Web Audio. There is no way of playing web audio without any plugin and/or codec. But browsers have to support sound formats before this can happen.
In other words, if you’re using Chrome, you don’t have to worry about this. But you should, because it’s not a codec issue. If there is a codec issue in Chrome, it’s not a codec problem.
In general, if you want to run sound without using a codec, you can use a tool called ffmpeg’s wav2-decoder. It will decode your sound in any browser that supports Web Audio.
FFMpeg uses WebAudio to decode WebAudio audio, which is why it will work in Chrome, but Opera, Safari, and Firefox can’t. If Firefox and Chrome support WebAudio, then the FFMpeg decoder will work for you. But Firefox and Chrome do not support WebAudio. So if you want to play audio in Firefox, you will need to use another tool.
Firefox and Chrome do not support WebAudio, so we can’t make any audio in Firefox or Chrome. Because FFMpeg is an old audio tool from the 90s, we do not recommend using it. The FFMpeg decoder will only work on WebAudio devices, which we know are not browsers. But if you want to use FFMpeg, you can do so using the sound.js library, which is a JavaScript library that works with WebAudio.
This is a pretty good example of the old adage, “if it’s not there, it just doesn’t exist.” The FFMpeg documentation explains that Firefox does not support WebAudio, which is why you need to use another tool.
We were all using flash to play sound. We weren’t all using flash to play sound. The FFMpeg decoder allows you to use sound, but it will not work with WebAudio.