Two independent audio files are loaded and played on start. Audio 1 has volume 100%. Audio 2 has volume: 0%.
On a switch, audio 1 decreases and audio 2 increases its volume slowly until audio 1 reaches 0% and audio 2 reaches 100%, and vice-versa.
This method has the disadvantage that the two audio streams might get out of sync over time, especially if the audio is looped.
The browser might block autoplay, so it has to be allowed first. Clicking on "Reload audio" will refresh the page to reload the audio streams.
The used music files belong to Nintendo.