@remotion/renderer
Version:
Render Remotion videos using Node.js or Bun
24 lines (23 loc) • 989 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateSelectedCodecAndProResCombination = exports.proResProfileOptions = void 0;
exports.proResProfileOptions = [
'4444-xq',
'4444',
'hq',
'standard',
'light',
'proxy',
];
const validateSelectedCodecAndProResCombination = ({ codec, proResProfile, }) => {
if (typeof proResProfile !== 'undefined' && codec !== 'prores') {
throw new TypeError(`You have set a ProRes profile but the codec is "${codec}". Set the codec to "prores" or remove the ProRes profile.`);
}
if (proResProfile !== undefined &&
!exports.proResProfileOptions.includes(proResProfile)) {
throw new TypeError(`The ProRes profile "${proResProfile}" is not valid. Valid options are ${exports.proResProfileOptions
.map((p) => `"${p}"`)
.join(', ')}`);
}
};
exports.validateSelectedCodecAndProResCombination = validateSelectedCodecAndProResCombination;