Chapter 55: getAudioData()
Core Idea
_Part of the @remotion/media-utils package of helper functions.
Key Concepts
- Arguments
- src
- options?<AvailableFrom v="4.0.121"/>
- sampleRate?<AvailableFrom v="4.0.121"/>
- requestInit?<AvailableFrom v="4.0.458"/>
- Return value
- channelWaveforms
- sampleRate
Code Examples
await getAudioData('https://example.com/authenticated-audio.mp3', {
requestInit: {
credentials: 'include',
},
});
- What it demonstrates: Usage pattern for getAudioData() from the official docs.
Key Takeaways
- Understand arguments when working with getAudioData().
- Understand src when working with getAudioData().
- Understand options?<availablefrom v="4.0.121"/> when working with getAudioData().
- Understand samplerate?<availablefrom v="4.0.121"/> when working with getAudioData().
- Understand requestinit?<availablefrom v="4.0.458"/> when working with getAudioData().
Connects To
- Cancel Render: related page in the Hooks & Data APIs section.
- Continue Render: related page in the Hooks & Data APIs section.
- Data Fetching: related page in the Hooks & Data APIs section.