The server announces a stream (notifystreamstarted) only to the clients in the streamer's channel when it starts. A client that connects or enters the channel later saw the streamer's client_is_streaming flag but could not watch. The probe (docs/research/ts6-late-join.md) found that `requeststreaminfo clid=<streamer>` answers with notifystreaminfo, one part per stream of the client, from any channel. voelin-stream gets a discovery module. Streams::update_clients takes the clients on the server (channel and streaming flag), keeps the directory to the streams in our channel, and looks up the streams of streamers in our channel we were not told about: after connecting, after we or they change channels, and when an announcement did not come. The answer fills the directory like an announcement, so Event::StreamsChanged lists the stream and it is watched like any other. Where streams are looked up is a StreamLookup trait (the server now; a gateway directory can plug in with Streams::add_lookup and report through Streams::discovered). notifystreamupdated (updatestream) now updates the directory. The engine and `voelinctl stream list/watch` feed the client list in. The declarations learn the notifystreaminfo answer's fields, notifystreamupdated and requeststreaminfo. Tests: a fake-server session test and an engine live test with a viewer that arrives after the stream is live, discovery unit tests, parsing of the server's answers; it-smoke gets a late-viewer step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
33 lines
1.3 KiB
Rust
33 lines
1.3 KiB
Rust
//! TeamSpeak 6 streams (screen sharing): the signalling commands the server
|
|
//! relays, the JSON signal messages, and str0m WebRTC peer connections.
|
|
//!
|
|
//! Only TeamSpeak 6 servers support streams. Media flows peer to peer; the
|
|
//! server only forwards `respondjoinstreamrequest` (the streamer's offer) and
|
|
//! `streamsignaling` (answer and ICE candidates).
|
|
//!
|
|
//! [`Streams`] (module [`session`]) ties it together for one connection: the
|
|
//! streams in our channel, our own stream with a peer per viewer, and the
|
|
//! streams we watch. [`FrameSource`] is where a streamer's encoded frames come from.
|
|
|
|
pub mod discovery;
|
|
pub mod layer;
|
|
pub mod peer;
|
|
pub mod proto;
|
|
pub mod session;
|
|
pub mod signal;
|
|
pub mod source;
|
|
pub mod stun;
|
|
|
|
pub use discovery::{ClientState, StreamLookup};
|
|
pub use layer::{LayerId, LayerSet, LayerSpec};
|
|
pub use peer::{MediaFrame, Peer, PeerConfig, PeerError, PeerEvent, VideoCodec};
|
|
pub use proto::{LeaveReason, StreamInfo, StreamKind, StreamNotification, StreamSetup};
|
|
pub use session::{
|
|
EndReason, Output, Request, SessionError, StreamDirectory, StreamEvent, StreamerEvent,
|
|
StreamerOptions, Streams, ViewerInfo, ViewerState, WatchEvent, WatchState,
|
|
};
|
|
pub use signal::{Signal, SignalError};
|
|
pub use source::{EncodedFrame, FrameSource, SyntheticSource};
|
|
pub use str0m::format::Codec;
|
|
pub use str0m::media::{Frequency, MediaKind, MediaTime};
|