complete
当离线音频上下文的呈现完成时,将触发OfflineAudioContext
接口的事件。
泡泡 | 没有 |
---|---|
取消 | 没有 |
默认操作 | 没有 |
接口 | OfflineAudioCompletionEvent |
事件处理程序属性 | OfflineAudioContext.oncomplete |
例子
处理完成后,您可能希望使用oncomplete
处理程序提示用户现在可以播放音频,并启用播放按钮:
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 OfflineAudioContext.oncomplete
property:
offlineAudioCtx.oncomplete = function() {
console.log('Offline audio processing now complete');
showModalDialog('Song processed and ready to play');
playBtn.disabled = false;
}
Specifications
Specification | Status | Comment |
---|---|---|
Web Audio API OfflineAudioCompletionEvent |
Working Draft |
Browser compatibility
BCD tables only load in the browser
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.