mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-25 07:16:02 +00:00
Fix webcam speed region sync
This commit is contained in:
@@ -1352,8 +1352,9 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(
|
||||
? Math.min(1 / 60, webcamDuration)
|
||||
: targetTime;
|
||||
|
||||
const timelineTimeMs = currentTime * 1000;
|
||||
const activeSpeedRegion = speedRegionsRef.current.find(
|
||||
(region) => targetTime * 1000 >= region.startMs && targetTime * 1000 < region.endMs,
|
||||
(region) => timelineTimeMs >= region.startMs && timelineTimeMs < region.endMs,
|
||||
);
|
||||
const targetPlaybackRate = activeSpeedRegion ? activeSpeedRegion.speed : 1;
|
||||
if (Math.abs(webcamVideo.playbackRate - targetPlaybackRate) > 0.001) {
|
||||
|
||||
Reference in New Issue
Block a user