start #

Most browsers will not play any audio until a user clicks something (like a play button). Invoke this method on a click or keypress event handler to start the audio context. More about the Autoplay policy here


import * as Tone from "tone";
document.querySelector("button").addEventListener("click", async () => {
	await Tone.start();
	console.log("context started");
});
start ( ) => Promise<void >