Skip to content

🎥 Make videos programmatically with React

colors

Jonny Burger7f9bc6c4f25d
diff --git a/packages/docs/components/layout/colors.ts b/packages/docs/components/layout/colors.ts
index e7f875596d..5e49838870 100644
--- a/packages/docs/components/layout/colors.ts
+++ b/packages/docs/components/layout/colors.ts
@@ -1,8 +1,10 @@
-import { darken, transparentize } from "polished";
+import {darken, transparentize} from 'polished';
-export const LIGHT_BLUE = "#42e9f5";
-export const DARK_BLUE = "#4290f5";
+export const LIGHT_BLUE = '#42e9f5';
+export const DARK_BLUE = '#4290f5';
export const UNDERLAY_BLUE = transparentize(0.85, DARK_BLUE);
-export const RED = "#e74c3c";
+export const RED = '#e74c3c';
export const UNDERLAY_RED = transparentize(0.9, RED);
export const BLUE_TEXT = darken(0.3, DARK_BLUE);
+
+export const BOX_STROKE = 'var(--box-stroke)';
diff --git a/packages/docs/src/components/Demo/Demo.tsx b/packages/docs/src/components/Demo/Demo.tsx
index 9fe8b43023..37db7fc546 100644
--- a/packages/docs/src/components/Demo/Demo.tsx
+++ b/packages/docs/src/components/Demo/Demo.tsx
@@ -10,6 +10,7 @@ import React, {
useState,
} from 'react';
import {staticFile} from 'remotion';
+import {BOX_STROKE} from '../../../components/layout/colors';
import type {LocationAndTrending} from '../../remotion/HomepageVideo/Comp';
import {
HomepageVideoComp,
@@ -20,6 +21,8 @@ import {ActionRow} from './ActionRow';
import {PlayerControls} from './PlayerControls';
import styles from './player.module.css';
+preloadAudio(staticFile('Utope-nature-5s.mp3'));
+
export const Demo: React.FC = () => {
const {colorMode} = useColorMode();
const [data, setData] = useState<LocationAndTrending | null>(null);
@@ -32,8 +35,6 @@ export const Demo: React.FC = () => {
});
}, []);
- const strokeColor = colorMode === 'dark' ? 'gray' : 'black';
-
const [isFullscreen, setIsFullscreen] = useState(false);
const [cardOrder, setCardOrder] = useState([0, 1, 2, 3]);
@@ -49,10 +50,11 @@ export const Demo: React.FC = () => {
});
const playerWrapper: CSSProperties = {
- border: '2px solid ' + strokeColor,
- borderBottom: '4px solid ' + strokeColor,
+ border: `2px solid ${BOX_STROKE}`,
+ borderBottom: `4px solid ${BOX_STROKE}`,
borderRadius: 8,
width: '100%',
+ overflow: 'hidden',
};
useEffect(() => {
@@ -119,16 +121,12 @@ export const Demo: React.FC = () => {
}, 200);
}, []);
- preloadAudio(staticFile('Utope-nature-5s.mp3'));
-
return (
<div>
<br />
- <br />
- <br />
- <h1>Try it out</h1>
+ <h1>Try out this interactive demo!</h1>
{data ? (
- <>
+ <div style={playerWrapper}>
<Player
ref={ref}
component={HomepageVideoComp}
@@ -140,7 +138,9 @@ export const Demo: React.FC = () => {
controls={isFullscreen}
clickToPlay={false}
style={{
- ...playerWrapper,
+ width: '100%',
+ aspectRatio: '640 / 360',
+ borderBottom: `2px solid ${BOX_STROKE}`,
touchAction: 'none', // prevent page from scrolling when dragging children on mobile
}}
initiallyMuted
@@ -165,7 +165,7 @@ export const Demo: React.FC = () => {
fps={30}
setmountPlayerAudio={setmountPlayerAudio}
/>
- </>
+ </div>
) : (
<>
<div
diff --git a/packages/docs/src/components/Demo/PlayPauseButton.tsx b/packages/docs/src/components/Demo/PlayPauseButton.tsx
index d9ba7e8fe6..02a25a00e3 100644
--- a/packages/docs/src/components/Demo/PlayPauseButton.tsx
+++ b/packages/docs/src/components/Demo/PlayPauseButton.tsx
@@ -1,16 +1,22 @@
import type {PlayerRef} from '@remotion/player';
import React, {useCallback, useEffect} from 'react';
-import {BlueButton} from '../../../components/layout/Button';
import {PausedIcon, PlayingIcon} from '../../icons/arrows';
const playerButtonStyle: React.CSSProperties = {
- width: '40px',
- height: '40px',
- padding: 0,
+ appearance: 'none',
+ border: 'none',
+ borderRadius: 0,
+ background: 'none',
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
+ paddingRight: 20,
+ paddingLeft: 20,
+ cursor: 'pointer',
};
export const PlayPauseButton: React.FC<{
- playerRef: React.RefObject<PlayerRef>;
+ readonly playerRef: React.RefObject<PlayerRef>;
}> = ({playerRef}) => {
const [playing, setPlaying] = React.useState(true);
@@ -46,18 +52,12 @@ export const PlayPauseButton: React.FC<{
};
return (
- <BlueButton
- size="bg"
- fullWidth={false}
- loading={false}
- style={playerButtonStyle}
- onClick={onToggle}
- >
+ <button type="button" style={playerButtonStyle} onClick={onToggle}>
{playing ? (
<PlayingIcon style={playPauseIconStyle} />
) : (
<PausedIcon style={playPauseIconStyle} />
)}
- </BlueButton>
+ </button>
);
};
diff --git a/packages/docs/src/components/Demo/PlayerControls.tsx b/packages/docs/src/components/Demo/PlayerControls.tsx
index 97e27e0aee..daed9098e2 100644
--- a/packages/docs/src/components/Demo/PlayerControls.tsx
+++ b/packages/docs/src/components/Demo/PlayerControls.tsx
@@ -1,5 +1,6 @@
import type {PlayerRef} from '@remotion/player';
import React from 'react';
+import {BOX_STROKE} from '../../../components/layout/colors';
import styles from './player.module.css';
import {PlayerFullscreen} from './PlayerFullscreen';
import {PlayerSeekBar} from './PlayerSeekBar';
@@ -7,16 +8,36 @@ import {PlayerVolume} from './PlayerVolume';
import {PlayPauseButton} from './PlayPauseButton';
import {TimeDisplay} from './TimeDisplay';
+const Separator: React.FC = () => {
+ return (
+ <div
+ style={{
+ borderRight: `3px solid ${BOX_STROKE}`,
+ height: 50,
+ }}
+ />
+ );
+};
+
export const PlayerControls: React.FC<{
- playerRef: React.RefObject<PlayerRef>;
- durationInFrames: number;
- fps: number;
- setmountPlayerAudio: React.Dispatch<React.SetStateAction<boolean>>;
+ readonly playerRef: React.RefObject<PlayerRef>;
+ readonly durationInFrames: number;
+ readonly fps: number;
+ readonly setmountPlayerAudio: React.Dispatch<React.SetStateAction<boolean>>;
}> = ({playerRef, durationInFrames, fps, setmountPlayerAudio}) => {
return (
<div className={styles['controls-wrapper']}>
<div className={styles['start-controls']}>
<PlayPauseButton playerRef={playerRef} />
+ <Separator />
+ <PlayerVolume
+ playerRef={playerRef}
+ setmountPlayerAudio={setmountPlayerAudio}
+ />
+ <Separator />
+ <div style={{width: 20}} />
+ <TimeDisplay playerRef={playerRef} fps={fps} />
+ <div style={{width: 10}} />
<PlayerSeekBar
durationInFrames={durationInFrames}
playerRef={playerRef}
@@ -25,17 +46,10 @@ export const PlayerControls: React.FC<{
onSeekEnd={() => undefined}
onSeekStart={() => undefined}
/>
- <TimeDisplay
- playerRef={playerRef}
- durationInFrames={durationInFrames}
- fps={fps}
- />
+ <div style={{width: 20}} />
</div>
<div className={styles['end-controls']}>
- <PlayerVolume
- playerRef={playerRef}
- setmountPlayerAudio={setmountPlayerAudio}
- />
+ <Separator />
<PlayerFullscreen playerRef={playerRef} />
</div>
</div>
diff --git a/packages/docs/src/components/Demo/PlayerFullscreen.tsx b/packages/docs/src/components/Demo/PlayerFullscreen.tsx
index a4c4b599d1..8a43b9e394 100644
--- a/packages/docs/src/components/Demo/PlayerFullscreen.tsx
+++ b/packages/docs/src/components/Demo/PlayerFullscreen.tsx
@@ -3,7 +3,7 @@ import React, {useCallback, useEffect, useState} from 'react';
import {FullscreenIcon} from '../../icons/arrows';
export const PlayerFullscreen: React.FC<{
- playerRef: React.RefObject<PlayerRef>;
+ readonly playerRef: React.RefObject<PlayerRef>;
}> = ({playerRef}) => {
const [supportsFullscreen, setSupportsFullscreen] = useState(false);
const [isFullscreen, setIsFullscreen] = useState(false);
@@ -66,7 +66,7 @@ export const PlayerFullscreen: React.FC<{
padding: 0,
}}
>
- <FullscreenIcon style={{width: 20}} />
+ <FullscreenIcon style={{height: 20, paddingLeft: 15, paddingRight: 15}} />
</button>
);
};
diff --git a/packages/docs/src/components/Demo/PlayerSeekBar.tsx b/packages/docs/src/components/Demo/PlayerSeekBar.tsx
index eb6cc209e3..f09e97a0f1 100644
--- a/packages/docs/src/components/Demo/PlayerSeekBar.tsx
+++ b/packages/docs/src/components/Demo/PlayerSeekBar.tsx
@@ -108,12 +108,12 @@ export const useHoverState = (
};
export const PlayerSeekBar: React.FC<{
- durationInFrames: number;
- onSeekStart: () => void;
- onSeekEnd: () => void;
- inFrame: number | null;
- outFrame: number | null;
- playerRef: React.RefObject<PlayerRef>;
+ readonly durationInFrames: number;
+ readonly onSeekStart: () => void;
+ readonly onSeekEnd: () => void;
+ readonly inFrame: number | null;
+ readonly outFrame: number | null;
+ readonly playerRef: React.RefObject<PlayerRef>;
}> = ({
durationInFrames,
onSeekEnd,
diff --git a/packages/docs/src/components/Demo/PlayerVolume.tsx b/packages/docs/src/components/Demo/PlayerVolume.tsx
index 4e1e3544ee..9ffb855369 100644
--- a/packages/docs/src/components/Demo/PlayerVolume.tsx
+++ b/packages/docs/src/components/Demo/PlayerVolume.tsx
@@ -4,18 +4,14 @@ import {IsMutedIcon, NotMutedIcon} from '../../icons/arrows';
import styles from './player.module.css';
export const PlayerVolume: React.FC<{
- playerRef: React.RefObject<PlayerRef>;
- setmountPlayerAudio: React.Dispatch<React.SetStateAction<boolean>>;
+ readonly playerRef: React.RefObject<PlayerRef>;
+ readonly setmountPlayerAudio: React.Dispatch<React.SetStateAction<boolean>>;
}> = ({playerRef, setmountPlayerAudio}) => {
- const containerRef = useRef<HTMLDivElement>(null);
-
- const [audioState, setAudioState] = useState({
- volume: 0.75,
- isMuted: true,
- });
+ const [muted, setIsMuted] = useState(
+ () => playerRef.current?.isMuted() ?? true,
+ );
const [isHovered, setIsHovered] = useState(false);
- const [isDragging, setIsDragging] = useState(false);
const timerRef = useRef<Timer | null>(null);
useEffect(() => {
@@ -26,27 +22,13 @@ export const PlayerVolume: React.FC<{
}
const onMutedChange: CallbackListener<'mutechange'> = (e) => {
- setAudioState((v) => ({
- volume: v.volume === 0 ? 0.5 : v.volume, // if volume was previously 0, set it to 0.75
- isMuted: e.detail.isMuted,
- }));
- setmountPlayerAudio(true);
- };
-
- const volumeChangeListener: CallbackListener<'volumechange'> = (e) => {
- setAudioState((v) => ({
- volume: e.detail.volume,
- isMuted: v.isMuted,
- }));
- setmountPlayerAudio(true);
+ setIsMuted(e.detail.isMuted);
};
current.addEventListener('mutechange', onMutedChange);
- current.addEventListener('volumechange', volumeChangeListener);
return () => {
current.removeEventListener('mutechange', onMutedChange);
- current.removeEventListener('volumechange', volumeChangeListener);
};
}, [playerRef, setmountPlayerAudio]);
@@ -64,92 +46,17 @@ export const PlayerVolume: React.FC<{
timerRef.current = null;
}
- if (audioState.isMuted) {
+ if (playerRef.current.isMuted()) {
playerRef.current.unmute();
} else {
playerRef.current.mute();
}
- }, [audioState, playerRef]);
-
- const calculatePosition = useCallback((clientY: number) => {
- const container = containerRef.current?.getBoundingClientRect();
- if (container) {
- const clickY = clientY - container.top;
- const relativePosition = 1 - clickY / container.height;
- return Math.max(0, Math.min(1, relativePosition)); // Ensure the value is between 0 and 1
- }
-
- return null;
- }, []);
-
- const handlePointerDown = useCallback(
- (e: React.PointerEvent<HTMLDivElement>) => {
- if (e.button !== 0) return; // Only respond to left mouse button
- if (timerRef.current !== null) {
- clearTimeout(timerRef.current);
- timerRef.current = null;
- }
-
- setIsDragging(true);
- const position = calculatePosition(e.clientY);
- if (position === null) return;
- if (position < 0.05) {
- playerRef.current.mute();
- playerRef.current.setVolume(0);
- } else {
- playerRef.current.unmute();
- playerRef.current.setVolume(position);
- }
- },
- [calculatePosition, playerRef],
- );
-
- const handlePointerMove = useCallback(
- (e: PointerEvent) => {
- if (!isDragging) return;
- const position = calculatePosition(e.clientY);
- if (position === null) return;
- if (position < 0.05) {
- playerRef.current.mute();
- playerRef.current.setVolume(0);
- } else {
- playerRef.current.unmute();
- playerRef.current.setVolume(position);
- }
- },
- [isDragging, calculatePosition, playerRef],
- );
-
- const handlePointerUp = useCallback(() => {
- setIsDragging(false);
- timerRef.current = setTimeout(() => {
- setIsHovered(false);
- }, 1000);
- }, []);
-
- useEffect(() => {
- if (isDragging) {
- window.addEventListener('pointermove', handlePointerMove);
- window.addEventListener('pointerup', handlePointerUp);
- }
-
- return () => {
- window.removeEventListener('pointermove', handlePointerMove);
- window.removeEventListener('pointerup', handlePointerUp);
- };
- }, [isDragging, handlePointerMove, handlePointerUp]);
-
- const handleMouseLeave = useCallback(() => {
- if (!isDragging) {
- setIsHovered(false);
- }
- }, [isDragging]);
+ }, [playerRef]);
return (
<div
className={styles['volume-button']}
onMouseEnter={() => setIsHovered(true)}
- onMouseLeave={handleMouseLeave}
>
<button
type="button"
@@ -159,43 +66,18 @@ export const PlayerVolume: React.FC<{
border: 0,
cursor: 'pointer',
padding: 0,
+ display: 'flex',
+ height: 50,
+ justifyContent: 'center',
+ alignItems: 'center',
}}
>
- {audioState.isMuted ? (
- <IsMutedIcon style={{width: 20, opacity: 0.3}} />
+ {muted ? (
+ <IsMutedIcon style={{height: 20}} />
) : (
- <NotMutedIcon style={{width: 20}} />
- )}{' '}
+ <NotMutedIcon style={{height: 20}} />
+ )}
</button>
- <div
- ref={containerRef}
- onPointerDown={handlePointerDown}
- className={styles['volume-bar']}
- style={{
- height: isHovered ? '80px' : '0px',
- opacity: isHovered ? 1 : 0,
- }}
- >
- <div
- style={{
- height: '100%',
- width: '8px',
- position: 'relative',
- borderRadius: '10px',
- borderTopRightRadius: '10px',
- overflow: 'hidden',
- border: '1px solid var(--ifm-font-color-base)',
- }}
- >
- <div
- className={`${styles['volume-active']} ${isDragging ? undefined : styles['animate-height']}`}
- style={{
- height: `${audioState.isMuted ? 0 : audioState.volume * 100}%`,
- }}
- />
- <div className={styles['volume-background']} />
- </div>
- </div>
</div>
);
};
diff --git a/packages/docs/src/components/Demo/TimeDisplay.tsx b/packages/docs/src/components/Demo/TimeDisplay.tsx
index 7d725d2826..58d0506e7f 100644
--- a/packages/docs/src/components/Demo/TimeDisplay.tsx
+++ b/packages/docs/src/components/Demo/TimeDisplay.tsx
@@ -8,10 +8,9 @@ const formatTime = (timeInSeconds: number) => {
};
export const TimeDisplay: React.FC<{
- durationInFrames: number;
- fps: number;
- playerRef: React.RefObject<PlayerRef>;
-}> = ({durationInFrames, fps, playerRef}) => {
+ readonly fps: number;
+ readonly playerRef: React.RefObject<PlayerRef>;
+}> = ({fps, playerRef}) => {
const [time, setTime] = React.useState(0);
useEffect(() => {
@@ -37,12 +36,9 @@ export const TimeDisplay: React.FC<{
fontFamily: 'monospace',
fontSize: '14px',
display: 'flex',
- gap: '8px',
}}
>
<span>{formatTime(time / fps)}</span>
- <span style={{opacity: 0.6}}>/</span>
- <span style={{opacity: 0.6}}>{formatTime(durationInFrames / fps)}</span>
</div>
);
};
diff --git a/packages/docs/src/components/Demo/player.module.css b/packages/docs/src/components/Demo/player.module.css
index 0df52bb1f2..4c8b73ae49 100644
--- a/packages/docs/src/components/Demo/player.module.css
+++ b/packages/docs/src/components/Demo/player.module.css
@@ -2,16 +2,13 @@
display: flex;
flex-direction: row;
align-items: center;
- padding: 5px 0px;
border-radius: 0.5rem;
- height: 3rem;
}
.controls-wrapper .start-controls {
display: flex;
flex-direction: row;
align-items: center;
- gap: 10px;
width: 100%;
}
@@ -21,78 +18,17 @@
align-items: center;
}
-@media screen and (max-width: 900px) {
- .controls-wrapper {
- margin-top: 0.5rem;
- gap: 15px;
- }
-
- .end-controls {
- gap: 15px;
- }
-}
-
@media screen and (min-width: 901px) {
- .controls-wrapper {
- margin-top: 1rem;
- gap: 20px;
- }
-
.end-controls {
height: 100%;
- gap: 20px;
}
}
.volume-button {
position: relative;
cursor: pointer;
- display: flex;
- height: 100%;
-}
-
-.volume-button .volume-bar {
- position: absolute;
- justify-content: center;
- height: 0px;
- bottom: 35px;
- width: 100%;
- transition:
- height 0.2s,
- opacity 0.3s;
- opacity: 0;
-}
-
-.volume-button .volume-bar .volume-active {
- position: absolute;
- bottom: 0;
- background: var(--ifm-color-primary);
- border-radius: 10px;
- width: 100%;
- z-index: 1;
-}
-
-.volume-button .volume-bar .volume-background {
- position: absolute;
- bottom: 0;
- background: var(--background);
+ display: block;
+ padding-left: 15px;
+ padding-right: 15px;
height: 100%;
- width: 100%;
- z-index: 0;
-}
-
-.volume-button .volume-bar .volume-active.animate-height {
- transition: height 0.1s;
-}
-
-@media screen and (max-width: 900px) {
- .volume-bar {
- display: none;
- }
-}
-
-@media screen and (min-width: 901px) {
- .volume-bar {
- display: flex;
- }
}
diff --git a/packages/docs/src/css/custom.css b/packages/docs/src/css/custom.css
index 80b202d5a0..a8363a964f 100644
--- a/packages/docs/src/css/custom.css
+++ b/packages/docs/src/css/custom.css
@@ -92,6 +92,7 @@ h6 {
--border-color: rgb(234, 234, 234);
--box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
--ifm-out-of-focus: #eaeaea;
+ --box-stroke: #000;
}
[data-theme='dark'] {
--background: #18191a;
@@ -108,6 +109,7 @@ h6 {
--border-color: rgb(42, 42, 42);
--box-shadow: 0 1px 8px rgba(255, 255, 255, 0.2);
--ifm-out-of-focus: #505050;
+ --box-stroke: gray;
}
[data-theme='light'] .docusaurus-highlight-code-line {
diff --git a/packages/docs/src/icons/arrows.tsx b/packages/docs/src/icons/arrows.tsx
index d66910c260..57cbb6c762 100644
--- a/packages/docs/src/icons/arrows.tsx
+++ b/packages/docs/src/icons/arrows.tsx
@@ -1,5 +1,6 @@
import type {SVGProps} from 'react';
import React from 'react';
+import {RED} from '../../components/layout/colors';
export const IconLeft: React.FC<SVGProps<SVGSVGElement>> = (props) => (
<svg viewBox="0 0 320 512" {...props}>
@@ -90,11 +91,11 @@ export const NotMutedIcon: React.FC<SVGProps<SVGSVGElement>> = (props) => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
+ {...props}
viewBox="0 0 640 512"
fill="currentColor"
- {...props}
>
- <path d="M533.6 32.5C598.5 85.2 640 165.8 640 256s-41.5 170.7-106.4 223.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C557.5 398.2 592 331.2 592 256s-34.5-142.2-88.7-186.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM473.1 107c43.2 35.2 70.9 88.9 70.9 149s-27.7 113.8-70.9 149c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C475.3 341.3 496 301.1 496 256s-20.7-85.3-53.2-111.8c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zm-60.5 74.5C434.1 199.1 448 225.9 448 256s-13.9 56.9-35.4 74.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C393.1 284.4 400 271 400 256s-6.9-28.4-17.7-37.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM301.1 34.8C312.6 40 320 51.4 320 64l0 384c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352 64 352c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l67.8 0L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3z" />
+ <path d="M32 160l0 192 128 0L304 480l48 0 0-448-48 0L160 160 32 160zM441.6 332.8C464.9 315.3 480 287.4 480 256s-15.1-59.3-38.4-76.8l-28.8 38.4c11.7 8.8 19.2 22.7 19.2 38.4s-7.5 29.6-19.2 38.4l28.8 38.4zm57.6 76.8c46.6-35 76.8-90.8 76.8-153.6s-30.2-118.6-76.8-153.6l-28.8 38.4c35 26.3 57.6 68.1 57.6 115.2s-22.6 88.9-57.6 115.2l28.8 38.4z" />
</svg>
);
};
@@ -103,11 +104,11 @@ export const IsMutedIcon: React.FC<SVGProps<SVGSVGElement>> = (props) => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
- viewBox="0 0 640 512"
- fill="currentColor"
{...props}
+ viewBox="0 0 640 512"
+ fill={RED}
>
- <path d="M320 64c0-12.6-7.4-24-18.9-29.2s-25-3.1-34.4 5.3L131.8 160 64 160c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l67.8 0L266.7 471.9c9.4 8.4 22.9 10.4 34.4 5.3S320 460.6 320 448l0-384z" />
+ <path d="M48.4 14.8L29.4 .1 0 38l19 14.7L591.5 497.2l19 14.7L639.9 474l-19-14.7-95.1-73.8C557 351.3 576 305.9 576 256c0-62.8-30.2-118.6-76.8-153.6l-28.8 38.4c35 26.3 57.6 68.1 57.6 115.2c0 38.8-15.3 74-40.3 99.9l-38.2-29.7C468.3 308.7 480 283.7 480 256c0-31.4-15.1-59.3-38.4-76.8l-28.8 38.4c11.7 8.8 19.2 22.7 19.2 38.4s-7.5 29.6-19.2 38.4l5.9 7.9L352 250.5 352 32l-48 0L195.2 128.7 48.4 14.8zM352 373.3L81.2 160 32 160l0 192 128 0L304 480l48 0 0-106.7z" />
</svg>
);
};
diff --git a/packages/docs/src/remotion/HomepageVideo/Comp.tsx b/packages/docs/src/remotion/HomepageVideo/Comp.tsx
index 7c5b7d5024..924f21b975 100644
--- a/packages/docs/src/remotion/HomepageVideo/Comp.tsx
+++ b/packages/docs/src/remotion/HomepageVideo/Comp.tsx
@@ -133,7 +133,7 @@ export const HomepageVideoComp: React.FC<z.infer<typeof schema> & Props> = ({
return (
<AbsoluteFill
style={{
- backgroundColor: theme === 'dark' ? '#222' : 'white',
+ backgroundColor: theme === 'dark' ? '#222' : '#fafafa',
}}
>
<Cards