Skip to main content

<Still>

<Still /> 是一个单帧的 <Composition />。它是一种方便的方法来定义一个渲染图片而非视频的组合。

🌐 A <Still /> is a single-frame <Composition />. It is a convenient way to define a composition that renders an image rather than a video.

示例

🌐 Example

<Still /> 组件与 <Composition /> 组件具有相同的 API,只是无需传入 durationInFramesfps

🌐 The <Still /> component has the same API as the <Composition /> component, except that it's not necessary to pass durationInFrames and fps.

import {Composition, Still} from 'remotion';
import {MyComp} from './MyComp';

export const MyVideo = () => {
  return (
    <>
      <Composition id="my-video" component={MyComp} width={1080} height={1080} fps={30} durationInFrames={3 * 30} />
      <Still id="my-image" component={MyComp} width={1080} height={1080} />
    </>
  );
};

兼容性

🌐 Compatibility

BrowsersServersEnvironments
Chrome
Firefox
Safari
Node.js
Bun
Serverless Functions

另请参阅

🌐 See also