Skip to content

🎥 Make videos programmatically with React

fix onDuration warning

Jonny Burger74ff32768473
diff --git a/packages/core/src/video/VideoForRendering.tsx b/packages/core/src/video/VideoForRendering.tsx
index 0c6f18b926..f74dd7104d 100644
--- a/packages/core/src/video/VideoForRendering.tsx
+++ b/packages/core/src/video/VideoForRendering.tsx
@@ -34,7 +34,10 @@ type VideoForRenderingProps = RemotionVideoProps & {
const VideoForRenderingForwardFunction: React.ForwardRefRenderFunction<
HTMLVideoElement,
VideoForRenderingProps
-> = ({onError, volume: volumeProp, playbackRate, ...props}, ref) => {
+> = (
+ {onError, volume: volumeProp, playbackRate, onDuration, ...props},
+ ref
+) => {
const absoluteFrame = useTimelinePosition();
const frame = useCurrentFrame();
@@ -216,7 +219,7 @@ const VideoForRenderingForwardFunction: React.ForwardRefRenderFunction<
mediaStartsAt,
]);
- const {src, onDuration} = props;
+ const {src} = props;
// If video source switches, make new handle
if (getRemotionEnvironment() === 'rendering') {