I'm currently working on an audio player based on the html5 audio tag using javascript for a project. I am asked to handle audio quality (as you would see on YouTube for videos). I guess, the only way to do it is to have multiple source files (for instance a SQ mp3 + HQ mp3 / SQ ogg + HQ ogg + wav) and change it with javascript, but I was wondering how, and if it was the best option.
Any help would be appreciated. Thanks !