From b3495bc10273d6c1e7f38e3b8a6f4e4dfac13745 Mon Sep 17 00:00:00 2001 From: Max Litruv Boonzaayer Date: Thu, 26 Mar 2026 10:23:41 +1100 Subject: [PATCH] feat: update sound source mappings to use resolved Vite asset URLs --- src/app/features/call/CallSounds.ts | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/app/features/call/CallSounds.ts b/src/app/features/call/CallSounds.ts index 954f59a..0d094c9 100644 --- a/src/app/features/call/CallSounds.ts +++ b/src/app/features/call/CallSounds.ts @@ -1,4 +1,11 @@ /* eslint-disable no-console */ +import MicMuteUrl from '../../../../public/sound/Mic_Mute.ogg'; +import MicUnmutedUrl from '../../../../public/sound/Mic_Unmuted.ogg'; +import SpeakersDeafenUrl from '../../../../public/sound/Speakers_Deafen.ogg'; +import SpeakersUndeafenUrl from '../../../../public/sound/Speakers_Undeafen.ogg'; +import CallJoinedUrl from '../../../../public/sound/Call_Joined.ogg'; +import CallDepartUrl from '../../../../public/sound/Call_Depart.ogg'; +import CallDialingUrl from '../../../../public/sound/Call_Dialing.ogg'; /** * Sound types that can be played during a call @@ -14,16 +21,16 @@ export enum CallSoundType { } /** - * Maps sound types to their audio sources (paths in public folder) + * Maps sound types to their resolved Vite asset URLs */ const SOUND_SOURCES: Record = { - [CallSoundType.MicMute]: '/sound/Mic_Mute.ogg', - [CallSoundType.MicUnmute]: '/sound/Mic_Unmuted.ogg', - [CallSoundType.Deafen]: '/sound/Speakers_Deafen.ogg', - [CallSoundType.Undeafen]: '/sound/Speakers_Undeafen.ogg', - [CallSoundType.CallJoined]: '/sound/Call_Joined.ogg', - [CallSoundType.CallDepart]: '/sound/Call_Depart.ogg', - [CallSoundType.CallDialing]: '/sound/Call_Dialing.ogg', + [CallSoundType.MicMute]: MicMuteUrl, + [CallSoundType.MicUnmute]: MicUnmutedUrl, + [CallSoundType.Deafen]: SpeakersDeafenUrl, + [CallSoundType.Undeafen]: SpeakersUndeafenUrl, + [CallSoundType.CallJoined]: CallJoinedUrl, + [CallSoundType.CallDepart]: CallDepartUrl, + [CallSoundType.CallDialing]: CallDialingUrl, }; /**