Skip to content

πŸŽ₯ Make videos programmatically with React

Add license questions homepage animation

JonnyBurgerb36465397b34
diff --git a/packages/brand/public/homepage-assets/mehmet.png b/packages/brand/public/homepage-assets/mehmet.png
new file mode 100755
index 0000000000..65f1dce906
Binary files /dev/null and b/packages/brand/public/homepage-assets/mehmet.png differ
diff --git a/packages/brand/public/homepage-assets/remotion-favicon.png b/packages/brand/public/homepage-assets/remotion-favicon.png
new file mode 100644
index 0000000000..c17ab6e838
Binary files /dev/null and b/packages/brand/public/homepage-assets/remotion-favicon.png differ
diff --git a/packages/brand/src/HomepageAssets/LicenseQuestionsGraphic.tsx b/packages/brand/src/HomepageAssets/LicenseQuestionsGraphic.tsx
new file mode 100644
index 0000000000..708e94af39
--- /dev/null
+++ b/packages/brand/src/HomepageAssets/LicenseQuestionsGraphic.tsx
@@ -0,0 +1,187 @@
+import React from 'react';
+import {
+ AbsoluteFill,
+ Easing,
+ Img,
+ Interactive,
+ interpolate,
+ staticFile,
+ useCurrentFrame,
+ useVideoConfig,
+} from 'remotion';
+
+export const LicenseQuestionsGraphic: React.FC = () => {
+ const frame = useCurrentFrame();
+ const {durationInFrames} = useVideoConfig();
+
+ return (
+ <AbsoluteFill>
+ <svg
+ viewBox="0 0 1080 1080"
+ style={{
+ height: '100%',
+ inset: 0,
+ overflow: 'visible',
+ position: 'absolute',
+ width: '100%',
+ }}
+ >
+ <defs>
+ <clipPath id="license-line-reveal">
+ <rect
+ height="80"
+ width={interpolate(frame, [55, 67, 132, 144], [0, 322, 322, 0], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ })}
+ x="379"
+ y="500"
+ />
+ </clipPath>
+ </defs>
+ <g clipPath="url(#license-line-reveal)">
+ <path
+ d="M385 540H695"
+ fill="none"
+ stroke="black"
+ strokeDasharray="28 28"
+ strokeDashoffset={interpolate(
+ frame,
+ [55, durationInFrames],
+ [0, -224],
+ {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ },
+ )}
+ strokeLinecap="round"
+ strokeWidth="12"
+ />
+ </g>
+ </svg>
+ <Interactive.Div
+ name="Mehmet avatar"
+ style={{
+ height: 280,
+ left: 695,
+ opacity: interpolate(frame, [23, 24, 158, 168], [0, 1, 1, 0], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ }),
+ position: 'absolute',
+ scale: interpolate(frame, [24, 41], [0, 1], {
+ easing: [
+ Easing.spring({
+ damping: 200,
+ mass: 1,
+ stiffness: 100,
+ allowTail: true,
+ durationRestThreshold: 0.02,
+ overshootClamping: false,
+ }),
+ ],
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ output: 'perceptual-scale',
+ }),
+ top: 400,
+ width: 280,
+ }}
+ >
+ <Interactive.Div
+ name="Mehmet portrait"
+ style={{
+ border: '12px solid black',
+ borderRadius: '50%',
+ boxSizing: 'border-box',
+ height: '100%',
+ overflow: 'hidden',
+ position: 'absolute',
+ width: '100%',
+ }}
+ >
+ <Img
+ name="Mehmet"
+ src={staticFile('homepage-assets/mehmet.png')}
+ style={{
+ height: '100%',
+ objectFit: 'cover',
+ width: '100%',
+ }}
+ />
+ </Interactive.Div>
+ <Interactive.Div
+ name="Remotion badge"
+ style={{
+ alignItems: 'center',
+ backgroundColor: 'white',
+ borderRadius: '50%',
+ boxShadow: '0 6px 18px rgba(0, 0, 0, 0.18)',
+ display: 'flex',
+ height: 92,
+ justifyContent: 'center',
+ position: 'absolute',
+ right: -18,
+ top: -18,
+ width: 92,
+ }}
+ >
+ <Img
+ name="Remotion favicon"
+ src={staticFile('homepage-assets/remotion-favicon.png')}
+ style={{height: 56, objectFit: 'contain', width: 56}}
+ />
+ </Interactive.Div>
+ </Interactive.Div>
+ <Interactive.Div
+ name="Phone"
+ style={{
+ alignItems: 'center',
+ backgroundColor: '#0b84f3',
+ border: '12px solid black',
+ borderRadius: '50%',
+ boxSizing: 'border-box',
+ display: 'flex',
+ height: 280,
+ justifyContent: 'center',
+ left: 105,
+ position: 'absolute',
+ rotate: interpolate(
+ frame,
+ [0, 3, 6, 9, 12, 15, 18, 21, 24],
+ [
+ '0deg',
+ '-8deg',
+ '8deg',
+ '-7deg',
+ '7deg',
+ '-4deg',
+ '4deg',
+ '-2deg',
+ '0deg',
+ ],
+ {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ },
+ ),
+ top: 400,
+ width: 280,
+ }}
+ >
+ <svg
+ aria-label="Phone"
+ role="img"
+ viewBox="0 0 512 512"
+ style={{height: 150, overflow: 'visible', width: 150}}
+ >
+ {/* Font Awesome Pro v7.3.1 by @fontawesome β€” https://fontawesome.com/license (Commercial License), Copyright 2026 Fonticons, Inc. */}
+ <path
+ d="M160.2 25C152.3 6.1 131.7-3.9 112.1 1.4l-5.5 1.5c-64.6 17.6-119.8 80.2-103.7 156.4 37.1 175 174.8 312.7 349.8 349.8 76.3 16.2 138.8-39.1 156.4-103.7l1.5-5.5c5.4-19.7-4.7-40.3-23.5-48.1l-97.3-40.5c-16.5-6.9-35.6-2.1-47 11.8l-38.6 47.2C233.9 335.4 177.3 277 144.8 205.3L189 169.3c13.9-11.3 18.6-30.4 11.8-47L160.2 25z"
+ fill="white"
+ />
+ </svg>
+ </Interactive.Div>
+ </AbsoluteFill>
+ );
+};
diff --git a/packages/brand/src/Root.tsx b/packages/brand/src/Root.tsx
index c002117c76..2504f11015 100644
--- a/packages/brand/src/Root.tsx
+++ b/packages/brand/src/Root.tsx
@@ -70,6 +70,7 @@ import {
import {EmailSignature} from './EmailSignature';
import {CodingPrompt, codingPromptSchema} from './HomepageAssets/CodingPrompt';
import {FolderTreeComposition} from './HomepageAssets/FolderTree';
+import {LicenseQuestionsGraphic} from './HomepageAssets/LicenseQuestionsGraphic';
import {Map} from './HomepageAssets/Map';
import {
HomepageAssetMaster,
@@ -256,6 +257,14 @@ export const RemotionRoot: React.FC = () => {
</Folder>
<SvgLogoCompositions />
<Folder name="homepage-assets">
+ <Composition
+ id="LicenseQuestionsGraphic"
+ component={LicenseQuestionsGraphic}
+ durationInFrames={180}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
<Composition
id="NpmInitVideo"
component={NpmIniVideo}
diff --git a/packages/docs/static/img/license-questions.mp4 b/packages/docs/static/img/license-questions.mp4
new file mode 100644
index 0000000000..4df9ce8306
Binary files /dev/null and b/packages/docs/static/img/license-questions.mp4 differ
diff --git a/packages/docs/static/img/license-questions.webm b/packages/docs/static/img/license-questions.webm
new file mode 100644
index 0000000000..3ee8d49117
Binary files /dev/null and b/packages/docs/static/img/license-questions.webm differ
diff --git a/packages/promo-pages/public/img/license-questions.mp4 b/packages/promo-pages/public/img/license-questions.mp4
new file mode 100644
index 0000000000..4df9ce8306
Binary files /dev/null and b/packages/promo-pages/public/img/license-questions.mp4 differ
diff --git a/packages/promo-pages/public/img/license-questions.webm b/packages/promo-pages/public/img/license-questions.webm
new file mode 100644
index 0000000000..3ee8d49117
Binary files /dev/null and b/packages/promo-pages/public/img/license-questions.webm differ
diff --git a/packages/promo-pages/src/components/homepage/EvaluateRemotion.tsx b/packages/promo-pages/src/components/homepage/EvaluateRemotion.tsx
index adcca214b2..e31306bba9 100644
--- a/packages/promo-pages/src/components/homepage/EvaluateRemotion.tsx
+++ b/packages/promo-pages/src/components/homepage/EvaluateRemotion.tsx
@@ -1,9 +1,14 @@
import React, {useEffect, useState} from 'react';
import {experts} from '../experts';
import {MakeVideosLinks} from './MakeVideosLinks';
+import {useTransparentVideoSource} from './use-transparent-video-source';
const EvaluateRemotionSection: React.FC = () => {
const [dailyAvatars, setDailyAvatars] = useState<string[]>([]);
+ const licenseVideoSrc = useTransparentVideoSource({
+ fallbackVideoSrc: '/img/license-questions.mp4',
+ videoSrc: '/img/license-questions.webm',
+ });
useEffect(() => {
const avatars = experts.map((expert) => expert.image);
@@ -21,7 +26,19 @@ const EvaluateRemotionSection: React.FC = () => {
return (
<>
<div className="flex min-w-0 basis-0 flex-1 flex-col">
- <div className="aspect-square w-full" />
+ <div className="flex aspect-square w-full items-start">
+ {licenseVideoSrc ? (
+ <video
+ src={licenseVideoSrc}
+ muted
+ autoPlay
+ playsInline
+ loop
+ preload="metadata"
+ className="relative max-h-full max-w-full cursor-default! object-contain"
+ />
+ ) : null}
+ </div>
<div className="font-brand">
<h2 className="text-2xl fontbrand leading-[1.1] font-medium">
License questions?