diff --git a/app/javascript/flavours/glitch/features/video/index.tsx b/app/javascript/flavours/glitch/features/video/index.tsx index 6525451f54..82dfacbab8 100644 --- a/app/javascript/flavours/glitch/features/video/index.tsx +++ b/app/javascript/flavours/glitch/features/video/index.tsx @@ -350,8 +350,10 @@ export const Video: React.FC<{ const updateProgress = () => { nextFrame = requestAnimationFrame(() => { if (videoRef.current) { + const progress = + videoRef.current.currentTime / videoRef.current.duration; void api.start({ - progress: `${(videoRef.current.currentTime / videoRef.current.duration) * 100}%`, + progress: isNaN(progress) ? '0%' : `${progress * 100}%`, immediate: reduceMotion, config: config.stiff, });