🎥 Make videos programmatically with React
import type {AnyRemotionOption} from './option';
const cliFlag = 'is-production' as const;
let currentIsProductionKey: boolean | null = null;
export const isProductionOption = {
name: 'Is Production',
addedIn: '4.0.409',
cliFlag,
description: () => (
<>
Pass <code>false</code> if this a development render to not count it as a
billable render on remotion.pro. Only can be used in conjuction with{' '}
<code>licenseKey</code>.
</>
),
ssrName: 'isProduction' as const,
docLink: 'https://www.remotion.dev/docs/options/is-production',
getValue: ({commandLine}) => {
if (commandLine[cliFlag] !== undefined && commandLine[cliFlag] !== null) {
return {
source: 'cli',
value: commandLine[cliFlag] as boolean | null,
};
}
if (currentIsProductionKey !== null) {
return {
source: 'config',
value: currentIsProductionKey,
};
}
return {
source: 'default',
value: null,
};
},
setConfig: (value: boolean | null) => {
currentIsProductionKey = value;
},
type: false as boolean | null,
id: cliFlag,
} satisfies AnyRemotionOption<boolean | null>;