{{ 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)}} |