Streams drives one connection's TS6 streams without doing connection IO:
it takes stream notifications and app decisions, owns the str0m peers and
queues requests (to send as commands) and events.
- StreamerSession: setupstream, join requests (auto-accept or ask the
app), one peer per viewer with the offer in respondjoinstreamrequest,
answers and trickled candidates, withdrawal, reconnect (new offer as
reconnectOffer), kick, stop (also before the stream went live),
merged keyframe requests, frame fan-out to connected viewers
- ViewerSession: joinstreamrequest, answer the offer from the response or
an offer/reconnectOffer signal, candidates, denial, stop, removal,
leave, reconnect after a lost connection (up to three times)
- StreamDirectory: streams in the channel from notifications and
client_is_streaming
- FrameSource + SyntheticSource: decodable 1x1 VP8 keyframes (padded)
and Opus silence in real time, for tests and tsctl
- Peer: poll_event for driving many peers from one task; trickled local
candidates carry the bundle mid
Transcript unit tests and an end-to-end test through a fake relay server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G