Compare commits

..

1 Commits

Author SHA1 Message Date
userAdityaa 4c5cf70ebc chore: show call participant mute and camera-off state 2026-05-21 16:51:38 +05:30
2 changed files with 15 additions and 6 deletions
+3 -3
View File
@@ -41,9 +41,9 @@ export const participantKey = (p: VoiceParticipant) => p.pubkey ?? p.identity
export const speakingParticipants = writable<VoiceParticipant[]>([])
export const participantMediaState = writable<Map<string, {muted: boolean; cameraOn: boolean}>>(
new Map(),
)
export const participantMediaState = writable<
Map<string, {muted: boolean; cameraOn: boolean}>
>(new Map())
export const mediaStateByIdentity = derived(
[participantMediaState, currentVoiceSession],
+12 -3
View File
@@ -38,7 +38,12 @@
toggleScreenShare,
videoCallLayout,
} from "@app/call/video"
import {VoiceState, currentVoiceSession, currentVoiceRoom, voiceState} from "@app/call/stores"
import {
VoiceState,
currentVoiceSession,
currentVoiceRoom,
voiceState,
} from "@app/call/stores"
import {cancelJoinVoiceRoom, leaveVoiceRoom, toggleMute} from "@app/call/voice"
const {relay, h} = $derived($page.params)
@@ -187,7 +192,9 @@
"text-error ring-1 ring-error/50 ring-offset-0 ring-offset-base-100",
)}
onclick={toggleMute}>
<Icon icon={$currentVoiceSession.muted ? MicrophoneOff : Microphone} size={4} />
<Icon
icon={$currentVoiceSession.muted ? MicrophoneOff : Microphone}
size={4} />
</Button>
<Button
data-tip={$currentVoiceSession.cameraOn ? "Turn off camera" : "Turn on camera"}
@@ -200,7 +207,9 @@
)}
onclick={toggleCamera}>
<Icon
icon={$currentVoiceSession.cameraOn ? VideocameraRecord : VideocameraOff}
icon={$currentVoiceSession.cameraOn
? VideocameraRecord
: VideocameraOff}
size={4} />
</Button>
{#if !Capacitor.isNativePlatform()}