Skip to content

createAudioSourceFromUrl

function createAudioSourceFromUrl(url: string, options?: AudioSourceOptions): Promise<AudioSource>;

Creates an AudioSource from an audio URL.

Defaults to streaming sources (StreamingWavSource, StreamingMp3Source) for instant first-tile rendering. Falls back to DecodedAudioSource (native AudioContext.decodeAudioData) if streaming is unavailable or when preferDecoded: true / preferStreaming: false is specified.

ParameterType
urlstring
options?AudioSourceOptions

Promise<AudioSource>