In the Web Audio API you can use an Audio element as a source AudioNode.
In this example, the sound source is an Audio element that's brought into the AudioContext as a MediaElementSourceNode.
It's connected to a GainNode so that it can be smoothly faded in and out.
This page was last modified April 29, 2020
by Christopher Dobrian, dobrian@uci.edu