Skip to content

🎥 Make videos programmatically with React

cleanup animated images showcase

Jonny Burger237309aa58b2
diff --git a/packages/example/src/AnimatedImage/Avif.tsx b/packages/example/src/AnimatedImage/Avif.tsx
index 68fb817585..8a63dce687 100644
--- a/packages/example/src/AnimatedImage/Avif.tsx
+++ b/packages/example/src/AnimatedImage/Avif.tsx
@@ -1,7 +1,29 @@
-import {AnimatedImage} from 'remotion';
+import {AbsoluteFill, AnimatedImage, staticFile} from 'remotion';
-export const AvifAnimatedImage = () => {
+export const AnimatedImages = () => {
return (
- <AnimatedImage src="https://colinbendell.github.io/webperf/animated-gif-decode/2.avif" />
+ <AbsoluteFill className="bg-white justify-center items-center flex flex-row gap-20">
+ <div className="flex flex-col items-center gap-8">
+ <AnimatedImage
+ className="h-96 inline-block rounded-2xl outline outline-4 outline-black"
+ src="https://colinbendell.github.io/webperf/animated-gif-decode/2.avif"
+ />
+ <div className="text-7xl font-sans font-bold">AVIF</div>
+ </div>
+ <div className="flex flex-col items-center gap-8">
+ <AnimatedImage
+ className="h-96 inline-block rounded-2xl outline outline-4 outline-black"
+ src="https://mathiasbynens.be/demo/animated-webp-supported.webp"
+ />
+ <div className="text-7xl font-sans font-bold">WebP</div>
+ </div>
+ <div className="flex flex-col items-center gap-8">
+ <AnimatedImage
+ className="h-96 inline-block rounded-2xl outline outline-4 outline-black"
+ src={staticFile('giphy.gif')}
+ />
+ <div className="text-7xl font-sans font-bold">GIF</div>
+ </div>
+ </AbsoluteFill>
);
};
diff --git a/packages/example/src/AnimatedImage/Gif.tsx b/packages/example/src/AnimatedImage/Gif.tsx
deleted file mode 100644
index e230d8e0f6..0000000000
--- a/packages/example/src/AnimatedImage/Gif.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import {AnimatedImage, staticFile} from 'remotion';
-
-export const GifAnimatedImage = () => {
- return <AnimatedImage src={staticFile('giphy.gif')} />;
-};
diff --git a/packages/example/src/AnimatedImage/Webp.tsx b/packages/example/src/AnimatedImage/Webp.tsx
deleted file mode 100644
index 632974ad19..0000000000
--- a/packages/example/src/AnimatedImage/Webp.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import {AnimatedImage} from 'remotion';
-
-export const WebpAnimatedImage = () => {
- return (
- <AnimatedImage src="https://mathiasbynens.be/demo/animated-webp-supported.webp" />
- );
-};
diff --git a/packages/example/src/Root.tsx b/packages/example/src/Root.tsx
index de7e267d6e..4403a53e34 100644
--- a/packages/example/src/Root.tsx
+++ b/packages/example/src/Root.tsx
@@ -113,9 +113,7 @@ if (alias !== 'alias') {
const INCLUDE_COMP_BREAKING_GET_COMPOSITIONS = false;
-import {AvifAnimatedImage} from './AnimatedImage/Avif';
-import {GifAnimatedImage} from './AnimatedImage/Gif';
-import {WebpAnimatedImage} from './AnimatedImage/Webp';
+import {AnimatedImages} from './AnimatedImage/Avif';
class Vector2 {
readonly x: number;
@@ -726,24 +724,8 @@ export const Index: React.FC = () => {
</Folder>
<Folder name="AnimatedImage">
<Composition
- id="gif-animated-image"
- component={GifAnimatedImage}
- width={1920}
- height={1080}
- durationInFrames={200}
- fps={30}
- />
- <Composition
- id="avif-animated-image"
- component={AvifAnimatedImage}
- width={1920}
- height={1080}
- durationInFrames={200}
- fps={30}
- />
- <Composition
- id="webp-animated-image"
- component={WebpAnimatedImage}
+ id="animated-images"
+ component={AnimatedImages}
width={1920}
height={1080}
durationInFrames={200}