Skip to content

feat: support starting playback at a position via POST /player/play#335

Merged
devgianlu merged 1 commit into
devgianlu:masterfrom
palchrb:claude/go-librespot-play-position-iiq3po
Jul 21, 2026
Merged

feat: support starting playback at a position via POST /player/play#335
devgianlu merged 1 commit into
devgianlu:masterfrom
palchrb:claude/go-librespot-play-position-iiq3po

Conversation

@palchrb

@palchrb palchrb commented Jul 20, 2026

Copy link
Copy Markdown

Up for another one? Essentially just exposing the ability to start a song at a specific position over the API.

Add an optional position (milliseconds) to the play request so a context can be started at a specific position within the selected track, completing the existing skip_to_uri (which track) with where in the track. This mirrors the position handling Spotify Connect transfers already use internally.

When a position is given the track is loaded paused and seeked before unpausing, so no audio plays from 0:00 while it loads — and since loadContext returns once the track is loaded, no client-side polling is needed to time the seek.

Purely additive: a new request field plus seek/resume orchestration in the existing play handler using the existing seek()/play() helpers.

Add an optional `position` (milliseconds) to the play request so a
context can be started at a specific position within the selected track,
completing the existing `skip_to_uri` (which track) with where in the
track. This mirrors the position handling Spotify Connect transfers
already use internally.

When a position is given the track is loaded paused and seeked before
unpausing, so no audio plays from 0:00 while it loads — and since
loadContext returns once the track is loaded, no client-side polling is
needed to time the seek.

Purely additive: a new request field plus seek/resume orchestration in
the existing play handler using the existing seek()/play() helpers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019FHWG4ossSBydy7jbVFWho
@devgianlu
devgianlu merged commit 4f392cf into devgianlu:master Jul 21, 2026
8 checks passed
@palchrb

palchrb commented Jul 21, 2026

Copy link
Copy Markdown
Author

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants