mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
Options: Download tab with transfer window, queue and bandwidth limits
Download folder via the File System Access API (Chromium; browser default elsewhere), "ask every time" save dialog, file transfer window with progress, completion pop-up, concurrent upload/download caps and connector-side bandwidth limits (new "ftlimit" stdin command / setTransferLimit message). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
1 parent
7b98cb2d7c
commit
d0fc97d921
11 files changed
+747
-23
No files matched your search
@@ -1010,6 +1010,10 @@ wss.on("connection", (socket: WebSocket, req: IncomingMessage) => {
|
||||
await connection?.downloadFile(msg.channelId, msg.path);
|
||||
break;
|
||||
}
|
||||
case "setTransferLimit": {
|
||||
connection?.setTransferLimit(msg.up, msg.down);
|
||||
break;
|
||||
}
|
||||
case "uploadFile": {
|
||||
await connection?.uploadFile(msg.channelId, msg.path, msg.dataBase64);
|
||||
break;
|
||||
|
||||
@@ -967,6 +967,12 @@ export class Ts3Connection {
|
||||
this.writeLine(`whisperpolicy ${block ? "block" : "allow"};${ids.join(",")}`);
|
||||
}
|
||||
|
||||
/** File transfer bandwidth caps in bytes/s, 0 = unlimited. */
|
||||
setTransferLimit(up: unknown, down: unknown): void {
|
||||
const rate = (v: unknown) => Math.max(0, Math.floor(Number(v) || 0));
|
||||
this.writeLine(`ftlimit ${rate(up)} ${rate(down)}`);
|
||||
}
|
||||
|
||||
/** Empty channelIds/clientIds clears whisper mode, returning outgoing
|
||||
* voice to the normal current-channel broadcast. */
|
||||
async setWhisperTargets(channelIds: number[], clientIds: number[]): Promise<void> {
|
||||
|
||||
Reference in new issue
Block a user