The server announces a stream only to the clients in the streamer's
channel. Voelin looked up streams that started before it joined
(`requeststreaminfo`), but only in its own channel, so a stream anywhere
else on the server appeared only through a gateway's directory. The
official client lists and joins them without one: `requeststreaminfo`
answers from any channel, and a `joinstreamrequest` from another channel
reaches the streamer (confirmed on the TS6 dev server with the probe).
- Discovery follows every streaming client on the server: it looks up
the streams of clients in other channels as soon as they stream, keeps
them when we or they change channels, and drops them when the streamer
stops or leaves.
- The streams panel lists every channel's streams, ours first, the
others with their channel ("by X · in Gaming"); clients still being
looked up show in any channel. The viewer's note names the stream's
channel instead of claiming it can only be watched from there.
- As a streamer with `stream.permissions = channel` (the default), our
channel is let in and viewers from other channels are asked, as the
setting's description ("who may watch without being asked") says;
they were refused before.
Tested: discovery unit tests for the new rules; the engine's permission
test; the app headless (no gateway) on the TS6 dev server found and played
a stream in another channel and one that started before it joined;
scripts/it-smoke.sh gains a step where a viewer in the default channel
watches a stream in another channel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 KiB
TeamSpeak 6: streams that started before we arrived
Question. The server sends notifystreamstarted only to the clients that
are in the streamer's channel when a stream starts. A client that connects
later, or enters the channel later, sees only the streamer's
client_is_streaming=1. How can it learn the stream id, so that it can send
joinstreamrequest?
Answer. requeststreaminfo clid=<streamer> works. The server answers with
notifystreaminfo: one part per stream of that client, each with the stream
id and the stream's properties. This works from any channel and needs no
permission beyond a guest's. Voelin uses it (see "What Voelin does" below).
Server: teamspeaksystems/teamspeak6-server 6.0.0-beta13.1 [Build: 1790080330],
default permissions, dev/docker-compose.yml. Probed on 2026-09-26 with
voelinctl probe-stream (tools/voelinctl/src/probe.rs).
How the probe works
voelinctl probe-stream 127.0.0.1:9988 --streamer-identity dev/.state/ts6-admin.json
- Client A creates a channel (
channelcreate), which moves it there, and starts a stream withsetupstream(signalling only, no media). - Client B connects to the default channel and tries candidate commands.
- B moves into A's channel and tries them again. Extra commands can be given
with
--try '<raw command>';{id},{a},{b}and{cid}are replaced by the stream id, the two client ids and A's channel. - B sends
joinstreamrequestwith the id it learned. - A sends
updatestreamin several spellings,requeststreaminfofor itself, and a secondsetupstream. - A puts the stream id into its
client_meta_data. B reconnects straight into A's channel and tries again. - A clears
client_meta_dataand stops the stream.
The probe hooks into the raw connection (tsclientlib's unstable API) and
prints every command both clients send and receive. It prints them unparsed,
so notifications the vendored declarations did not know yet
(notifystreamupdated) show up too.
What the server answered
Stream id below: 6b5158dd-22ba-4118-b20d-9196fe975ac7. A is clid 6, B is
clid 7 (8 after reconnecting). return_code values are left out.
(a) Entering the streamer's channel
B -> clientmove cid=3 clid=7
B <- notifycliententerview cfid=0 ctid=3 reasonid=2 clid=6 ... client_meta_data client_is_recording=0 client_is_streaming=1 ...
B <- notifyclientmoved cfid=1 ctid=3 reasonid=0 clid=7
B <- error id=0 msg=ok
No notifystreamstarted and no notifystreaminfo. B only gets the
streaming flag. The same happens when B connects straight into A's channel
(step 6): its notifycliententerview for A carries client_is_streaming=1
and nothing else about the stream.
(b) requeststreaminfo
| Command sent by B | Answer |
|---|---|
requeststreaminfo id=<id> |
error id=1542 msg=missing required parameter |
requeststreaminfo id=<id> clid=6 |
notifystreaminfo clid=6 id=<id> name=late\sjoin\sprobe type=3 accessibility=1 mode=1 viewer=0 bitrate=4608 viewer_limit=0 audio=1, then ok |
requeststreaminfo clid=6 |
the same notifystreaminfo |
requeststreaminfo stream_id=<id> |
1542 |
requeststreaminfo stream_id=<id> clid=6, streamid=<id> clid=6, id=<id> clid=6 msg |
the same notifystreaminfo (only clid matters) |
requeststreaminfo clid=6 id=00000000-0000-0000-0000-000000000000 |
the same notifystreaminfo with the real id: id is ignored |
requeststreaminfo cid=3, requeststreaminfo |
1542 |
requeststreaminfo clid=<B itself, not streaming> |
notifystreaminfo return_code=... with no stream fields, then ok |
requeststreaminfo clid=9999 (no such client) |
notifystreaminfo return_code=... with no stream fields, then ok (no error) |
requeststreaminfo clid=9|clid=10 |
answered for the first part only |
-
clidis the only required parameter. The notification carries the command'sreturn_code. -
It works the same from the default channel (A's stream in another channel) and from A's channel.
-
A client with two streams (A sent a second
setupstreamin step 5) gets both streams in one answer, as two parts:notifystreaminfo return_code=0 clid=6 id=6b5158dd-... name=renamed\sagain type=3 accessibility=1 mode=1 viewer=0 bitrate=4000 viewer_limit=0 audio=1|clid=6 id=069ba23c-b71a-4002-9c97-a91d5ab4428b name=second type=3 accessibility=1 mode=1 viewer=0 bitrate=4608 viewer_limit=0 audio=1 -
The field names differ from
notifystreamstarted:accessibility(notaccess), andviewer, the current number of viewers. Both match theStreamInfoEventprotobuf message embedded in the server. -
A second
setupstreamwhile a stream runs is accepted. It creates a second stream with a new id, and the channel getsnotifystreamstartedfor it.
(c) clientgetvariables clid=6
- From the default channel, without
channelsubscribeall, the answer iserror id=512 msg=invalid clientID: A is not visible to B. - In A's channel the answer is
notifyclientupdated clid=6 client_version=... client_platform=... client_created=... client_totalconnections=... .... It has nothing about streams.
(d) clientinfo clid=6
The answer has client_is_streaming=1 among the usual properties, and no
stream id.
(e) Other command names
requeststreamattendees id=<id>, streamattendees id=<id>, streamlist,
liststreams, requeststreams and requeststreamlist all fail with
error id=256 msg=command not found. The server binary names no other
stream command in text form: setupstream, stopstream, updatestream,
requeststreaminfo, joinstreamrequest, respondjoinstreamrequest,
streamsignaling and removeclientfromstream are all of them.
notifystreamattendees (protobuf StreamAttendeesEvent: return_code,
client_id) never appeared.
(f) updatestream by the streamer
| Command sent by A | Answer |
|---|---|
updatestream id=<id> name=renamed\sprobe |
ok; B (in the channel) and A get notifystreamupdated clid=6 id=<id> name=renamed\sprobe |
updatestream id=<id> |
ok, no notification |
updatestream stream_id=<id> name=... |
1542 (id is required) |
updatestream id=<id> name=renamed\sprobe type=3 bitrate=4608 accessibility=1 mode=1 viewer_limit=0 audio=1 |
ok, no notification (nothing changed) |
updatestream id=<id> name=renamed\sagain type=3 access=1 mode=1 bitrate=4000 viewer_limit=0 audio=1 |
ok; notifystreamupdated clid=6 id=<id> name=renamed\sagain bitrate=4000 |
notifystreamupdated carries only the fields that changed, and goes only to
the clients in the channel. It re-announces nothing to clients that do not
know the stream: with no change it sends nothing at all. So it is no way
to tell latecomers about a stream.
Joining with a learned id
joinstreamrequest id=<id> clid=6 msg=probe is_remove=0 from B, with the id
learned through requeststreaminfo, reaches A as
notifyjoinstreamrequest clid=7 id=<id> msg=probe is_remove=0. is_remove=1
is relayed too. B's reconnect in step 6 gave the same result. The full
join with media works (see "Verification" below).
The server does not limit join requests to the streamer's channel. In a
later run (2026-09-27, same server), B stayed in the default channel, sent
channelsubscribeall, looked the stream up and asked to join:
B -> requeststreaminfo clid=2
B <- notifystreaminfo clid=2 id=e977003a-... name=late\sjoin\sprobe type=3 accessibility=1 mode=1 viewer=0 bitrate=4608 viewer_limit=0 audio=1
B -> joinstreamrequest id=e977003a-... clid=2 msg=probe is_remove=0
A <- notifyjoinstreamrequest clid=3 id=e977003a-... msg=probe is_remove=0
So a stream is "channel scoped" only in whom the server announces it to. A
streamer that wants to admit only its channel has to check where the viewer
is. Voelin's stream.permissions = channel does that.
client_meta_data as a side channel
clientupdate client_meta_data=voelin-stream=<id> is accepted from a guest.
The channel gets notifyclientupdated clid=6 client_meta_data=voelin-stream=<id>,
and a client that arrives later finds the value in its notifycliententerview
for A. So metadata would work as a fallback between Voelin clients, but
requeststreaminfo makes it unnecessary.
Stopping
stopstream id=<id> reason=1: B, in the channel, gets
notifystreamstopped clid=6 id=<id> reason=1.
What Voelin does
-
voelin_stream::proto::stream_infosendsrequeststreaminfo clid=<streamer>. The declarations (crates/proto/tsproto-structs/declarations/Messages.toml) now know the answer's fields (accessibility,viewer,return_code, an optionalidfor the empty answer) andnotifystreamupdated. -
voelin_stream::discovery::Discoveryfollows the clients on the server: their channel andclient_is_streaming. It keeps the stream directory to the streams of every client on the server that streams, in any channel (a stream can be watched from another channel, see below). It looks up a client that streams and whose stream we were not told:- after connecting;
- when a client in another channel starts streaming (the server announces a stream only in its channel);
- after we or the streamer change channels;
- when a streamer in our channel starts and its
notifystreamstartedhas not arrived by the next update of the client list.
Each streamer is looked up once per change of its channel or flag. The answer arrives as
notifystreaminfoand fills the directory like an announcement, soEvent::StreamsChangedlists the stream and it can be watched like any other. -
Where to look is a
StreamLookuptrait.ServerLookup(requeststreaminfo) is the only lookup now. It stops asking on a connection whose server answers "command not found". A later source, such as a gateway's stream directory, plugs in withStreams::add_lookup, and hands what it finds toStreams::discovered. -
notifystreamupdatedupdates the directory (name, bitrate, …). -
The engine (
voelin-core) andvoelinctl stream list/watchfeed the client list intoStreams::update_clients.
Watching from another channel (confirmed, 6.0.0-beta13.1, 2026-10-03): with
B in the default channel and A's stream in another one, requeststreaminfo clid=<A> answers as above and joinstreamrequest reaches A
(notifyjoinstreamrequest), the probe above shows it. The whole join with
media works too: scripts/it-smoke.sh, step "late stream", has a viewer in
the default channel watch a stream in smoke-elsewhere, and the app (no
gateway) listed and played a stream in another channel. Voelin lists the
streams of every channel, ours first; as a streamer with stream.permissions = channel (the default) it lets its channel in and asks the user about
viewers from other channels.
Fallbacks (i) and (ii) from the plan were not built, because the native
command works. (i) would have been a re-announcement by the streamer; (ii)
would have put the stream id into client_meta_data. The probe shows what
they would do: (i) does not work through updatestream, and (ii) would work
between Voelin clients.
Limits
- Streams of official clients are found the same way, since this is a server command: nothing on the streamer's side is needed.
- Only clients we can see are looked up. That is always true of our own channel, which is the only place streams are listed.
- Not probed: streams with
accessibilityother than 1 (public), and whether a server permission can hide streams fromrequeststreaminfo.
Verification
voelinctl connect 127.0.0.1:9988 --nick early stream --loopback start --synthetic --auto-accept, then, once it is live,voelinctl connect 127.0.0.1:9988 stream --loopback watch --streamer-nick early --expect-frames 30: the late viewer printedwatching <id> of early, connected and decoded 30 pictures.scripts/it-smoke.sh, step "stream (late viewer)", does the same.crates/voelin-core/tests/stream_live.rsts6_late_viewer_finds_running_stream(VOELIN_LIVE=1): an engine session connects after the stream is live, gets it inEvent::StreamsChanged, watches it and receives frames.crates/voelin-stream/tests/sessions.rslate_viewer_finds_the_streamruns the same flow through a fake server, anddiscovery.rshas unit tests for when lookups happen.