🎥 Make videos programmatically with React
Add `acknowledgeRemotionLicense` field
Jonny Burgerf0e934a390e5
diff --git a/packages/docs/docs/webcodecs/extract-frames.mdx b/packages/docs/docs/webcodecs/extract-frames.mdxindex 6b6a96061a..099f258657 100644--- a/packages/docs/docs/webcodecs/extract-frames.mdx+++ b/packages/docs/docs/webcodecs/extract-frames.mdx@@ -73,6 +73,11 @@ For this you need currently to make another [`parseMedia()`](/docs/media-parser/A callback that will be called with the frame at the given timestamp.Each frame is a [`VideoFrame`](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame) object that can for example be drawn to a canvas.++### `acknowledgeRemotionLicense?`++Acknowledge the [Remotion License](/docs/license) to make the console message disappear.+### `signal?`An optional [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) to abort the extraction.diff --git a/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx b/packages/studio/src/components/Timeline/TimelineVideoInfo.tsxindex 86b25ddd0b..9d9702fa14 100644--- a/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx+++ b/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx@@ -224,6 +224,7 @@ export const TimelineVideoInfo: React.FC<{const controller = new AbortController();extractFrames({+ acknowledgeRemotionLicense: true,timestampsInSeconds: ({track}) => {const aspectRatio = track.width / track.height;const framesFitInWidth = Math.ceil(diff --git a/packages/webcodecs/src/extract-frames.ts b/packages/webcodecs/src/extract-frames.tsindex 16b3bd9fcf..2b53d50c1f 100644--- a/packages/webcodecs/src/extract-frames.ts+++ b/packages/webcodecs/src/extract-frames.ts@@ -22,11 +22,13 @@ const internalExtractFrames = ({onFrame,signal,timestampsInSeconds,+ acknowledgeRemotionLicense,}: {timestampsInSeconds: number[] | ExtractFramesTimestampsInSecondsFn;src: string;onFrame: (frame: VideoFrame) => void;signal: AbortSignal | null;+ acknowledgeRemotionLicense: boolean;}) => {const controller = mediaParserController();@@ -45,7 +47,7 @@ const internalExtractFrames = ({parseMediaOnWebWorker({src: new URL(src, window.location.href),- acknowledgeRemotionLicense: true,+ acknowledgeRemotionLicense,controller,onDurationInSeconds(durationInSeconds) {dur = durationInSeconds;@@ -148,6 +150,11 @@ export const extractFrames = (options: {timestampsInSeconds: number[] | ExtractFramesTimestampsInSecondsFn;onFrame: (frame: VideoFrame) => void;signal?: AbortSignal;+ acknowledgeRemotionLicense?: boolean;}) => {- return internalExtractFrames({...options, signal: options.signal ?? null});+ return internalExtractFrames({+ ...options,+ signal: options.signal ?? null,+ acknowledgeRemotionLicense: options.acknowledgeRemotionLicense ?? false,+ });};