Skip to content

🎥 Make videos programmatically with React

Merge branch 'customizable-offthread-video-cache-size' into determine-remotion-environment

Jonny Burger7e7f2d5720c7
diff --cc packages/core/src/Composition.tsx
index d34434dc91,918e736944..75f6c85e7d
--- a/packages/core/src/Composition.tsx
+++ b/packages/core/src/Composition.tsx
@@@ -141,9 -139,12 +141,9 @@@ export const Composition =
const canUseComposition = useContext(CanUseRemotionHooks);
if (canUseComposition) {
- if (
- environment === 'player-development' ||
- environment === 'player-production'
- ) {
+ if (isPlayer) {
throw new Error(
- '<Composition> was mounted inside the `component` that was passed to the <Player>. See https://remotion.dev/docs/wrong-composition-mount for help.'
+ '<Composition> was mounted inside the `component` that was passed to the <Player>. See https://remotion.dev/docs/wrong-composition-mount for help.',
);
}
diff --cc packages/core/src/config/input-props.ts
index 28c3752f48,5e75e39ae7..4617e7add7
--- a/packages/core/src/config/input-props.ts
+++ b/packages/core/src/config/input-props.ts
@@@ -22,9 -22,12 +22,9 @@@ export const getInputProps = () =>
return {};
}
- if (
- getRemotionEnvironment() === 'player-development' ||
- getRemotionEnvironment() === 'player-production'
- ) {
+ if (getRemotionEnvironment().isPlayer) {
throw new Error(
- 'You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.'
+ 'You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.',
);
}