Compare commits

..

1 Commits

Author SHA1 Message Date
userAdityaa fc4fa4c297 fix: video blink when toggling mic mute in calls 2026-05-20 10:28:22 +05:30
+3 -4
View File
@@ -13,7 +13,7 @@ import {
type AudioCaptureOptions,
} from "livekit-client"
import {derived, get} from "svelte/store"
import {map, removeUndefined, uniqBy} from "@welshman/lib"
import {map, not, removeUndefined, uniqBy} from "@welshman/lib"
import type {TrustedEvent} from "@welshman/util"
import {makeHttpAuth, makeHttpAuthHeader, getTags} from "@welshman/util"
import {signer} from "@welshman/app"
@@ -359,9 +359,8 @@ export const toggleMute = async () => {
const session = get(currentVoiceSession)
if (!session) return
const muted = !get(voiceMicMuted)
voiceMicMuted.set(muted)
if (muted) {
voiceMicMuted.update(not)
if (get(voiceMicMuted)) {
// Disable and re-enable microphone to trigger permission prompt
session.room.localParticipant.setMicrophoneEnabled(false)
return