diff --git a/packages/webui/components/viewers/video-player.tsx b/packages/webui/components/viewers/video-player.tsx index 8df702f8..c77b003f 100644 --- a/packages/webui/components/viewers/video-player.tsx +++ b/packages/webui/components/viewers/video-player.tsx @@ -517,10 +517,10 @@ const VideoPlayer: React.FC = ({ progress: duration > 0 ? (current / duration) * 100 : 0, } }) + } - if (onTimeUpdate) { - onTimeUpdate(current) - } + if (onTimeUpdate) { + onTimeUpdate(current) } }) @@ -577,10 +577,6 @@ const VideoPlayer: React.FC = ({ } }) - if (onTimeUpdate) { - onTimeUpdate(current) - } - animationFrameId = requestAnimationFrame(updateProgress) } } @@ -594,7 +590,7 @@ const VideoPlayer: React.FC = ({ cancelAnimationFrame(animationFrameId) } } - }, [state.isPlaying, playerRef, data.media?.metadata?.duration, onTimeUpdate]) + }, [state.isPlaying, playerRef, data.media?.metadata?.duration]) const handleMouseMove = useCallback(() => { // Always show controls on movement