Summary
When playing YouTube Music tracks in cliamp, pausing for about a minute and then resuming often does not restart playback.
Reproduction
- Start playing a YouTube Music track (ytmusic provider).
- Pause playback.
- Wait ~60 seconds.
- Press play/resume.
Actual behavior
Playback does not reliably resume.
Expected behavior
Playback should resume reliably after pause, even after longer idle periods.
Technical context
The current unpause reconnect logic appears to reconnect only for tracks considered live (track.IsLive()) in ui/model/playback.go (togglePlayPause + shouldReconnectOnUnpause).
YouTube Music playback is handled through yt-dlp/ffmpeg (playlist.IsYTDL(...)) and may not be marked live, so unpause currently toggles pause instead of rebuilding the stream pipeline. After longer pauses, that pipeline can be stale.
Proposal
Reconnect-on-unpause should also cover yt-dlp streams (or at least YouTube/YouTube Music), not only live streams.
Suggested implementation direction:
- Extend
shouldReconnectOnUnpause(...) to reconnect for playlist.IsYTDL(track.Path) (or YouTube-specific variants).
- Optionally gate this with a pause-duration threshold (e.g., 45–60s) to avoid unnecessary restarts for short pauses.
- Optionally preserve position by snapshotting
m.player.Position() before restart and applying resume after reconnect when feasible.
Why this helps
This aligns runtime behavior with how yt-dlp-backed streams behave in practice and prevents stale pipeline resume failures after longer pauses.
Summary
When playing YouTube Music tracks in cliamp, pausing for about a minute and then resuming often does not restart playback.
Reproduction
Actual behavior
Playback does not reliably resume.
Expected behavior
Playback should resume reliably after pause, even after longer idle periods.
Technical context
The current unpause reconnect logic appears to reconnect only for tracks considered live (
track.IsLive()) inui/model/playback.go(togglePlayPause+shouldReconnectOnUnpause).YouTube Music playback is handled through yt-dlp/ffmpeg (
playlist.IsYTDL(...)) and may not be marked live, so unpause currently toggles pause instead of rebuilding the stream pipeline. After longer pauses, that pipeline can be stale.Proposal
Reconnect-on-unpause should also cover yt-dlp streams (or at least YouTube/YouTube Music), not only live streams.
Suggested implementation direction:
shouldReconnectOnUnpause(...)to reconnect forplaylist.IsYTDL(track.Path)(or YouTube-specific variants).m.player.Position()before restart and applying resume after reconnect when feasible.Why this helps
This aligns runtime behavior with how yt-dlp-backed streams behave in practice and prevents stale pipeline resume failures after longer pauses.