Skip to content

🎥 Make videos programmatically with React

document

JonnyBurgera5bfbfb23146
diff --git a/packages/core/src/config/input-props.ts b/packages/core/src/config/input-props.ts
index 1d2889c188..96cfbb98b9 100644
--- a/packages/core/src/config/input-props.ts
+++ b/packages/core/src/config/input-props.ts
@@ -34,6 +34,12 @@ export const getInputProps = <
);
}
+ if (getRemotionEnvironment().isClientSideRendering) {
+ throw new Error(
+ 'You cannot call `getInputProps()` while client-side rendering.',
+ );
+ }
+
const override = getInputPropsOverride();
if (override) {
return override as T;
diff --git a/packages/docs/docs/get-input-props.mdx b/packages/docs/docs/get-input-props.mdx
index 93cd36fc92..337d5cb461 100644
--- a/packages/docs/docs/get-input-props.mdx
+++ b/packages/docs/docs/get-input-props.mdx
@@ -11,9 +11,7 @@ Using this method, you can retrieve inputs that you pass in from the command lin
This method is useful if you want to retrieve the input props in the [root component](/docs/terminology/root-file).
-:::info
-This method is not available when inside a Remotion Player. Instead, get the props as React props from the component you passed as the `component` prop to the player.
-:::
+This method is not available when inside a [`<Player>`](/docs/player) or [when client-side rendering](/docs/miscellaneous/render-in-browser). Instead, get the props as React props from the component you passed as the `component` prop to the player.
## You might not need this API