- added debouncing of sounds

- added new sound files
- moved soung hits to sighting list
This commit is contained in:
2025-10-27 14:00:28 +00:00
parent e46460f41d
commit ae0a6f9249
7 changed files with 65 additions and 31 deletions

View File

@@ -5,7 +5,7 @@ import beep from "../assets/sounds/ui/Beep.wav";
import warning from "../assets/sounds/ui/Warning.wav";
import ding from "../assets/sounds/ui/Ding.wav";
import shutter from "../assets/sounds/ui/shutter.mp3";
import attention from "../assets/sounds/ui/Attention.wav";
import type { HotlistMatches, SightingType } from "../types/types";
export function getSoundFileURL(name: string) {
@@ -17,6 +17,7 @@ export function getSoundFileURL(name: string) {
warning: warning,
ding: ding,
shutter: shutter,
attention: attention,
};
return sounds[name] ?? null;
}
@@ -156,4 +157,4 @@ export function getHotlistName(obj: HotlistMatches | undefined) {
}
export const getNPEDCategory = (r?: SightingType | null) =>
r?.metadata?.npedJSON?.["NPED CATEGORY"] as "A" | "B" | "C" | undefined;
r?.metadata?.npedJSON?.["NPED CATEGORY"] as "A" | "B" | "C" | "D" | undefined;