Unfortunately, some people have encountered an error stating that your browser does not support audio element error despite all these improvements.
That notwithstanding, we still do not have a single codec that supports all browsers. However, HTML5 allows developers to specify different sources of audio files to get around the problem of codec incompatibility.
This way, the browser looks for the type of audio element that it can support.
What browsers support the audio element?
As discussed above, different browsers support different types of audio. You cannot find an audio codec that is supported across all browsers. That notwithstanding, there are browsers that support the audio element;
- Firefox 5 and above supports Ogg and Wav.
- Internet Explorer 6 and above supports MP3 and AAC.
- Safari 5 and above supports MP3, WAV, and AAC.
- Chrome 12 and above supports AAC, Wav, MP3, and Ogg.
- Opera 11 and above supports Wav and Ogg.
Audio element support has been improving with every release of a new version of browsers. However, you should be careful with your browsers to ensure that they support your audio elements. But what do you do when the browser you are using does not support the audio element?
How do I enable audio in HTML?
The HTML <audio> element is used to enable audio or play an audio file on a web page. For you to enable audio, you need to make sure that you have specified different sources for the audio file.
The browser chooses the first format that it can recognize. Here is an example of an HTML code with audio sources;
<audio controls> <source src="myaudio.ogg" type="audio/ogg"> <source src="myaudio.mp3" type="audio/mpeg"> <source src="myaudio.wav" type="audio/wav"> </audio>
If you want to have an up-to-standard experience when browsing online, we recommend you use OperaGX. It supports <audio> element and everything HTML5.
In fact, it’s actually built to offer a good multimedia experience, both for gaming and streaming. It includes light-dark modes, a CPU and RAM limiter for better performance, as well as a free VPN.
Get industry-standard features for secure and uninterrupted browsing, on any platform!
How can I fix the Your Browser Does Not Support Audio Element error?
1. Check your audio sources on HTML
- Open your code using a code editor.
- Navigate to the lines of code where you have specified the audio sources.
<audio controls> <source src="audiofile.mp3" type="audio/mpeg"> <source src="audiofile.ogg" type="audio/ogg"> <!-- add more audio sources here --> <!-- fallback for non supporting browsers goes here --> <p>Your browser does not support HTML5 audio</p> </audio>
- Ensure that you have different audio codecs for your browser to choose from.
2. Check if the web page is muted
- Visit the web page where you are supposed to listen to some audio.
- Right-click on the tab opening that particular web page.
- Check if the site is muted, and then select unmute site.
3. Allow sites to play sound on Chrome
- Launch Chrome and click on the three dots at the top right corner.
- Scroll down and select settings on the drop-down menu.
- Click Privacy and security and then select Site settings.
- Scroll down to Content and then expand the additional content settings.
- Scroll down and select Sound.
- Allow sites to play sound button should be on.
Do all browsers support audio elements?
Different browsers support different audio codecs. You will rarely find a single audio codec that works well on all browsers without any problems.
If you are facing a problem with your browser not supporting audio elements, one of the solutions shared above should solve the problem for you. You can also use browser audio players to test your audio on browsers.
If you have any more questions or suggestions, feel free to leave them in the comments section below and we’ll make sure to check them out.