@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 11 lines 442 Bytes
Raw
1 import type { SnapShotSound } from "@t3tools/contracts";
2
3 import snapShotClickUrl from "../assets/snap-shot-click.mp3?url";
4 import snapShotWhooshUrl from "../assets/snap-shot-whoosh.mp3?url";
5
6 export function playSnapShotSound(sound: SnapShotSound): void {
7 const audio = new Audio(sound === "soft-pop" ? snapShotWhooshUrl : snapShotClickUrl);
8 audio.preload = "auto";
9 audio.currentTime = 0;
10 void audio.play().catch(() => undefined);
11 }