A HTML/CSS/Javascript-only audio player that allows you to toggle between two versions of the same audio file - with NO dependencies.
What's it for? One pratical reason is the side-by-side comparison of different audio mixes/production processes.
Built with only HTML, CSS, and Javascript.
- Simply add two audio files to the assets folder (HTML supports MP3, WAV, and OGG). The files must have the same duration to work correctly.
- Update ab-player.js with the location/filenames
soundA.src = "./assets/[YOUR_FILE_A].mp3"; soundB.src = "./assets/[YOUR_FILE_B].mp3";
- There are some caveats with different browsers handling how the audio file is preloaded, muted, etc. Test thoroughly for production use.
Distributed under the MIT License. See LICENSE.txt
for more information.
If you do use it, let me know - I'd love to see it in action!