Skip to content

Clarify use of stream/start, stream/end and stream/clear messages - #83

Merged
kahrendt merged 2 commits into
Sendspin:mainfrom
OnFreund:patch-1
Jun 29, 2026
Merged

kahrendt merged 2 commits into
Sendspin:mainfrom
OnFreund:patch-1

Conversation

@OnFreund

@OnFreund OnFreund commented May 2, 2026

Copy link
Copy Markdown
Contributor

Clarify the conditions under which the stream/end message is sent.

This change makes the current implementation of Music Assistant non-compliant, but we ensure that other servers don't copy this behavior, which forces unneeded complexity on clients.

Clarify the conditions under which the `stream/end` message is sent.
Expands the documentation for stream/end, stream/clear, and stream/start
to make explicit that stream/end is only for actual playback termination.
Track transitions require no stream commands; seeks and track jumps should
use stream/clear. Also documents stream/start behavior in Playing state
and adds a track jump scenario to the sequence diagram.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@OnFreund OnFreund changed the title Enhance description for stream/end message Clarify use of stream/start, stream/end and stream/clear messages May 19, 2026
@kahrendt

Copy link
Copy Markdown
Contributor

Thanks! We were held back only because the VPE firmware had a bug where this was broken, but stable release 26.6.0 has the proper fix and this can proceed.

@kahrendt
kahrendt merged commit 8bfa0c5 into Sendspin:main Jun 29, 2026
maximmaxim345 added a commit to Sendspin/aiosendspin that referenced this pull request Aug 6, 2026
`SendspinGroup.start_stream()` currently ends the active Sendspin stream
whenever it replaces a `PushStream`, forcing clients through an
unnecessary `stream/end` and subsequent `stream/start`.

When `allow_noncompliant_clients=False`, replace the transport using
`stream/clear` and `stop(keep_stream=True)`, dropping buffered audio
while keeping the protocol stream active. Compatibility mode retains
`stream/end` for legacy clients that mishandle `stream/clear`.

Related:
- Sendspin/spec#83
- Sendspin/sendspin-cpp#54
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.

2 participants