Skip to content

🎥 Make videos programmatically with React

remotion.dev/brand: Simplify Scene 11 timeline structure

Jonny Burger6af06fa458b6
diff --git a/packages/brand/src/announcements/whats-new-in-remotion/EndCard.tsx b/packages/brand/src/announcements/whats-new-in-remotion/EndCard.tsx
index 383bd13710..b2e74e006b 100644
--- a/packages/brand/src/announcements/whats-new-in-remotion/EndCard.tsx
+++ b/packages/brand/src/announcements/whats-new-in-remotion/EndCard.tsx
@@ -105,6 +105,7 @@ export const EndCard: React.FC<{readonly platform: EndCardPlatform}> = ({
justifyContent: 'center',
padding: 60,
}}
+ name={'Endcard'}
>
<div
style={{
diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene11.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene11.tsx
index 134f1129b5..1029861546 100644
--- a/packages/brand/src/announcements/whats-new-in-remotion/Scene11.tsx
+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene11.tsx
@@ -1,5 +1,5 @@
import {Video} from '@remotion/media';
-import {AbsoluteFill, interpolate, useVideoConfig} from 'remotion';
+import {interpolate, useVideoConfig} from 'remotion';
import {assetUrl} from './assets';
import {SILENCES} from './Composition';
import type {EndCardPlatform} from './EndCard';
@@ -23,20 +23,16 @@ export const Scene11: React.FC<{platform: EndCardPlatform}> = ({platform}) => {
const videoX = interpolate(overlayProgress, [0, 1], [0, -20]);
return (
- <AbsoluteFill name={'Video'}>
- <AbsoluteFill
+ <>
+ <Video
style={{transform: `translateX(${videoX}%)`}}
- name={'Container'}
- >
- <Video
- src={assetUrl(FILE)}
- trimBefore={trimBefore}
- trimAfter={trimAfter}
- />
- </AbsoluteFill>
+ src={assetUrl(FILE)}
+ trimBefore={trimBefore}
+ trimAfter={trimAfter}
+ />
<SlideInOverlay startAt={overlayStartAt} holdDuration={9999}>
<EndCard platform={platform} />
</SlideInOverlay>
- </AbsoluteFill>
+ </>
);
};
diff --git a/packages/brand/src/announcements/whats-new-in-remotion/SlideInOverlay.tsx b/packages/brand/src/announcements/whats-new-in-remotion/SlideInOverlay.tsx
index 849f66df12..16466a467d 100644
--- a/packages/brand/src/announcements/whats-new-in-remotion/SlideInOverlay.tsx
+++ b/packages/brand/src/announcements/whats-new-in-remotion/SlideInOverlay.tsx
@@ -88,6 +88,7 @@ export const SlideInOverlay: React.FC<SlideInOverlayProps> = ({
backgroundColor,
overflow: 'hidden',
}}
+ showInTimeline={false}
>
{children}
</AbsoluteFill>