Extends
Implements
Members
Get AudioContext class, if not supported returns null
Get OfflineAudioContext class, if not supported returns null
Context Analyser node
The WebAudio API AudioContext object.
Context Compressor node
Handle global events
Sets the muted state.
- Default Value:
- false
The WebAudio API OfflineAudioContext object.
Pauses all sounds, even though we handle this at the instance level, we'll also pause the audioContext so that the time used to compute progress isn't messed up.
- Default Value:
- false
Global speed of all sounds
Sets the volume from 0 to 1.
- Default Value:
- 1
Methods
Try to unlock audio on iOS. This is triggered from either WebAudio plugin setup (which will work if inside of
a mousedown
or touchend
event stack), or the first document touchend/mousedown event. If it fails (touchend
will fail if the user presses for too long, indicating a scroll event instead of a click event.
Note that earlier versions of iOS supported touchstart
for this, but iOS9 removed this functionality. Adding
a touchstart
event to support older platforms may preclude a mousedown
even from getting fired on iOS9, so we
stick with mousedown
and touchend
.
Decode the audio data
Name | Type | Description |
---|---|---|
arrayBuffer |
ArrayBuffer |
Buffer from loader |
callback |
Function |
When completed, error and audioBuffer are parameters. |
destroy () void overrides
Destroy this context.
Plays an empty sound in the web audio context. This is used to enable web audio on iOS devices, as they require the first sound to be played inside of a user initiated event (touch/click).
Emit event when muted, volume or speed changes
Emit event when muted, volume or speed changes
Toggles the muted state.
Returns:
Type | Description |
---|---|
boolean | The current muted state. |
Toggles the paused state.
Returns:
Type | Description |
---|---|
boolean | The current muted state. |
Inherited Properties
From class Filterable
destination inherited
The destination output audio node
filters Array<filters.Filter> inherited
The collection of filters