+ 7

Why Should I Use audio.ogg"

Gentlemen Hey =) ! I Want To Ask Why Why Use : <source src="audio.ogg" type="audio/ogg"> ?? Why not just use <audio controls> <source src="myaudio.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> and Thanks = )

2nd Mar 2018, 5:21 PM
Yousef Eabitan
Yousef Eabitan - avatar
2 Réponses
+ 5
The .ogg support comes integrated by default in many browsers (or at least in all popular browsers). Its use is recommended precisely because of this, since regardless of the platform or browser, the user will have a way to decode the file, which is equivalent to being able to listen to it. MP3 is a private format (I do not know if this is the case, since there was news about it), and because of license issues, many platforms do not include the codecs necessary for their reproduction. The user must install them and not everyone is interested in doing so.
2nd Mar 2018, 5:45 PM
Mickel
Mickel - avatar
+ 4
because of different OS supports, ++on linux/Mac it will recognized .ogg ++on windows it will recognized .mp3 thus, using both of them make your website versatile to use on both OS's
2nd Mar 2018, 5:28 PM
Nura Programmer
Nura Programmer - avatar