From 3c0382b70b63742d7f0d0f75d8e64383f3bd01ff Mon Sep 17 00:00:00 2001 From: Drikus Roor Date: Thu, 16 May 2024 16:07:32 +0200 Subject: [PATCH] fix: Fix fetch URL in loadBuffer function by not prefixing the url with MEDIA_ROOT (which was causing a double prefix, one here and one from the backend's url response) --- frontend/src/util/webAudio.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/util/webAudio.js b/frontend/src/util/webAudio.js index f98b3e873..0aa344dd6 100644 --- a/frontend/src/util/webAudio.js +++ b/frontend/src/util/webAudio.js @@ -74,7 +74,7 @@ export const changeGain = (level) => { // load sound data and store in buffers object export const loadBuffer = async (id, src, canPlay) => { - await fetch(MEDIA_ROOT + src, {}) + await fetch(src, {}) // Return the data as an ArrayBuffer .then(response => response.arrayBuffer()) // Decode the audio data