diff --git a/src/hooks/useAudioPlayer.ts b/src/hooks/useAudioPlayer.ts index 128922c..c441926 100644 --- a/src/hooks/useAudioPlayer.ts +++ b/src/hooks/useAudioPlayer.ts @@ -31,38 +31,43 @@ export function useAudioPlayer() { // on demand; a cache miss transparently falls back to the original. const { data: settings } = useGetSettingsQuery(); const streamQuality = settings?.streamQuality; - const isSetup = useRef(false); - // `ended` is registered once below; read the latest loop flag through a ref - // so the listener doesn't need to be re-bound on every queue change. + // `ended` reads the latest loop flag through a ref so the listener doesn't + // need re-binding on every queue change. const loopRef = useRef(queue.loop); loopRef.current = queue.loop; + // The track id the current