Skip to content

🎥 Make videos programmatically with React

`@remotion/player`: Keep knob visible while dragging and moving outside the bar

Jonny Burger323835fa4e31
diff --git a/packages/player/src/PlayerSeekBar.tsx b/packages/player/src/PlayerSeekBar.tsx
index ed448358af..dbcf668a2b 100644
--- a/packages/player/src/PlayerSeekBar.tsx
+++ b/packages/player/src/PlayerSeekBar.tsx
@@ -176,9 +176,9 @@ export const PlayerSeekBar: React.FC<{
(frame / Math.max(1, durationInFrames - 1)) * width - KNOB_SIZE / 2,
),
boxShadow: '0 0 2px black',
- opacity: Number(barHovered),
+ opacity: Number(barHovered || dragging.dragging),
};
- }, [barHovered, durationInFrames, frame, width]);
+ }, [barHovered, dragging.dragging, durationInFrames, frame, width]);
const fillStyle: React.CSSProperties = useMemo(() => {
return {