Attachment playback: PlaybackSource::Attachment end to end once the store plays attachments (Text chat 16) #364

Open
opened 2026-11-12 22:53:01 +00:00 by charles · 0 comments
Owner

Text chat 21 (#271) wires the text chat runtime, but the store does not emit attachment playback yet (chat/media.rs is a stub until Text chat 16). Left for that task or a follow-up: (1) the end-to-end test play_audio_attachment_reaches_mixer of the Text chat 21 plan is not in apps/fluxer/tests/textchat_runtime.rs (no #[ignore]: the Linux CI step runs ignored tests); add it once PlayAttachment emits FetchMedia + PlayClip (select #general of the textchat scenario, play its audio attachment, wait for ApiResult::Media and AudioEvent::ClipFinished, check the null host's output peak, as voice_runtime.rs's soundboard_event_plays_clip); (2) fluxer-audio refuses clips over 30 s and 20 MiB (clip.rs MAX_CLIP_DURATION, MAX_CLIP_BYTES) and fetch_media caps downloads at 32 MiB, so voice messages and longer audio attachments will not play; (3) audio_rt::source_id maps PlaybackSource::Attachment(url) to a clip tag hashed from the URL, which must match whatever tag Text chat 16's PlayClip uses. Also SaveAttachment downloads through fetch_media (32 MiB cap) into memory; attachments up to the instance limit (500 MiB premium) need a streamed download.

Text chat 21 (#271) wires the text chat runtime, but the store does not emit attachment playback yet (`chat/media.rs` is a stub until Text chat 16). Left for that task or a follow-up: (1) the end-to-end test `play_audio_attachment_reaches_mixer` of the Text chat 21 plan is not in `apps/fluxer/tests/textchat_runtime.rs` (no `#[ignore]`: the Linux CI step runs ignored tests); add it once `PlayAttachment` emits `FetchMedia` + `PlayClip` (select #general of the `textchat` scenario, play its audio attachment, wait for `ApiResult::Media` and `AudioEvent::ClipFinished`, check the null host's output peak, as `voice_runtime.rs`'s `soundboard_event_plays_clip`); (2) `fluxer-audio` refuses clips over 30 s and 20 MiB (`clip.rs` `MAX_CLIP_DURATION`, `MAX_CLIP_BYTES`) and `fetch_media` caps downloads at 32 MiB, so voice messages and longer audio attachments will not play; (3) `audio_rt::source_id` maps `PlaybackSource::Attachment(url)` to a clip tag hashed from the URL, which must match whatever tag Text chat 16's `PlayClip` uses. Also `SaveAttachment` downloads through `fetch_media` (32 MiB cap) into memory; attachments up to the instance limit (500 MiB premium) need a streamed download.
charles added this to the Text chat milestone 2026-11-12 22:53:01 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#364
No description provided.