Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1031686 of OfflineAudioContext.resume()

  • Revision slug: Web/API/OfflineAudioContext/resume
  • Revision title: OfflineAudioContext.resume()
  • Revision id: 1031686
  • Created:
  • Creator: PushpitaPikuDey
  • Is current revision? No
  • Comment

Revision Content

{{ APIRef("Web Audio API") }}

The resume() method of the {{ domxref("OfflineAudioContext") }} interface resumes the progression of time in an audio context that has been suspended. The promise resolves immediately because the OfflineAudioContext does not require the audio hardware. If the context is not currently suspended or the rendering has not started, the promise is rejected with InvalidStateError.

Syntax

OfflineAudioContext.resume().then(function() { ... });

Parameters

None.

Returns

A {{jsxref("Promise")}} resolving to void.

Exceptions

The promise is rejected when the following exception is encountered.

  • {{exception("InvalidStateError")}}  if the context is not currently suspended or the rendering has not started. 

Specifications

Specification Status Comment
{{SpecName('Web Audio API', '#widl-OfflineAudioContext-resume-Promise-void', 'resume()')}} {{Spec2('Web Audio API')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatChrome(49.0)}}        
Feature Android Android Webview Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support {{CompatNo}} {{CompatChrome(49.0)}}           {{CompatChrome(49.0)}}

Revision Source

<p>{{ APIRef("Web Audio API") }}</p>

<p>The <strong><code>resume()</code></strong> method of the {{ domxref("OfflineAudioContext") }} interface resumes the progression of time in an audio context that has been suspended. The promise resolves immediately because the <code>OfflineAudioContext</code> does not require the audio hardware. If the context is not currently suspended or the rendering has not started, the promise is rejected with <code>InvalidStateError</code>.</p>

<h2 id="Syntax">Syntax</h2>

<pre class="syntaxbox">
OfflineAudioContext.resume().then(function() { ... });</pre>

<h3 id="Parameters">Parameters</h3>

<p>None.</p>

<h3 id="Returns">Returns</h3>

<p>A {{jsxref("Promise")}} resolving to void.</p>

<h3 id="Exceptions">Exceptions</h3>

<p>The promise is rejected when the following exception is encountered.</p>

<ul>
 <li>{{exception("InvalidStateError")}} &nbsp;if the context is not currently suspended or the rendering has not started.&nbsp;</li>
</ul>

<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', '#widl-OfflineAudioContext-resume-Promise-void', 'resume()')}}</td>
   <td>{{Spec2('Web Audio API')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<div>{{CompatibilityTable}}</div>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatChrome(49.0)}}</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Android Webview</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>Firefox OS</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
   <th>Chrome for Android</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatChrome(49.0)}}</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>{{CompatChrome(49.0)}}</td>
  </tr>
 </tbody>
</table>
</div>
Revert to this revision