mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
fix: apply member volume in WebRTC playback
This commit is contained in:
1 parent
21041346e3
commit
c38239ec35
5 files changed
+55
-6
No files matched your search
@@ -449,6 +449,7 @@ export class VoiceBridge {
|
||||
tsClient.on("clientLeave", (info) => {
|
||||
const wasKnown = entry!.members.has(info.id);
|
||||
const leavingMember = entry!.members.get(info.id);
|
||||
entry!.webrtc?.setMemberVolume(info.id, 1);
|
||||
directory.applyClientLeave(info.id);
|
||||
refreshDirectory();
|
||||
if (tsReady && initialStateSent && wasKnown) {
|
||||
@@ -922,6 +923,9 @@ async function handleCommand(
|
||||
entry.webrtc?.setMicrophoneMuted(command.payload.muted as boolean);
|
||||
} else if (command.type === "setAccompanimentActive") {
|
||||
entry.webrtc?.setAccompanimentActive(command.payload.active as boolean);
|
||||
} else if (command.type === "setMemberVolume") {
|
||||
const clientId = command.payload.clientId as number;
|
||||
if (entry.members.has(clientId)) entry.webrtc?.setMemberVolume(clientId, command.payload.volume as number);
|
||||
}
|
||||
if (command.requestId) sendJson({ type: "commandCompleted", requestId: command.requestId });
|
||||
} catch (error: unknown) {
|
||||
|
||||
Reference in new issue
Block a user