Fold stream/request-format into client/state - #195
Merged
Conversation
kahrendt
reviewed
Sep 2, 2026
kahrendt
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
stream/request-formatwas a request in name only: a decline is invisible (the stream continues and the request MUST NOT be treated as an error), so a client only ever learns the operative configuration fromstream/start, and with no stream active the server already had to remember the requested format as de facto state. Per the CONTRIBUTING rule that fields expected to change during a connection belong inclient/state, the message is dropped and its fields move there.Changes
playergains an optionalformatpreference in its state object; absent means the server selects per thesupported_formatspriority order, a present preference must be one of the listed entries (which also removes the previously undefined partial-request case), and the server may still deviate, for example to match a track's native sample rate or to apply an operator-configured format.artworkmoves the per-channelsource/format/width/heightinto a statechannelsarray andartwork@v1_supportis removed entirely: the array is positional from channel 0, an uncovered channel issource: 'none'so clients may truncate after their last active channel, an array longer than 4 is a protocol error, andformat/width/heightare required only whensourceis not'none'.visualizermovestypes,rate_maxandspectruminto state; its hello object keeps onlybuffer_capacity.stream/startnow derives each role's configuration from the hello constants plus the role's current state, answers a state change on an active stream with a newstream/startwhen the configuration changed, never starts a stream in response, and should wait for the state update a role (re-)activation requires before starting that role's stream.Breaking changes
The
stream/request-formatmessage is removed; clients that send it break, and servers drop the handler. Artwork clients no longer sendartwork@v1_supportand instead carry their channel configuration inclient/state; visualizer clients keep onlybuffer_capacityin their support object and carry the rest inclient/state. Players are affected only if they usedstream/request-format; the newformatstate field is optional.Conflicts with #177 in the player state object; whichever lands second needs a rebase.
Closes #190