Skip to content

Commit 8e8a56e

Browse files
committed
Fix base path for audio timing files
1 parent 6dd3e39 commit 8e8a56e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/data/audio.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
} from '$lib/data/stores';
1111
import { refs, audioPlayer as audioPlayerStore, audioPlayerDefault } from '$lib/data/stores';
1212
import { MRUCache } from '$lib/data/mrucache';
13+
import { base } from '$app/paths';
1314
interface AudioPlayer {
1415
audio: HTMLAudioElement;
1516
loaded: boolean;
@@ -388,7 +389,7 @@ export async function getAudioSourceInfo(item: {
388389
//parse timing file
389390
const timing = [];
390391
if (audio.timingFile) {
391-
const timeFilePath = `/timings/${audio.timingFile}`;
392+
const timeFilePath = `${base}/timings/${audio.timingFile}`;
392393
const response = await fetch(timeFilePath);
393394
if (!response.ok) {
394395
throw new Error('Failed to read file');

0 commit comments

Comments
 (0)