Skip to content

EZ Web Audio / AudioInput

Type Alias: AudioInput

AudioInput = string | ArrayBuffer | Blob | File

Defined in: packages/core/src/index.ts:358

Union type for audio input sources accepted by factory functions.

  • string: URL to an audio file (fetched via network)
  • ArrayBuffer: Raw decoded audio data (decoded directly)
  • Blob: Binary audio data (e.g., from File API or fetch response)
  • File: File selected via <input type="file"> or drag-and-drop

Example

typescript
import type { AudioInput } from 'ez-web-audio'

async function loadAudio(input: AudioInput) {
  return createSound(input)
}