From bad96500d503f75e4b78363a265559f0eed966d4 Mon Sep 17 00:00:00 2001 From: mplorentz Date: Fri, 3 Apr 2026 09:58:00 -0400 Subject: [PATCH] Style voice widget icons to be less red --- src/app/components/VoiceWidget.svelte | 41 +++++++++++++++++++-------- src/app/voice.ts | 10 +++++++ 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/src/app/components/VoiceWidget.svelte b/src/app/components/VoiceWidget.svelte index aa2b995c..7270b930 100644 --- a/src/app/components/VoiceWidget.svelte +++ b/src/app/components/VoiceWidget.svelte @@ -3,9 +3,9 @@ import {fly} from "svelte/transition" import {goto} from "$app/navigation" import {page} from "$app/stores" + import cx from "classnames" import {displayRelayUrl} from "@welshman/util" import Microphone from "@assets/icons/microphone.svg?dataurl" - import MicrophoneOff from "@assets/icons/microphone-off.svg?dataurl" import Videocamera from "@assets/icons/videocamera.svg?dataurl" import VideocameraRecord from "@assets/icons/videocamera-record.svg?dataurl" import Monitor from "@assets/icons/monitor.svg?dataurl" @@ -32,6 +32,7 @@ currentVoiceSession, currentVoiceRoom, voiceState, + isLocalSpeaking, leaveVoiceRoom, toggleMute, toggleCamera, @@ -74,8 +75,21 @@ const openCallSettings = () => { pushModal(VoiceCallAudioSettingsDialog) } + + const mediaToggleClass = "center tooltip tooltip-top btn btn-sm btn-square btn-ghost" +{#snippet mutedSlash(show: boolean)} + {#if show} + + {/if} +{/snippet} + {#if targetRoom}
-
+
{#if $voiceState === VoiceState.Joining} diff --git a/src/app/voice.ts b/src/app/voice.ts index 81e7e510..60248ed9 100644 --- a/src/app/voice.ts +++ b/src/app/voice.ts @@ -135,6 +135,16 @@ export const isParticipantSpeaking = derived( $participants.some(sp => participantKey(sp) === participantKey(p)), ) +/** True when the local user is in LiveKit’s active-speakers list (currently talking). */ +export const isLocalSpeaking = derived( + [currentVoiceSession, speakingParticipants], + ([$session, $speaking]) => { + if (!$session?.room) return false + const local = participantFromLiveKitIdentity($session.room.localParticipant.identity) + return $speaking.some(sp => participantKey(sp) === participantKey(local)) + }, +) + const fetchLivekitToken = async ( url: string, groupId: string,