OfflineAudioContext: complete event

这篇翻译不完整。请帮忙从英语翻译这篇文章

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

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
complete eventChrome Full support 14Edge Full support 12Firefox Full support 25IE No support NoOpera Full support 15Safari Full support 6WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 26Opera Android Full support 14Safari iOS ? Samsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

See also

文档标签和贡献者

此页面的贡献者: ewfian, ljx23136138
最后编辑者: ewfian,