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:
1 parent
cacb023ccf
commit
f61c34b42c
10 files changed
+162
-67
No files matched your search
+28
-1
@@ -22,7 +22,8 @@
|
||||
# later finds it there and watches it
|
||||
# 11. stream (TeamSpeak 6 only): a viewer watches a synthetic VP8 + Opus stream
|
||||
# 12. late stream (TeamSpeak 6 only): a viewer that connects after the stream
|
||||
# started finds it (requeststreaminfo) and watches it
|
||||
# started finds it (requeststreaminfo) and watches it; a viewer in the
|
||||
# default channel finds and watches a stream in another channel
|
||||
# 13. the engine's voice features (voelinctl engine): upload a file and
|
||||
# post its link in chat, another client lists the channel's files and
|
||||
# downloads the linked file (compared byte for byte), the file is
|
||||
@@ -171,6 +172,31 @@ stream_late_check() {
|
||||
grep -E "watching|received" "$out"
|
||||
}
|
||||
|
||||
# TeamSpeak 6: the stream runs in another channel. The server announces a
|
||||
# stream only in its channel; a viewer elsewhere looks it up and watches it
|
||||
# from where it is, as the official client can.
|
||||
stream_elsewhere_check() {
|
||||
local addr=$1 admin=$2 out="$STATE_DIR/stream-elsewhere-watch.log"
|
||||
local streamer_out="$STATE_DIR/stream-elsewhere-start.log" streamer="far-$$-$RANDOM"
|
||||
# Semi-permanent, so it outlives this command; it already exists after the first run.
|
||||
# shellcheck disable=SC2086
|
||||
"$VOELINCTL" connect "$addr" $admin --nick admin raw \
|
||||
"channelcreate channel_name=smoke-elsewhere channel_flag_semi_permanent=1" >/dev/null 2>&1 || true
|
||||
"$VOELINCTL" connect "$addr" --nick "$streamer" --channel smoke-elsewhere stream --loopback start \
|
||||
--synthetic --auto-accept --seconds 30 >"$streamer_out" 2>&1 &
|
||||
local streamer_pid=$!
|
||||
for _ in $(seq 1 60); do grep -q "is live" "$streamer_out" 2>/dev/null && break; sleep 0.25; done
|
||||
grep -q "is live" "$streamer_out" || { cat "$streamer_out"; fail "streamer in another channel did not go live"; }
|
||||
if ! "$VOELINCTL" connect "$addr" --nick "elsewhere-$$" stream --loopback watch --streamer-nick "$streamer" \
|
||||
--expect-frames 60 --timeout 25 >"$out" 2>&1; then
|
||||
cat "$out" "$streamer_out"
|
||||
fail "viewer in the default channel did not receive the stream in another channel"
|
||||
fi
|
||||
kill -INT "$streamer_pid" 2>/dev/null || true
|
||||
wait "$streamer_pid" 2>/dev/null || true
|
||||
grep -E "watching|received" "$out"
|
||||
}
|
||||
|
||||
# An observer over ServerQuery must see a voice client join.
|
||||
presence_check() {
|
||||
local addr=$1 query=$2 out="$STATE_DIR/observe.log"
|
||||
@@ -488,6 +514,7 @@ for svc in "${SERVERS[@]}"; do
|
||||
if [[ $svc == ts6 ]]; then
|
||||
stream_check "$addr"
|
||||
stream_late_check "$addr"
|
||||
stream_elsewhere_check "$addr" "$admin"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Reference in new issue
Block a user