Skip to main content

延迟音频

使用一个 <Sequence> 并设置正的 from 值来延迟音频的播放。

🌐 Use a <Sequence> with a positive from value to delay the audio from playing.

在下面的示例中,音频将在 100 帧之后开始播放。

🌐 In the following example, the audio will start playing after 100 frames.

import {AbsoluteFill, Html5Audio, Sequence, staticFile} from 'remotion';

export const MyComposition = () => {
  return (
    <AbsoluteFill>
      <Sequence from={100}>
        <Html5Audio src={staticFile('audio.mp3')} />
      </Sequence>
    </AbsoluteFill>
  );
};