Capítulo 214 de 988

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

  1. Understand example when working with <Audio>.
  2. Understand props when working with <Audio>.
  3. Understand src when working with <Audio>.
  4. Understand from?<availablefrom v="4.0.445" /> when working with <Audio>.
  5. 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.