A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/complete_event below:

OfflineAudioContext: complete event - Web APIs

OfflineAudioContext: complete event

Baseline Widely available

The complete event of the OfflineAudioContext interface is fired when the rendering of an offline audio context is complete.

This event is not cancelable and does not bubble.

Syntax

Use the event name in methods like addEventListener(), or set an event handler property.

addEventListener("complete", (event) => { })

oncomplete = (event) => { }
Event type Event properties

Also inherits properties from its parent, Event.

OfflineAudioCompletionEvent.renderedBuffer Read only

An AudioBuffer containing the result of processing an OfflineAudioContext.

Examples

When processing is complete, you might want to use the complete event handler to prompt the user that the audio can now be played, and enable the play button:

const offlineAudioCtx = new OfflineAudioContext();

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

You can also set up the event handler using the oncomplete property:

const offlineAudioCtx = new OfflineAudioContext();

offlineAudioCtx.oncomplete = () => {
  console.log("Offline audio processing now complete");
  showModalDialog("Song processed and ready to play");
  playBtn.disabled = false;
};
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3