Initialize WebAudio instance.
The source for the audio element.
Whether or not WebAudio is supported.
Gets the audio context.
Gets the master node.
Gets the music node.
Gets the sound effects node.
Fades out playing sounds.
Mutes the master node.
Plays the audio element.
Pauses the audio element.
Provides support for playing sounds using the Web Audio API.
const audio = new WebAudio('assets/sounds/theme.ogg') if (!audio.hasWebAudio) { // Do something else for sounds. } audio.master.value = .3 // Low volume audio.play()