Find TeamSpeak 6 streams that started before we joined
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
This commit is contained in:
1 parent
1fa6095a5f
commit
90c23362ef
15 files changed
+977
-76
No files matched your search
@@ -174,8 +174,10 @@ impl App {
|
||||
own: view.state.own_client == Some(s.streamer.0),
|
||||
});
|
||||
}
|
||||
// Streams that started before we joined are only known by the
|
||||
// streaming flag: the server does not tell their ids.
|
||||
// Streams that started before we joined: the server did not
|
||||
// announce them, and the engine is looking them up (they arrive
|
||||
// in `StreamsChanged` like the others). Until then only the
|
||||
// streaming flag is known.
|
||||
let channel = view.state.own_channel;
|
||||
for c in view.presence.clients.values() {
|
||||
let announced = view.streams.iter().any(|s| s.streamer.0 == c.id);
|
||||
|
||||
Reference in new issue
Block a user