Skip to content

Commit

Permalink
fix(web): correct URL for audio waveform samples
Browse files Browse the repository at this point in the history
  • Loading branch information
MrExplode committed Nov 6, 2024
1 parent 9697f8a commit 12f4f73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webapp/src/lib/components/audio/AudioWaveform.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
import Shrink from 'lucide-svelte/icons/shrink'
import { player } from '@/audio/waveform'
import { Button } from '@/ui/button'
import { dev } from '$app/environment'
const URL = dev ? 'http://localhost:7000/audio/samples' : '/audio/samples'
let zoomview: HTMLElement | null = null
let scrollbar: HTMLElement | null = null
Expand All @@ -19,7 +22,7 @@
let amplitudes = [0.0, 0.1, 0.25, 0.5, 0.75, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0]
const loadWaveData = async (): Promise<void> => {
const res = await fetch('http://localhost:7000/audio/samples')
const res = await fetch(URL)
if (res.status != 200) throw new Error('Request failed')
const data = await res.json()
Expand Down

0 comments on commit 12f4f73

Please sign in to comment.