Screen share 9: fluxer-core watching, subscriptions, stream volume, viewer chimes #156

Closed
opened 2026-11-12 02:06:55 +00:00 by charles · 0 comments
Owner

Files:

  • Create: crates/fluxer-core/src/voice/stream/{watch.rs,audio_prefs.rs}
  • Modify: voice/stream/mod.rs, voice/live.rs (subscription policy), voice/connection.rs (join/move op 4 carry viewer keys), persist.rs
  • Test: crates/fluxer-core/tests/stream_watch.rs

Interfaces:

  • Produces: UserAction::{WatchStream(StreamKey), AddStream(StreamKey), StopWatching(StreamKey), StopWatchingAll, SetStreamVolume { key, percent }, SetStreamMuted { key, muted }}; StreamAudioPrefs persisted (TTL 6 h, prune on load and every 10 min of store time); RemoteStream states (spec §6.3 "Remote stream state") driven by VideoFrameInfo, track unpublish and subscription failures, Buffering after 5 s via Effect::Schedule.

  • Behaviour: spec §6.3 "Watch", "Subscriptions", stream-audio gain; op 4 per change with all current flags; prune on the streamer's connection leaving; rewrite on its connection change; keys only of the viewer's own channel; chimes with 180 ms debounce / 900 ms cooldown.

  • Step 1: Write failing tests: watch_replaces_add_appends_stop_removes, each_change_sends_op4_with_current_flags, keys_sent_in_join_op4_when_not_connected, streamer_leaving_prunes_key, streamer_connection_change_rewrites_key, key_of_other_channel_never_sent, video_subscribed_iff_watched, stream_audio_subscribed_iff_watched_and_not_deaf, stream_gain_is_curve_times_output_and_zero_when_muted, viewer_chimes_debounced_and_cooled_down, ended_and_buffering_states, audio_prefs_expire_after_6h.

  • Step 2–5: FAIL → implement → PASS → commit feat(core): watching streams.

Depends on: Screen share 8 (#155)

Plan: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/plans/2026-11-11-screenshare.md
Spec: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/specs/2026-11-11-fluxer-native-screenshare-design.md

**Files:** - Create: `crates/fluxer-core/src/voice/stream/{watch.rs,audio_prefs.rs}` - Modify: `voice/stream/mod.rs`, `voice/live.rs` (subscription policy), `voice/connection.rs` (join/move op 4 carry viewer keys), `persist.rs` - Test: `crates/fluxer-core/tests/stream_watch.rs` **Interfaces:** - Produces: `UserAction::{WatchStream(StreamKey), AddStream(StreamKey), StopWatching(StreamKey), StopWatchingAll, SetStreamVolume { key, percent }, SetStreamMuted { key, muted }}`; `StreamAudioPrefs` persisted (TTL 6 h, prune on load and every 10 min of store time); `RemoteStream` states (spec §6.3 "Remote stream state") driven by `VideoFrameInfo`, track unpublish and subscription failures, `Buffering` after 5 s via `Effect::Schedule`. - Behaviour: spec §6.3 "Watch", "Subscriptions", stream-audio gain; op 4 per change with all current flags; prune on the streamer's connection leaving; rewrite on its connection change; keys only of the viewer's own channel; chimes with 180 ms debounce / 900 ms cooldown. - [ ] **Step 1: Write failing tests**: `watch_replaces_add_appends_stop_removes`, `each_change_sends_op4_with_current_flags`, `keys_sent_in_join_op4_when_not_connected`, `streamer_leaving_prunes_key`, `streamer_connection_change_rewrites_key`, `key_of_other_channel_never_sent`, `video_subscribed_iff_watched`, `stream_audio_subscribed_iff_watched_and_not_deaf`, `stream_gain_is_curve_times_output_and_zero_when_muted`, `viewer_chimes_debounced_and_cooled_down`, `ended_and_buffering_states`, `audio_prefs_expire_after_6h`. - [ ] **Step 2–5:** FAIL → implement → PASS → commit `feat(core): watching streams`. Depends on: Screen share 8 (#155) Plan: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/plans/2026-11-11-screenshare.md Spec: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/specs/2026-11-11-fluxer-native-screenshare-design.md
charles added this to the Screen share milestone 2026-11-12 02:06:55 +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#156
No description provided.