diff --git a/apps/web/src/components/player/AudioPlayer.tsx b/apps/web/src/components/player/AudioPlayer.tsx index b921f56..04805f4 100644 --- a/apps/web/src/components/player/AudioPlayer.tsx +++ b/apps/web/src/components/player/AudioPlayer.tsx @@ -18,11 +18,13 @@ export function AudioPlayer({ className }: AudioPlayerProps) { const track = usePlayerStore((state) => state.track); const status = usePlayerStore((state) => state.status); const positionMs = usePlayerStore((state) => state.positionMs); + const previewDurationMs = usePlayerStore((state) => state.previewDurationMs); const volume = usePlayerStore((state) => state.volume); const isMuted = usePlayerStore((state) => state.isMuted); const toggle = usePlayerStore((state) => state.toggle); const seek = usePlayerStore((state) => state.seek); const tick = usePlayerStore((state) => state.tick); + const setPreviewDuration = usePlayerStore((state) => state.setPreviewDuration); const pause = usePlayerStore((state) => state.pause); const play = usePlayerStore((state) => state.play); const setVolume = usePlayerStore((state) => state.setVolume); @@ -59,7 +61,10 @@ export function AudioPlayer({ className }: AudioPlayerProps) { const isUnavailable = status === 'unavailable' || track.previewUrl === null; const isPlaying = status === 'playing'; - const progress = track.durationMs > 0 ? positionMs / track.durationMs : 0; + // The