aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/offlineaudiocontext/complete_event/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/api/offlineaudiocontext/complete_event/index.html')
-rw-r--r--files/zh-cn/web/api/offlineaudiocontext/complete_event/index.html82
1 files changed, 82 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/offlineaudiocontext/complete_event/index.html b/files/zh-cn/web/api/offlineaudiocontext/complete_event/index.html
new file mode 100644
index 0000000000..139b6d9030
--- /dev/null
+++ b/files/zh-cn/web/api/offlineaudiocontext/complete_event/index.html
@@ -0,0 +1,82 @@
+---
+title: 'OfflineAudioContext: complete event'
+slug: Web/API/OfflineAudioContext/complete_event
+translation_of: Web/API/OfflineAudioContext/complete_event
+original_slug: Web/API/OfflineAudioContext/complete
+---
+<p><font><font>{{DefaultAPISidebar("Web Audio API")}}</font></font></p>
+
+<p><code>complete</code><font><font>当离线音频上下文的呈现完成时,将触发{{domxref("OfflineAudioContext")}}接口</font><font>的</font><font>事件。</font></font></p>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row"><font><font>泡泡</font></font></th>
+ <td><font><font>没有</font></font></td>
+ </tr>
+ <tr>
+ <th scope="row"><font><font>取消</font></font></th>
+ <td><font><font>没有</font></font></td>
+ </tr>
+ <tr>
+ <th scope="row"><font><font>默认操作</font></font></th>
+ <td><font><font>没有</font></font></td>
+ </tr>
+ <tr>
+ <th scope="row"><font><font>接口</font></font></th>
+ <td><font><font>{{domxref( "OfflineAudioCompletionEvent")}}</font></font></td>
+ </tr>
+ <tr>
+ <th scope="row"><font><font>事件处理程序属性</font></font></th>
+ <td><font><font>{{domxref( "OfflineAudioContext.oncomplete")}}</font></font></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="例子"><font><font>例子</font></font></h2>
+
+<p><font><font>处理完成后,您可能希望使用</font></font><code>oncomplete</code><font><font>处理程序提示用户现在可以播放音频,并启用播放按钮:</font></font></p>
+
+<pre class="brush: js"><font><font>offlineAudioCtx.addEventListener('complete',()=&gt; {</font></font>
+ console.log('Offline audio processing now complete');
+ showModalDialog('Song processed and ready to play');
+ playBtn.disabled = false;
+})</pre>
+
+<p>You can also set up the event handler using the {{domxref("OfflineAudioContext.oncomplete")}} property:</p>
+
+<pre class="brush: js">offlineAudioCtx.oncomplete = function() {
+ console.log('Offline audio processing now complete');
+ showModalDialog('Song processed and ready to play');
+ playBtn.disabled = false;
+}</pre>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Web Audio API', '#OfflineAudioCompletionEvent-section', 'OfflineAudioCompletionEvent')}}</td>
+ <td>{{Spec2('Web Audio API')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+
+
+<p>{{Compat("api.OfflineAudioContext.complete_event")}}</p>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li><font><font>{{domxref( "离线音频上下文.oncomplete")}}</font></font></li>
+ <li><a href="/en-US/docs/Web_Audio_API" title="/en-US/docs/CSS/Using_CSS_animations"><font><font>Web Audio API</font></font></a></li>
+</ul>