fix: video blink when toggling mic mute in calls (#277)

Co-authored-by: userAdityaa <aditya.chaudhary1558@gmail.com>
Co-committed-by: userAdityaa <aditya.chaudhary1558@gmail.com>
This commit was merged in pull request #277.
This commit is contained in:
2026-05-20 16:44:38 +00:00
committed by hodlbod
parent eb8dd330b6
commit ffd06ab561
3 changed files with 16 additions and 12 deletions
+5 -5
View File
@@ -41,6 +41,7 @@
VoiceState,
currentVoiceSession,
currentVoiceRoom,
voiceMicMuted,
voiceState,
isLocalSpeaking,
} from "@app/call/stores"
@@ -183,18 +184,17 @@
</Button>
{:else if $voiceState === VoiceState.Connected && $currentVoiceSession}
<Button
data-tip={$currentVoiceSession.muted ? "Unmute" : "Mute"}
data-tip={$voiceMicMuted ? "Unmute" : "Mute"}
class={cx(
mediaToggleClass,
"overflow-visible",
!$currentVoiceSession.muted && $isLocalSpeaking && "text-primary",
$currentVoiceSession.muted &&
"text-error ring-1 ring-error/50 ring-offset-0 ring-offset-base-100",
!$voiceMicMuted && $isLocalSpeaking && "text-primary",
$voiceMicMuted && "text-error ring-1 ring-error/50 ring-offset-0 ring-offset-base-100",
)}
onclick={toggleMute}>
<span class="relative inline-flex items-center justify-center overflow-visible">
<Icon icon={Microphone} size={4} />
{#if $currentVoiceSession.muted}
{#if $voiceMicMuted}
<span
class="pointer-events-none absolute inset-0 flex items-center justify-center overflow-visible"
aria-hidden="true">