🎥 Make videos programmatically with React
embeddedimage
JonnyBurgera3a15816efc3
diff --git a/packages/convert/app/components/EmbeddedImage.tsx b/packages/convert/app/components/EmbeddedImage.tsxindex a68d1af2bc..ae80b46a7e 100644--- a/packages/convert/app/components/EmbeddedImage.tsx+++ b/packages/convert/app/components/EmbeddedImage.tsx@@ -1,10 +1,10 @@-import type {MediaParserEmbeddedImage} from '@remotion/media-parser';+import type {AttachedImage} from 'mediabunny';import type React from 'react';import {useEffect, useState} from 'react';import {THUMBNAIL_HEIGHT} from './VideoThumbnail';export const EmbeddedImage: React.FC<{- readonly images: MediaParserEmbeddedImage[];+ readonly images: AttachedImage[];}> = ({images}) => {const [url, setUrl] = useState<string | null>(null);diff --git a/packages/convert/app/components/Probe.tsx b/packages/convert/app/components/Probe.tsxindex ba78a15974..6afb501bc7 100644--- a/packages/convert/app/components/Probe.tsx+++ b/packages/convert/app/components/Probe.tsx@@ -1,4 +1,3 @@-import type {MediaParserEmbeddedImage} from '@remotion/media-parser';import clsx from 'clsx';import React, {useCallback, useMemo, useRef, useState} from 'react';import type {Source} from '~/lib/convert-state';@@ -126,12 +125,16 @@ export const Probe: React.FC<{useAddFilenameToTitle(name);useCopyThumbnailToFavicon(videoThumbnailRef);+ const images = useMemo(() => {+ return metadata?.images ?? null;+ }, [metadata]);+return (<div className="w-full lg:w-[350px]"><Card className="overflow-hidden lg:w-[350px]"><div className="flex flex-row lg:flex-col w-full border-b-2 border-black">- {(images?.length ?? 0) > 0 ? (- <EmbeddedImage images={images as MediaParserEmbeddedImage[]} />+ {images ? (+ <EmbeddedImage images={images} />) : isAudio ? (<AudioWaveformContainer><AudioWaveForm bars={waveform} />