🎥 Make videos programmatically with React
make outputlocation optional
Jonny Burger53bf7dba8da9
diff --git a/packages/renderer/src/render-media.ts b/packages/renderer/src/render-media.tsindex 9920260d30..c8e5214efe 100644--- a/packages/renderer/src/render-media.ts+++ b/packages/renderer/src/render-media.ts@@ -47,7 +47,7 @@ export type RenderMediaOnProgress = (progress: {}) => void;export type RenderMediaOptions = {- outputLocation: string;+ outputLocation?: string | null;codec: Codec;composition: SmallTCompMetadata;inputProps?: unknown;@@ -118,7 +118,9 @@ export const renderMedia = ({Internals.validateSelectedCrfAndCodecCombination(crf, codec);}- validateOutputFilename(codec, getExtensionOfFilename(outputLocation));+ if (outputLocation) {+ validateOutputFilename(codec, getExtensionOfFilename(outputLocation));+ }validateScale(scale);@@ -279,7 +281,9 @@ export const renderMedia = ({renderedDoneIn = Date.now() - renderStart;callUpdate();- ensureOutputDirectory(outputLocation);+ if (outputLocation) {+ ensureOutputDirectory(outputLocation);+ }const stitchStart = Date.now();return Promise.all([diff --git a/packages/renderer/src/stitch-frames-to-video.ts b/packages/renderer/src/stitch-frames-to-video.tsindex 7d4728e72c..55f2f2af68 100644--- a/packages/renderer/src/stitch-frames-to-video.ts+++ b/packages/renderer/src/stitch-frames-to-video.ts@@ -38,7 +38,7 @@ export type StitcherOptions = {fps: number;width: number;height: number;- outputLocation: string | null;+ outputLocation?: string | null;force: boolean;assetsInfo: RenderAssetInfo;pixelFormat?: PixelFormat;