Skip to content

🎥 Make videos programmatically with React

isThumbnail is unused

Jonny Burger77f5284110d7
diff --git a/packages/cli/src/editor/components/Thumbnail.tsx b/packages/cli/src/editor/components/Thumbnail.tsx
index d5a0fb16a3..416b65961e 100644
--- a/packages/cli/src/editor/components/Thumbnail.tsx
+++ b/packages/cli/src/editor/components/Thumbnail.tsx
@@ -68,7 +68,6 @@ export const Thumbnail: React.FC<{
return {
playing: false,
frame: frameToDisplay,
- isThumbnail: true,
rootId: thumbnailId,
};
}, [frameToDisplay, thumbnailId]);
diff --git a/packages/cli/src/editor/helpers/calculate-timeline.ts b/packages/cli/src/editor/helpers/calculate-timeline.ts
index 3719261783..bfa2d33ccc 100644
--- a/packages/cli/src/editor/helpers/calculate-timeline.ts
+++ b/packages/cli/src/editor/helpers/calculate-timeline.ts
@@ -35,7 +35,6 @@ export const calculateTimeline = ({
id: 'seq',
parent: null,
type: 'sequence',
- isThumbnail: false,
rootId: '-',
},
depth: 0,
diff --git a/packages/cli/src/editor/helpers/get-timeline-sequence-hash.ts b/packages/cli/src/editor/helpers/get-timeline-sequence-hash.ts
index 86b26cd4ae..1e6e9bca89 100644
--- a/packages/cli/src/editor/helpers/get-timeline-sequence-hash.ts
+++ b/packages/cli/src/editor/helpers/get-timeline-sequence-hash.ts
@@ -3,7 +3,7 @@ import {TSequence} from 'remotion';
// The goal for this function is to calculate an as unique as possible identifier
// for a sequence based on it's properties. A sequence can be registered multiple times
// from main preview and from thumbnails and we use this to deduplicate it.
-// This is why we don't use `id` and `isThumbnail` properties as they will
+// This is why we don't use `id` properties as they will
// differ as a hash.
export const getTimelineSequenceHash = (
sequence: TSequence,
diff --git a/packages/core/src/CompositionManager.tsx b/packages/core/src/CompositionManager.tsx
index bb66527c6c..68ae5b5558 100644
--- a/packages/core/src/CompositionManager.tsx
+++ b/packages/core/src/CompositionManager.tsx
@@ -39,7 +39,6 @@ export type TSequence = {
id: string;
displayName: string;
parent: string | null;
- isThumbnail: boolean;
rootId: string;
} & EnhancedTSequenceData;
diff --git a/packages/core/src/RemotionRoot.tsx b/packages/core/src/RemotionRoot.tsx
index d21ab108cf..57f801bf61 100644
--- a/packages/core/src/RemotionRoot.tsx
+++ b/packages/core/src/RemotionRoot.tsx
@@ -116,7 +116,6 @@ export const RemotionRoot: React.FC = ({children}) => {
return {
frame,
playing,
- isThumbnail: false,
rootId: remotionRootId,
};
}, [frame, playing, remotionRootId]);
diff --git a/packages/core/src/audio/AudioForDevelopment.tsx b/packages/core/src/audio/AudioForDevelopment.tsx
index 409fcbff69..106471b9ee 100644
--- a/packages/core/src/audio/AudioForDevelopment.tsx
+++ b/packages/core/src/audio/AudioForDevelopment.tsx
@@ -17,7 +17,7 @@ export const AudioForDevelopment: React.FC<RemotionAudioProps> = (props) => {
const videoConfig = useUnsafeVideoConfig();
const [playing] = usePlayingState();
- const {isThumbnail, rootId} = useContext(TimelineContext);
+ const {rootId} = useContext(TimelineContext);
const parentSequence = useContext(SequenceContext);
const actualFrom = parentSequence
@@ -116,7 +116,6 @@ export const AudioForDevelopment: React.FC<RemotionAudioProps> = (props) => {
from: 0,
parent: parentSequence?.id ?? null,
displayName: getAssetFileName(props.src),
- isThumbnail,
rootId,
volume: volumes,
});
@@ -125,7 +124,6 @@ export const AudioForDevelopment: React.FC<RemotionAudioProps> = (props) => {
actualFrom,
duration,
id,
- isThumbnail,
parentSequence,
props.src,
registerSequence,
diff --git a/packages/core/src/sequencing/index.tsx b/packages/core/src/sequencing/index.tsx
index 8559796e53..f8286c40ad 100644
--- a/packages/core/src/sequencing/index.tsx
+++ b/packages/core/src/sequencing/index.tsx
@@ -31,7 +31,7 @@ export const Sequence: React.FC<{
}> = ({from, durationInFrames, children, name, layout = 'absolute-fill'}) => {
const [id] = useState(() => String(Math.random()));
const parentSequence = useContext(SequenceContext);
- const {isThumbnail, rootId} = useContext(TimelineContext);
+ const {rootId} = useContext(TimelineContext);
const cumulatedFrom = parentSequence
? parentSequence.cumulatedFrom + parentSequence.relativeFrom
: 0;
@@ -105,7 +105,6 @@ export const Sequence: React.FC<{
displayName: timelineClipName,
parent: parentSequence?.id ?? null,
type: 'sequence',
- isThumbnail,
rootId,
});
return () => {
@@ -120,7 +119,6 @@ export const Sequence: React.FC<{
timelineClipName,
unregisterSequence,
parentSequence?.id,
- isThumbnail,
actualDurationInFrames,
rootId,
from,
diff --git a/packages/core/src/test/nested-sequences.test.tsx b/packages/core/src/test/nested-sequences.test.tsx
index fcd1d15514..47afd73435 100644
--- a/packages/core/src/test/nested-sequences.test.tsx
+++ b/packages/core/src/test/nested-sequences.test.tsx
@@ -31,7 +31,6 @@ test('It should calculate the correct offset in nested sequences', () => {
rootId: 'hi',
frame: 40,
playing: false,
- isThumbnail: false,
}}
>
<Sequence from={20} durationInFrames={100}>
@@ -53,7 +52,6 @@ test('Negative offset test', () => {
value={{
frame: 40,
playing: false,
- isThumbnail: false,
rootId: 'hi',
}}
>
@@ -91,7 +89,6 @@ test('Nested negative offset test', () => {
value={{
frame,
playing: false,
- isThumbnail: false,
rootId: 'hi',
}}
>
@@ -132,7 +129,6 @@ test('Negative offset edge case', () => {
value={{
frame,
playing: false,
- isThumbnail: false,
rootId: 'hi',
}}
>
diff --git a/packages/core/src/timeline-position-state.ts b/packages/core/src/timeline-position-state.ts
index 7f335ef9be..f3a2430e77 100644
--- a/packages/core/src/timeline-position-state.ts
+++ b/packages/core/src/timeline-position-state.ts
@@ -3,7 +3,6 @@ import {createContext, useContext} from 'react';
export type TimelineContextValue = {
frame: number;
playing: boolean;
- isThumbnail: boolean;
rootId: string;
};
@@ -15,7 +14,6 @@ export type SetTimelineContextValue = {
export const TimelineContext = createContext<TimelineContextValue>({
frame: 0,
playing: false,
- isThumbnail: true,
rootId: '',
});