输入属性
输入属性是可以传递给渲染的数据,用于参数化视频。它们可以通过两种方式获得:
🌐 Input props are data that can be passed to a render in order to parametrize the video. They can be obtained in two ways:
- 这些数据作为实际的 React 属性传递给你在组合中定义的组件
- 使用
getInputProps()函数,即使在组件之外,你也可以获取 props,例如动态更改 持续时间或尺寸。
在 Remotion Studio 中,你可以设置 默认属性 作为设计视频的占位数据。如果你的输入属性没有覆盖默认属性,将会使用默认属性。参见:属性如何被解析
🌐 In the Remotion Studio, you can set default props to serve as placeholder data for designing your video. If your input props don't override the default props, the default props will be used. See: How props get resolved
在 Remotion Player 中,没有默认的属性,但你可以将 inputProps 直接传递给 <Player>。
🌐 In the Remotion Player, there are no default props, but you can pass inputProps directly to the <Player>.