MDN self-hosted library · e01.org

OfflineAudioContext: complete event

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
const offlineAudioCtx = new OfflineAudioContext(2, 44100 * 40, 44100);

offlineAudioCtx.addEventListener("complete", () => {
  console.log("Offline audio processing now complete");
  alert("Song processed and ready to play");
  playBtn.disabled = false;
});
js
const offlineAudioCtx = new OfflineAudioContext(2, 44100 * 40, 44100);

offlineAudioCtx.oncomplete = () => {
  console.log("Offline audio processing now complete");
  alert("Song processed and ready to play");
  playBtn.disabled = false;
};