feat: update sound source mappings to use resolved Vite asset URLs
This commit is contained in:
@@ -1,4 +1,11 @@
|
|||||||
/* eslint-disable no-console */
|
/* 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
|
* 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, string> = {
|
const SOUND_SOURCES: Record<CallSoundType, string> = {
|
||||||
[CallSoundType.MicMute]: '/sound/Mic_Mute.ogg',
|
[CallSoundType.MicMute]: MicMuteUrl,
|
||||||
[CallSoundType.MicUnmute]: '/sound/Mic_Unmuted.ogg',
|
[CallSoundType.MicUnmute]: MicUnmutedUrl,
|
||||||
[CallSoundType.Deafen]: '/sound/Speakers_Deafen.ogg',
|
[CallSoundType.Deafen]: SpeakersDeafenUrl,
|
||||||
[CallSoundType.Undeafen]: '/sound/Speakers_Undeafen.ogg',
|
[CallSoundType.Undeafen]: SpeakersUndeafenUrl,
|
||||||
[CallSoundType.CallJoined]: '/sound/Call_Joined.ogg',
|
[CallSoundType.CallJoined]: CallJoinedUrl,
|
||||||
[CallSoundType.CallDepart]: '/sound/Call_Depart.ogg',
|
[CallSoundType.CallDepart]: CallDepartUrl,
|
||||||
[CallSoundType.CallDialing]: '/sound/Call_Dialing.ogg',
|
[CallSoundType.CallDialing]: CallDialingUrl,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user