Find and watch streams in every channel, without a gateway

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>
This commit is contained in:
selikhovandClaude Opus 5.5 committed 2026-10-03 22:01:10 +03:00
1 parent cacb023ccf
commit f61c34b42c
10 files changed
+162 -67

No files matched your search

+16 -2
View File
@@ -174,9 +174,12 @@ for A. So metadata would work as a fallback between Voelin clients, but
optional `id` for the empty answer) and `notifystreamupdated`.
- `voelin_stream::discovery::Discovery` follows the clients on the server:
their channel and `client_is_streaming`. It keeps the stream directory to
the streams in our own channel. It looks up a client that streams in our
channel and whose stream we were not told:
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 `notifystreamstarted`
has not arrived by the next update of the client list.
@@ -194,6 +197,17 @@ for A. So metadata would work as a fallback between Voelin clients, but
- The engine (`voelin-core`) and `voelinctl stream list/watch` feed the
client list into `Streams::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