Guest Posted January 4, 2020 Share Posted January 4, 2020 According to; https://www.w3schools.com/html/html5_audio.asp Edge/IE doesn't support WAV in the AUDIO element. Is that true? Does a recent version of Edge/IE actually support WAV in AUDIO? I would prefer not to have to convert my WAV files to MP3. Thanks for answers. Link to comment Share on other sites More sharing options...
Ingolme Posted January 5, 2020 Share Posted January 5, 2020 I'm pretty sure that's true. Even if it were supported, I would recommend never using WAV because WAV files are uncompressed and would take up a whole lot of data/bandwidth for your users. Link to comment Share on other sites More sharing options...
Guest Posted January 6, 2020 Share Posted January 6, 2020 According to; https://www.w3schools.com/html/html5_audio.asp Edge/IE, Chrome, Firefox, Safari, Opera all support MP3 files. Chrome, Firefox, Safari, Opera support WAV files. However Edge/IE do not support WAV files. I have coded a small HTML page at; http://c-compiler.com/myfiles/mywav.html which contains the code Quote <audio controls> <source src="stgeorges-201219.wav" type="audio/wav"> Your browser does not support the audio element. </audio> When I load this page in MSIE, it says; "invalid source" When I load this page in Chrome, it gives a progress bar which doesn't work, without any way of actually hearing the WAV file. When I load this page in Firefox, it gives a similar result to Chrome. What is the reason for Chrome / Firefox not being able to play the WAV file? I have coded a second small HTML page at; http://c-compiler.com/myfiles/mymp3.html which contains the code Quote <audio controls> <source src="stgeorges-201219x.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> When I load this page in MSIE, Chrome and Firefox, it works fine for all three. I suppose it's unequivocal that my website should use MP3, which works well for all browsers tested, and not WAV, which doesn't work at all in IE and doesn't work properly in Chrome and Firefox. Perhaps Ingolme or another web coding expert could confirm that my understanding of this issue is correct. Thank you. Link to comment Share on other sites More sharing options...
Ingolme Posted January 6, 2020 Share Posted January 6, 2020 Firefox says "Media resource http://c-compiler.com/myfiles/stgeorges-201219.wav could not be decoded." I'm not an expert in audio and video encoding, it's a complicated subject, but I would guess that the encoding used by the WAV file was not supported by the browser. According to this mozilla ticket: https://support.mozilla.org/en-US/questions/1228379 Quote There are lots of options (number of channels, sample rate) for creating WAV files and Firefox doesn't support them all, only a small set of commonly used formats is supported. So you can try to use two channels and 48k sampling rate. Link to comment Share on other sites More sharing options...
Guest Posted January 7, 2020 Share Posted January 7, 2020 11 hours ago, Ingolme said: Firefox says "Media resource http://c-compiler.com/myfiles/stgeorges-201219.wav could not be decoded." I'm not an expert in audio and video encoding, it's a complicated subject, but I would guess that the encoding used by the WAV file was not supported by the browser. According to this mozilla ticket: https://support.mozilla.org/en-US/questions/1228379 My WAV file is on an ADPCM codec, which is not decoded in MS IE, and apparently not in Firefox either. I would like to verify that I should not use WAV in the AUDIO element, that I should use MP3. Please could you confirm that for me. Link to comment Share on other sites More sharing options...
Ingolme Posted January 7, 2020 Share Posted January 7, 2020 Internet Explorer does not support WAV, other browsers do. If it's just for browser compatibility you can use WAV files if you don't care to support Internet Explorer or Microsoft Edge. As for whether you should use it, I would recommend against it. The files take longer to load for the user and they take up a lot more bandwidth on the user's end. Many people have data caps, so it is a good idea not to waste it unnecessarily. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now