OfflineAudioContext.oncomplete
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.
Syntax
var offlineAudioCtx = new OfflineAudioContext(); offlineAudioCtx.oncomplete = function() { ... }
Example
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; }
Specifications
Specification |
---|
Web Audio API # dom-offlineaudiocontext-oncomplete |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
oncomplete |
25 |
12 |
25 |
No |
15 |
6 |
≤37 |
25 |
25 |
14 |
6 |
1.5 |
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/oncomplete