mirror of
https://github.com/DerTyp7/teamspeak-obs-overlay.git
synced 2025-10-29 12:52:09 +01:00
fixed bug currentClient were shown even if muted
This commit is contained in:
@@ -4,8 +4,13 @@ function drawClients() {
|
||||
result = "";
|
||||
if (thisClient) {
|
||||
getClientsInChannel(thisClient.channel).forEach((c) => {
|
||||
isHidden = CONFIG.hideSilent && c.talkStatus == 0;
|
||||
result += `<div class="client-div" ${isHidden ? "hidden" : ""} style="color:${CONFIG.style.fontColor}; font-size:${CONFIG.style.fontSize}">`;
|
||||
isHidden = CONFIG.hideSilent && (c.talkStatus == 0 || c.isMuted());
|
||||
|
||||
result += `<div class="client-div" ${
|
||||
isHidden ? "hidden" : ""
|
||||
} style="color:${CONFIG.style.fontColor}; font-size:${
|
||||
CONFIG.style.fontSize
|
||||
}">`;
|
||||
result += '<div class="client-img-div">';
|
||||
if (c.outputMuted) {
|
||||
result += ' <img src="img/muted_output.svg" />';
|
||||
|
||||
@@ -22,6 +22,10 @@ class Client {
|
||||
this.talkStatus = talkStatus;
|
||||
console.log(`Client created: ${this.id} - ${this.name}`);
|
||||
}
|
||||
|
||||
isMuted() {
|
||||
return this.inputMuted == true || this.outputMuted == true;
|
||||
}
|
||||
}
|
||||
|
||||
class List {
|
||||
|
||||
Reference in New Issue
Block a user