AudioContext
The AudioContext
interface inherits from BaseAudioContext
.
It is responsible for supervising and managing audio-processing graph.
Constructor
new AudioContext()
new AudioContext(options: AudioContextOptions)
Errors
Error type | Description |
---|---|
NotSupportedError | sampleRate is outside the nominal range [8000, 96000]. |
Methods
close
The above method lets you close the audio context, releasing any system audio resources that it uses.
Returns Promise<undefined>
.
suspend
The above method lets you suspend time progression in the audio context. It is useful when your application will not use audio for a while.
Returns Promise<undefined>
.
resume
The above method lets resume time progression in audio context that previously has been suspended.