Skip to content

Commit

Permalink
fix: Fix fetch URL in loadBuffer function by not prefixing the url wi…
Browse files Browse the repository at this point in the history
…th MEDIA_ROOT (which was causing a double prefix, one here and one from the backend's url response)
  • Loading branch information
drikusroor committed May 16, 2024
1 parent 1d0667d commit 3c0382b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/util/webAudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3c0382b

Please sign in to comment.