Skip to content

🎥 Make videos programmatically with React

`remotion`: Include "startFrom" and "endAt" in OffthreadVideo props type

Jonny Burgerd541c9404ef2
diff --git a/packages/core/src/video/OffthreadVideo.tsx b/packages/core/src/video/OffthreadVideo.tsx
index 68a1924d7d..32a6a86a74 100644
--- a/packages/core/src/video/OffthreadVideo.tsx
+++ b/packages/core/src/video/OffthreadVideo.tsx
@@ -4,16 +4,16 @@ import {Sequence} from '../Sequence.js';
import {validateMediaProps} from '../validate-media-props.js';
import {validateStartFromProps} from '../validate-start-from-props.js';
import {OffthreadVideoForRendering} from './OffthreadVideoForRendering.js';
-import type {OffthreadVideoProps, RemotionMainVideoProps} from './props.js';
+import type {OffthreadVideoProps} from './props.js';
import {VideoForDevelopment} from './VideoForDevelopment.js';
/**
* @description This method imports and displays a video, similar to <Video />. During rendering, it extracts the exact frame from the video and displays it in an <img> tag
* @see [Documentation](https://www.remotion.dev/docs/offthreadvideo)
*/
-export const OffthreadVideo: React.FC<
- Omit<OffthreadVideoProps & RemotionMainVideoProps, 'loop'>
-> = (props) => {
+export const OffthreadVideo: React.FC<Omit<OffthreadVideoProps, 'loop'>> = (
+ props,
+) => {
// Should only destruct `startFrom` and `endAt` from props,
// rest gets drilled down
const {startFrom, endAt, ...otherProps} = props;
diff --git a/packages/core/src/video/props.ts b/packages/core/src/video/props.ts
index 6a31de46a7..b240b8a845 100644
--- a/packages/core/src/video/props.ts
+++ b/packages/core/src/video/props.ts
@@ -38,4 +38,5 @@ export type OffthreadVideoProps = {
acceptableTimeShiftInSeconds?: number;
allowAmplificationDuringRender?: boolean;
transparent?: boolean;
-} & DeprecatedOffthreadVideoProps;
+} & RemotionMainVideoProps &
+ DeprecatedOffthreadVideoProps;