/
/
/
# What does this implement/fix? Over a remote connection album art travels through the WebRTC connection. On the dedicated image channel added in #5635 each image was hex-encoded inside a JSON message and then base64-chunked, so a 200 KB cover cost roughly 530 KB on the wire — about 2.7x the image, over what is usually the user's home upstream. That channel carries nothing but proxied responses, so its format is ours to pick: images now travel as themselves, a small JSON header followed by the body as raw binary frames. - Send responses on the image channel as a JSON header plus raw binary body frames - Size those frames against the channel's negotiated message limit, so a peer that advertises a small limit still gets frames it can accept - Hold the channel for a whole response, since binary frames carry no request id - Leave the hex-in-JSON response untouched for clients that proxy over the API channel (the mobile app and every released frontend) No schema bump: schema 49 and the image channel are both still unreleased, so no client in the wild expects the old format on this channel. Pacing was measured rather than assumed, and deliberately left alone: chunk size makes no difference (every gap sits under the run-to-run spread), and raising the buffered-amount-low threshold *deadlocks* the sender — libdatachannel only signals on a downward crossing, which a stop-and-wait sender never makes. **Related issue (if applicable):** - follow-up to #5635 ## Types of changes - [ ] Bugfix (non-breaking change which fixes an issue) — `bugfix` - [ ] New feature (non-breaking change which adds functionality) — `new-feature` - [x] Enhancement to an existing feature — `enhancement` - [ ] New music/player/metadata/plugin provider — `new-provider` - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) — `breaking-change` - [ ] Refactor (no behaviour change) — `refactor` - [ ] Documentation only — `documentation` - [ ] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` ## Checklist - [x] The code change is tested and works locally. - [x] `pre-commit run --all-files` passes. - [x] `pytest` passes, and tests have been added/updated under `tests/` where applicable. - [ ] For changes to shared models, the companion PR in `music-assistant/models` is linked. - [x] For changes affecting the UI, the companion PR in `music-assistant/frontend` is linked: https://github.com/music-assistant/frontend/pull/2507 - [x] I have read and complied with the project's [AI Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md) for any AI-assisted contributions. - [ ] I have [raised a PR against the documentation repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md) targeting the main or beta branch as appropriate.