mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-02 17:32:50 +08:00
Pass TS6 stream signaling through connector and gateway
tsclientlib dropped every command missing from the message declarations, which silently swallowed TS6's whole Stream/Call signaling exchange: none of the stream commands are declared, so notifystreamsignaling never reached a consumer. That is why the protocol could only be captured with a standalone raw-tsproto tool. handle_command now splits the parse failure - ParseError::UnknownCommand hands the raw line up as StreamItem::UnknownCommand instead of warning and returning, everything else keeps the old behaviour. The connector unescapes the TS wire format and forwards the stream commands as a streamEvent, filtered to notifystream*/notifyrespondjoinstream* so unrelated undeclared commands stay dropped. The JSON payload stays opaque the whole way - SDP and ICE belong to the browser's RTCPeerConnection, not to the connector. Outbound, streamjoin/streamleave/streamsignal join the existing raw OutCommand handlers; parameter names and order are as recovered from TeamSpeak.dll and confirmed against a live TS6 client. The gateway serializes the payload itself so no literal newline can reach the line-based stdin protocol. Nothing renders video yet - the browser side is still missing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
1 parent
7776a71e84
commit
9f1a63c9d3
3 files changed
+155
-1
No files matched your search
@@ -415,6 +415,27 @@ wss.on("connection", (socket: WebSocket) => {
|
||||
await connection?.sendAudio(msg.pcm);
|
||||
break;
|
||||
}
|
||||
case "joinStream": {
|
||||
const clientId = Number(msg.clientId);
|
||||
if (Number.isFinite(clientId)) {
|
||||
await connection?.joinStream(String(msg.streamId ?? ""), clientId, msg.message ?? "");
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "leaveStream": {
|
||||
const clientId = Number(msg.clientId);
|
||||
if (Number.isFinite(clientId)) {
|
||||
await connection?.leaveStream(String(msg.streamId ?? ""), clientId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "streamSignal": {
|
||||
const clientId = Number(msg.clientId);
|
||||
if (Number.isFinite(clientId) && msg.payload !== undefined) {
|
||||
await connection?.sendStreamSignal(String(msg.streamId ?? ""), clientId, msg.payload);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "setAway": {
|
||||
await connection?.setAway(msg.away, msg.message ?? "");
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user