The oncomplete event handler of the OfflineAudioContext interface is called when the audio processing is terminated, that is when the complete event (of type OfflineAudioCompletionEvent) is raised.


var offlineAudioCtx = new OfflineAudioContext();
offlineAudioCtx.oncomplete = function() { ... }


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

offlineAudioCtx.oncomplete = function() {
  console.log('Offline audio processing now complete');
  showModalDialog('Song processed and ready to play');
  playBtn.disabled = false;


Specification Status Comment
Web Audio API
The definition of 'oncomplete' in that specification.
Working Draft

Browser compatibility

BCD tables only load in the browser

See also