Play local audio file from disk

Is there a way to play a local audio file from disk. I know how to use the audio tag and I know how to load a file into an audiobuffer but both of these methods result in the file being loaded into RAM. For small files this is not a problem but I want to deal with multiple files that are up to 1GB each.

Thank you.

Using vanilla Audio objects (e.g. the programmatic version of ) streams files from disk efficiently and automagically, and does not load the entire file into RAM. Perhaps unless you were doing something special with your audio tag or elsewhere in your app that explicitly caused the entire file to be loaded (for example using data urls). Just tested on Windows simultaneously loading and playing 2GB of 32-bit .wavs and large .mp3s while watching the app’s RAM usage in Task Manager and they played beautifully while only adding <50MB to the app’s memory usage.

var audioobj = new Audio(filepath);
audioobj.play();