Back to Content

OfflineAudioContext: resume() method

files/en-us/web/api/offlineaudiocontext/resume/index.md

latest725 B
Original Source

{{ 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.

Syntax

js-nolint
resume()

Parameters

None.

Return value

A {{jsxref("Promise")}} resolving to {{jsxref('undefined')}}.

Exceptions

The promise is rejected when an exception is encountered.

  • InvalidStateError {{domxref("DOMException")}}
    • : Returned if the context is not currently suspended or the rendering has not started.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}