Chapter 214: <Audio>
Core Idea
<Audio> from @remotion/media is the recommended component for embedding audio in Remotion.
Key Concepts
- Example
- Props
- src
- from?<AvailableFrom v="4.0.445" />
- durationInFrames?<AvailableFrom v="4.0.445" />
- premountFor?<AvailableFrom v="4.0.495" />
- postmountFor?<AvailableFrom v="4.0.495" />
- trimBefore?
Code Examples
export const MyVideo = () => {
return (
<AbsoluteFill>
<Audio src={staticFile('audio.mp3')} />
</AbsoluteFill>
);
};
- What it demonstrates: Usage pattern for
<Audio> from the official docs.
Key Takeaways
- Understand example when working with
<Audio>.
- Understand props when working with
<Audio>.
- Understand src when working with
<Audio>.
- Understand from?<availablefrom v="4.0.445" /> when working with
<Audio>.
- Understand durationinframes?<availablefrom v="4.0.445" /> when working with
<Audio>.
Connects To
- Animatedimage: related page in the Assets & Media section.
- Delaying: related page in the Assets & Media section.
- Exporting: related page in the Assets & Media section.