Skip to content

Commit 7e783d2

Browse files
committed
Pass initial speed to VirtualVideo
1 parent bb3eb2a commit 7e783d2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

web/libs/editor/src/components/VideoCanvas/VideoCanvas.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,7 @@ export const VideoCanvas = memo(
654654
controls={false}
655655
preload="auto"
656656
src={props.src}
657+
speed={props.speed}
657658
muted={props.muted ?? false}
658659
canPlayType={(supported) => (supportedFileTypeRef.current = supported)}
659660
onPlay={handleVideoPlay}

web/libs/editor/src/components/VideoCanvas/VirtualVideo.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { patchPlayPauseMethods } from "../../utils/patchPlayPauseMethods";
55

66
type VirtualVideoProps = DetailedHTMLProps<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement> & {
77
canPlayType?: (supported: boolean) => void;
8+
speed?: number;
89
};
910

1011
const DEBUG_MODE = false;
@@ -95,6 +96,7 @@ export const VirtualVideo = forwardRef<HTMLVideoElement, VirtualVideoProps>((pro
9596
videoEl.muted = !!props.muted;
9697
videoEl.controls = false;
9798
videoEl.preload = "auto";
99+
videoEl.playbackRate = props.speed ?? 1;
98100

99101
if (isFF(FF_LSDV_4711)) videoEl.crossOrigin = "anonymous";
100102

0 commit comments

Comments
 (0)