AudioPlayer
Defined in: audio-player.ts:251
Plays any number of inputs into one output node.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
Output extends AudioPlayerGainNode |
AudioPlayerGainNode |
Properties
Section titled “Properties”context
Section titled “context”readonly context: AudioPlayerContext;Defined in: audio-player.ts:253
The context every input plays through.
inputs
Section titled “inputs”readonly inputs: readonly AudioPlayerInput[];Defined in: audio-player.ts:267
The inputs not yet removed.
joinPhases
Section titled “joinPhases”readonly joinPhases: Readonly<AudioPlayerJoinPhases>;Defined in: audio-player.ts:271
When the worklet module and the libopus module were ready, for measuring a join.
output
Section titled “output”readonly output: Output;Defined in: audio-player.ts:258
The mix of every input. Connect it to the context’s destination, or route it through
createEchoCancellationLoopback so Chromium’s echo canceller hears it.
outputDelayUs
Section titled “outputDelayUs”outputDelayUs: number;Defined in: audio-player.ts:263
Delay after the output that the context does not report, in microseconds, such as an echo-cancellation loopback. Added to every input’s audible time. Default 0.
Methods
Section titled “Methods”addInput()
Section titled “addInput()”addInput(options?): AudioPlayerInput;Defined in: audio-player.ts:265
Add an input.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? |
AudioInputOptions |
Returns
Section titled “Returns”close()
Section titled “close()”close(): void;Defined in: audio-player.ts:269
Remove every input and disconnect the output. The context stays the caller’s to close.
Returns
Section titled “Returns”void