Smooth animation for the now playing progress bar #25

Open
opened 2026-09-23 22:47:35 +00:00 by NotS1mp · 0 comments
Owner

Summary

The progress bar in the now playing bar updates in steps (jumps) instead of moving smoothly.

Expected behavior

  • The progress bar advances with a smooth, continuous animation while a track is playing.
  • Seeking, pausing and changing tracks still update the bar instantly and correctly, without the animation lagging behind.

Considerations

  • Update the position with requestAnimationFrame (interpolating from the audio element's currentTime) or use CSS transitions/transforms instead of re-rendering on every timeupdate event.
  • Prefer transform: scaleX() over changing width for better performance.
  • Respect prefers-reduced-motion.
## Summary The progress bar in the now playing bar updates in steps (jumps) instead of moving smoothly. ## Expected behavior - The progress bar advances with a smooth, continuous animation while a track is playing. - Seeking, pausing and changing tracks still update the bar instantly and correctly, without the animation lagging behind. ## Considerations - Update the position with `requestAnimationFrame` (interpolating from the audio element's `currentTime`) or use CSS transitions/transforms instead of re-rendering on every `timeupdate` event. - Prefer `transform: scaleX()` over changing `width` for better performance. - Respect `prefers-reduced-motion`.
NotS1mp added the Kind/Enhancement
Priority
Low
4
labels 2026-09-23 22:47:35 +00:00
Sign in to join this conversation.