mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 01:42:50 +08:00
Add whisper (targeted voice to channels/clients)
Connector: a new "whisper <channelIds>;<clientIds>" stdin command sets persistent whisper targets; outgoing audio then goes out as AudioData::C2SWhisper instead of the normal C2S broadcast until "unwhisper" clears it. Gateway relays a setWhisperTargets message the same way. Frontend: a toolbar toggle lists channels as checkboxes, and the client context menu gets an "add/remove as whisper target" entry; selecting any target switches all subsequent outgoing voice to whisper mode. Verified against the real test server: setting a channel target and sending a frame produced no connector error, and clearing targets resumed normal voice cleanly.
This commit is contained in:
1 parent
7217bc146a
commit
5858631e6d
5 files changed
+184
-7
No files matched your search
@@ -114,6 +114,10 @@ wss.on("connection", (socket: WebSocket) => {
|
||||
await connection?.setOutputMuted(msg.muted);
|
||||
break;
|
||||
}
|
||||
case "setWhisperTargets": {
|
||||
await connection?.setWhisperTargets(msg.channelIds ?? [], msg.clientIds ?? []);
|
||||
break;
|
||||
}
|
||||
case "disconnect": {
|
||||
await connection?.disconnect(msg.message ?? "");
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user