Capítulo 184 de 988

Chapter 184: Trimming Audio

Core Idea

The <Audio /> and <Video /> tags support the trimBefore and trimAfter props. <Html5Audio /> also supports these props.

Key Concepts

  • Trimming Audio: The <Audio /> and <Video /> tags support the trimBefore and trimAfter props.

Code Examples

export const MyComposition = () => {
  const {fps} = useVideoConfig();

  return (
    <AbsoluteFill>
      <Video src={staticFile('video.mp4')} trimBefore={2 * fps} trimAfter={4 * fps} />
    </AbsoluteFill>
  );
};
  • What it demonstrates: Usage pattern for Trimming Audio from the official docs.

Key Takeaways

  1. Understand trimming audio when working with Trimming 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.