mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 03:52:50 +08:00
fix: enforce WebRTC microphone mute at gateway
This commit is contained in:
1 parent
e14ddc9465
commit
83a8fd0d5a
5 files changed
+32
-6
No files matched your search
@@ -73,3 +73,13 @@ test("voice protocol validates whisper targets and its independent push state",
|
||||
error: { code: "INVALID_WHISPER_STATE", message: "私语状态无效" },
|
||||
});
|
||||
});
|
||||
|
||||
test("voice protocol accepts and validates the microphone mute state", () => {
|
||||
assert.deepEqual(parseClientCommand(JSON.stringify({ type: "setMicrophoneMuted", payload: { muted: true } })), {
|
||||
type: "setMicrophoneMuted",
|
||||
payload: { muted: true },
|
||||
});
|
||||
assert.deepEqual(parseClientCommand(JSON.stringify({ type: "setMicrophoneMuted", payload: { muted: "yes" } })), {
|
||||
error: { code: "INVALID_MICROPHONE_STATE", message: "麦克风状态无效" },
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user