OfflineAudioContext.resume()
The resume() method of the 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 Promise resolving to void.
Exceptions
The promise is rejected when the following exception is encountered.
-
InvalidStateErrorif the context is not currently suspended or the rendering has not started.
Specifications
| Specification |
|---|
| Web Audio API # dom-offlineaudiocontext-resume |
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
resume |
49 |
14 |
No |
No |
36 |
14.1 |
49 |
49 |
No |
36 |
14.5 |
5.0 |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/resume