API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classAudioInput
A live audio capture source — a microphone or WebRTC `MediaStream` obtained via `getUserMedia`. **Not a Playable**: you don't "play" a mic, you *open* it. Pass it to AudioManager.open to get an InputVoice for monitoring, analysis, or recording. ```ts const mic = await AudioInput.open({ echoCancellation: true }); const input = app.audio.open(mic); new AudioAnalyser({ source: input }); // visualise / beat-detect (no feedback) const clip = await input.record(2000); // capture 2s -> Sound mic.close(); // release the device ```
import { AudioInput } from '@codexo/exojs' A live audio capture source — a microphone or WebRTC `MediaStream` obtained via `getUserMedia`. **Not a Playable**: you don't "play" a mic, you *open* it. Pass it to AudioManager.open to get an InputVoice for monitoring, analysis, or recording.
```ts const mic = await AudioInput.open({ echoCancellation: true }); const input = app.audio.open(mic); new AudioAnalyser({ source: input }); // visualise / beat-detect (no feedback) const clip = await input.record(2000); // capture 2s -> Sound mic.close(); // release the device ```
close(): void open(options: AudioInputOptions): Promise<AudioInput> stream: MediaStream