myAudioElement.addEventListener("canplaythrough", (event) => {
/* the audio is now playable; play it if permissions allow */
myAudioElement.play();
});HTMLAudioElement: Audio() constructor / notebook
HTMLAudioElement: Audio() constructor
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.