Screen share 8: fluxer-core::voice::stream state, ports and selectors #155

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

Files:

  • Create: crates/fluxer-core/src/voice/stream/{mod.rs,state.rs}, crates/fluxer-core/src/selectors/streams.rs
  • Modify: crates/fluxer-core/src/voice/{mod.rs,port.rs,live.rs}, crates/fluxer-core/src/{effect.rs,event.rs,app.rs,lib.rs}, crates/fluxer-core/Cargo.toml (nothing new expected)
  • Test: crates/fluxer-core/tests/streams.rs

Interfaces:

  • Produces: Voice.streams: Streams (spec §6.1; later fields Default); every port addition of spec §6.4 (VoiceCommand::{PublishScreenShare, UpdateScreenShareEncoding, RepublishScreenShare, UnpublishScreenShare, SetScreenShareAudioMuted}, VoiceEvent::{LocalTrackPublished, LocalTrackUnpublished, CodecCapabilities, VideoFrameInfo, EncoderStats}, CaptureCommand, CaptureEvent, Effect::Capture(CaptureCommand), CoreEvent::Capture(CaptureEvent), VideoCodec, CodecCap, EncodeParams { width, height, fps, max_bitrate, degradation: Degradation, scalability_mode: Option<String>, backend: EncoderBackend }, SourceChoice, CaptureTarget, AudioRule, CaptureSources, PlaybackSource::Stream(String), Chime::{ScreenShareStart, ScreenShareStop}); selectors streams_in_channel, spectators, is_streaming(&App, user_id), stream_of(&App, user_id, connection_id) -> Option<StreamKey>; the live room keeps screen-share publications per participant (they were ignored before) without subscribing.

  • The capture-side port types mirror fluxer-capture's but are defined here (the core does not depend on that crate); the runtime converts.

  • Step 1: Write failing tests: self_stream_state_lists_stream_in_channel, viewers_counted_from_viewer_keys_excluding_owner, absent_viewer_keys_are_not_listed_as_watching, screen_tracks_recorded_but_not_subscribed, dm_stream_keys, new_ports_have_debug_without_secrets.

  • Step 2–5: FAIL → implement → PASS → commit feat(core): stream state, ports and selectors.

Depends on: Screen share 7 (#154)

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/{mod.rs,state.rs}`, `crates/fluxer-core/src/selectors/streams.rs` - Modify: `crates/fluxer-core/src/voice/{mod.rs,port.rs,live.rs}`, `crates/fluxer-core/src/{effect.rs,event.rs,app.rs,lib.rs}`, `crates/fluxer-core/Cargo.toml` (nothing new expected) - Test: `crates/fluxer-core/tests/streams.rs` **Interfaces:** - Produces: `Voice.streams: Streams` (spec §6.1; later fields `Default`); every port addition of spec §6.4 (`VoiceCommand::{PublishScreenShare, UpdateScreenShareEncoding, RepublishScreenShare, UnpublishScreenShare, SetScreenShareAudioMuted}`, `VoiceEvent::{LocalTrackPublished, LocalTrackUnpublished, CodecCapabilities, VideoFrameInfo, EncoderStats}`, `CaptureCommand`, `CaptureEvent`, `Effect::Capture(CaptureCommand)`, `CoreEvent::Capture(CaptureEvent)`, `VideoCodec`, `CodecCap`, `EncodeParams { width, height, fps, max_bitrate, degradation: Degradation, scalability_mode: Option<String>, backend: EncoderBackend }`, `SourceChoice`, `CaptureTarget`, `AudioRule`, `CaptureSources`, `PlaybackSource::Stream(String)`, `Chime::{ScreenShareStart, ScreenShareStop}`); selectors `streams_in_channel`, `spectators`, `is_streaming(&App, user_id)`, `stream_of(&App, user_id, connection_id) -> Option<StreamKey>`; the live room keeps screen-share publications per participant (they were ignored before) without subscribing. - The capture-side port types mirror `fluxer-capture`'s but are defined here (the core does not depend on that crate); the runtime converts. - [ ] **Step 1: Write failing tests**: `self_stream_state_lists_stream_in_channel`, `viewers_counted_from_viewer_keys_excluding_owner`, `absent_viewer_keys_are_not_listed_as_watching`, `screen_tracks_recorded_but_not_subscribed`, `dm_stream_keys`, `new_ports_have_debug_without_secrets`. - [ ] **Step 2–5:** FAIL → implement → PASS → commit `feat(core): stream state, ports and selectors`. Depends on: Screen share 7 (#154) 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#155
No description provided.