HTML5 Audio Function: Browser Compatibilities
So the only thing better than looking at a website is LISTENING to sounds on a website right?
Well hold your horses there kid, you still have some things you have to understand before you start throwing sound clips on your website.
In today’s world we are all faced with technical issues concerning compatibility problems. Whether it be a driver for a printer, software that varies from Mac to Windows to Linux, or even an app for a smartphone, compatibility is a problem all developers have to overcome.
Before you go around putting audio objects all round your website, you should know that the different formats of audio can only b played in certain browsers. What this means for you is, you will more than likely have to add an extra line or two of code, as well as reformat your audio file in order to be cross compatible.
The table below shows the break down of compatibility of audio formats:
|Internet Explorer 9||YES||NO||NO|
|Google Chrome 6||YES||YES||YES|
|Apple Safari 5||YES||YES||NO|
What you have to do is make sure your audio files are supported by the desired browsers by checking their compatibility with their format. Luckily, with the new HTML5 audio tag, you can add two or more lines of code tracing to the different formats you have saved on your file server.
Before you post any audio to your website, you should make sure it will be able to be compatible in the browsers you are trying to use.